API Reference
bankTransfer
#Get a Bank Transfer by ID
ResponseReturns a BankTransfer
query BankTransfer($bankTransfer: BankTransferMatchInput!) {
bankTransfer(bankTransfer: $bankTransfer) {
description
id
order {
...OrderFragment
}
status
}
}
{"bankTransfer": BankTransferMatchInput}
{
"data": {
"bankTransfer": {
"description": "xyz789",
"id": 4,
"order": Order,
"status": "failed"
}
}
}
Arguments
Name | Description |
---|---|
bankTransfer - BankTransferMatchInput! | An object specifying the ID of the bank transfer you want to query |
ledger
#Get a Ledger by ID
ResponseReturns a Ledger
query Ledger($ledger: LedgerMatchInput!) {
ledger(ledger: $ledger) {
balanceUTCOffset
created
id
ik
ledgerAccounts {
...LedgerAccountsConnectionFragment
}
ledgerEntries {
...LedgerEntriesConnectionFragment
}
migrations {
...LedgerMigrationConnectionFragment
}
name
schema {
...SchemaFragment
}
type
workspaceId
}
}
{"ledger": LedgerMatchInput}
{
"data": {
"ledger": {
"balanceUTCOffset": UTCOffset,
"created": "2007-12-03T10:15:30Z",
"id": 4,
"ik": "some-safe-string-ik",
"ledgerAccounts": LedgerAccountsConnection,
"ledgerEntries": LedgerEntriesConnection,
"migrations": LedgerMigrationConnection,
"name": "xyz789",
"schema": Schema,
"type": "double",
"workspaceId": "4"
}
}
}
Arguments
Name | Description |
---|---|
ledger - LedgerMatchInput! | An object specifying the ID of the ledger you want to query |
ledgerAccount
#Get a Ledger Account by ID
ResponseReturns a LedgerAccount
query LedgerAccount($ledgerAccount: LedgerAccountMatchInput!) {
ledgerAccount(ledgerAccount: $ledgerAccount) {
balance
balanceChange
balanceChanges {
...CurrencyAmountConnectionFragment
}
balances {
...CurrencyAmountConnectionFragment
}
childBalance
childBalanceChange
childBalanceChanges {
...CurrencyAmountConnectionFragment
}
childBalances {
...CurrencyAmountConnectionFragment
}
created
currency {
...CurrencyFragment
}
currencyMode
id
ik
ikPath
ledger {
...LedgerFragment
}
ledgerId
lines {
...LedgerLinesConnectionFragment
}
link {
...LinkFragment
}
linkedAccount {
...ExternalAccountFragment
}
name
ownBalance
ownBalanceChange
ownBalances {
...CurrencyAmountConnectionFragment
}
parentLedgerAccount {
...LedgerAccountFragment
}
parentLedgerAccountId
path
type
unreconciledTxs {
...TxsConnectionFragment
}
workspaceId
}
}
{"ledgerAccount": LedgerAccountMatchInput}
{
"data": {
"ledgerAccount": {
"balance": Int64,
"balanceChange": Int64,
"balanceChanges": CurrencyAmountConnection,
"balances": CurrencyAmountConnection,
"childBalance": Int64,
"childBalanceChange": Int64,
"childBalanceChanges": CurrencyAmountConnection,
"childBalances": CurrencyAmountConnection,
"created": "2007-12-03T10:15:30Z",
"currency": Currency,
"currencyMode": "multi",
"id": 4,
"ik": "xyz789",
"ikPath": "abc123",
"ledger": Ledger,
"ledgerId": 4,
"lines": LedgerLinesConnection,
"link": Link,
"linkedAccount": ExternalAccount,
"name": "abc123",
"ownBalance": Int64,
"ownBalanceChange": Int64,
"ownBalances": CurrencyAmountConnection,
"parentLedgerAccount": LedgerAccount,
"parentLedgerAccountId": "4",
"path": "xyz789",
"type": "asset",
"unreconciledTxs": TxsConnection,
"workspaceId": "4"
}
}
}
Arguments
Name | Description |
---|---|
ledgerAccount - LedgerAccountMatchInput! | An object specifying the ID of the ledger account you want to query |
ledgerEntry
#Get Ledger Entry by ID
ResponseReturns a LedgerEntry
query LedgerEntry($ledgerEntry: LedgerEntryMatchInput!) {
ledgerEntry(ledgerEntry: $ledgerEntry) {
created
date
description
id
ledger {
...LedgerFragment
}
ledgerId
lines {
...LedgerLinesConnectionFragment
}
order {
...OrderFragment
}
orderId
posted
workspaceId
}
}
{"ledgerEntry": LedgerEntryMatchInput}
{
"data": {
"ledgerEntry": {
"created": "2007-12-03T10:15:30Z",
"date": "2007-12-03",
"description": "abc123",
"id": 4,
"ledger": Ledger,
"ledgerId": "4",
"lines": LedgerLinesConnection,
"order": Order,
"orderId": 4,
"posted": "2007-12-03T10:15:30Z",
"workspaceId": 4
}
}
}
Arguments
Name | Description |
---|---|
ledgerEntry - LedgerEntryMatchInput! | An object specifying the ID of the ledger entry you want to query |
ledgerLine
#Get Ledger Line by ID
ResponseReturns a LedgerLine
query LedgerLine($ledgerLine: LedgerLineMatchInput!) {
ledgerLine(ledgerLine: $ledgerLine) {
account {
...LedgerAccountFragment
}
accountId
amount
created
currency {
...CurrencyFragment
}
date
description
externalTransferId
externalTransferType
externalTxId
id
ledger {
...LedgerFragment
}
ledgerEntryId
ledgerId
otherTxExternalAccountExternalId
otherTxExternalAccountId
otherTxExternalId
otherTxId
posted
txId
type
workspaceId
}
}
{"ledgerLine": LedgerLineMatchInput}
{
"data": {
"ledgerLine": {
"account": LedgerAccount,
"accountId": "4",
"amount": Int64,
"created": "2007-12-03T10:15:30Z",
"currency": Currency,
"date": "2007-12-03",
"description": "xyz789",
"externalTransferId": "xyz789",
"externalTransferType": "ach",
"externalTxId": "xyz789",
"id": 4,
"ledger": Ledger,
"ledgerEntryId": 4,
"ledgerId": "4",
"otherTxExternalAccountExternalId": "xyz789",
"otherTxExternalAccountId": "xyz789",
"otherTxExternalId": "xyz789",
"otherTxId": "abc123",
"posted": "2007-12-03T10:15:30Z",
"txId": "xyz789",
"type": "credit",
"workspaceId": 4
}
}
}
Arguments
Name | Description |
---|---|
ledgerLine - LedgerLineMatchInput! | An object specifying the ID of the ledger line you want to query |
ledgers
#Query Ledgers in workspace
ResponseReturns a LedgersConnection
query Ledgers(
$after: String,
$before: String,
$filter: LedgersFilterSet,
$first: Int,
$last: Int
) {
ledgers(
after: $after,
before: $before,
filter: $filter,
first: $first,
last: $last
) {
nodes {
...LedgerFragment
}
pageInfo {
...PageInfoFragment
}
}
}
{
"after": "xyz789",
"before": "abc123",
"filter": LedgersFilterSet,
"first": 987,
"last": 123
}
{
"data": {
"ledgers": {
"nodes": [Ledger],
"pageInfo": PageInfo
}
}
}
Arguments
Name | Description |
---|---|
after - String | Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about pagination . |
before - String | Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about pagination . |
filter - LedgersFilterSet | Filter the ledgers returned. Learn more about filtering . |
first - Int | The number of ledgers to return per page, when paginating forwards. Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. |
last - Int | The number of ledgers to return per page, when paginating backwards. Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. |
order
#Get a Order by ID
ResponseReturns an Order
query Order($order: OrderMatchInput!) {
order(order: $order) {
description
entryIds
id
stateMachine {
...OrderStateMachineFragment
}
}
}
{"order": OrderMatchInput}
{
"data": {
"order": {
"description": "abc123",
"entryIds": ["abc123"],
"id": 4,
"stateMachine": OrderStateMachine
}
}
}
Arguments
Name | Description |
---|---|
order - OrderMatchInput! | An object specifying the ID of the order you want to query |
schema
#Get a Schema by key. Under development; unexpected results may occur.
ResponseReturns a Schema
query Schema($schema: SchemaMatchInput!) {
schema(schema: $schema) {
key
ledgers {
...LedgersConnectionFragment
}
schemaVersion {
...SchemaVersionFragment
}
versions {
...SchemaVersionConnectionFragment
}
}
}
{"schema": SchemaMatchInput}
{
"data": {
"schema": {
"key": "some-safe-string-ik",
"ledgers": LedgersConnection,
"schemaVersion": SchemaVersion,
"versions": SchemaVersionConnection
}
}
}
Arguments
Name | Description |
---|---|
schema - SchemaMatchInput! | An object specifying the ID of the ledger you want to query |
schemas
#Returns a SchemaConnection
query Schemas {
schemas {
nodes {
...SchemaFragment
}
pageInfo {
...PageInfoFragment
}
}
}
{
"data": {
"schemas": {
"nodes": [Schema],
"pageInfo": PageInfo
}
}
}
Arguments
tx
#Get a Tx by ID
ResponseReturns a Tx
query Tx($tx: TxMatchInput!) {
tx(tx: $tx) {
accountId
amount
currency {
...CurrencyFragment
}
date
description
externalAccountId
externalId
id
ledgerEntries {
...LedgerEntriesConnectionFragment
}
ledgerEntryIds
ledgerLineIds
ledgerLines {
...LedgerLinesConnectionFragment
}
linkId
posted
workspaceId
}
}
{"tx": TxMatchInput}
{
"data": {
"tx": {
"accountId": 4,
"amount": Int64,
"currency": Currency,
"date": "2007-12-03",
"description": "xyz789",
"externalAccountId": 4,
"externalId": "4",
"id": "4",
"ledgerEntries": LedgerEntriesConnection,
"ledgerEntryIds": ["4"],
"ledgerLineIds": ["4"],
"ledgerLines": LedgerLinesConnection,
"linkId": 4,
"posted": "2007-12-03T10:15:30Z",
"workspaceId": "4"
}
}
}
Arguments
Name | Description |
---|---|
tx - TxMatchInput! | The transaction you're querying. You can specify either: * The Fragment ID of the transaction (id) * The external system's transaction ID (externalId) and Fragment ID of the external account (accountId) * The external system's transaction ID (externalId), the external system's account ID (externalAccountId) and Fragment ID of the Link (linkId) |
addLedgerEntry
#View the Add Ledger Entry section of the docs.
ResponseReturns an AddLedgerEntryResponse
mutation AddLedgerEntry(
$entry: LedgerEntryInput!,
$ik: SafeString!
) {
addLedgerEntry(
entry: $entry,
ik: $ik
) {
... on AddLedgerEntryResult {
...AddLedgerEntryResultFragment
}
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{"entry": LedgerEntryInput, "ik": "some-safe-string-ik"}
{"data": {"addLedgerEntry": AddLedgerEntryResult}}
Arguments
Name | Description |
---|---|
entry - LedgerEntryInput! | An object containing the Ledger Lines as well as an optional description and posted timestamp. |
ik - SafeString! | The Idempotency Key |
createCustomCurrency
#View the Multi-Currency section of the docs.
ResponseReturns a CreateCustomCurrencyResponse
mutation CreateCustomCurrency($customCurrency: CreateCustomCurrencyInput!) {
createCustomCurrency(customCurrency: $customCurrency) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateCustomCurrencyResult {
...CreateCustomCurrencyResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{"customCurrency": CreateCustomCurrencyInput}
{"data": {"createCustomCurrency": BadRequestError}}
Arguments
Name | Description |
---|---|
customCurrency - CreateCustomCurrencyInput! | The custom currency to be created |
createCustomLink
#View the Creating a Custom Link section of the docs.
ResponseReturns a CreateCustomLinkResponse
mutation CreateCustomLink(
$ik: SafeString!,
$name: String!
) {
createCustomLink(
ik: $ik,
name: $name
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateCustomLinkResult {
...CreateCustomLinkResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{
"ik": "some-safe-string-ik",
"name": "xyz789"
}
{"data": {"createCustomLink": BadRequestError}}
Arguments
Name | Description |
---|---|
ik - SafeString! | The Idempotency Key |
name - String! | The name of your custom link |
createLedger
#View the Ledger Creation section of the docs.
ResponseReturns a CreateLedgerResponse
mutation CreateLedger(
$ik: SafeString!,
$ledger: CreateLedgerInput!,
$schema: SchemaMatchInput
) {
createLedger(
ik: $ik,
ledger: $ledger,
schema: $schema
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateLedgerResult {
...CreateLedgerResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{
"ik": "some-safe-string-ik",
"ledger": CreateLedgerInput,
"schema": SchemaMatchInput
}
{"data": {"createLedger": BadRequestError}}
Arguments
Name | Description |
---|---|
ik - SafeString! | The Idempotency Key |
ledger - CreateLedgerInput! | The payload representing the ledger to be created |
schema - SchemaMatchInput |
createLedgerAccount
#Prefer using the plural createLedgerAccounts instead
ResponseReturns a CreateLedgerAccountResponse
mutation CreateLedgerAccount(
$ik: SafeString!,
$ledger: LedgerMatchInput!,
$ledgerAccount: CreateLedgerAccountInput!
) {
createLedgerAccount(
ik: $ik,
ledger: $ledger,
ledgerAccount: $ledgerAccount
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateLedgerAccountResult {
...CreateLedgerAccountResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{
"ik": "some-safe-string-ik",
"ledger": LedgerMatchInput,
"ledgerAccount": CreateLedgerAccountInput
}
{"data": {"createLedgerAccount": BadRequestError}}
Arguments
Name | Description |
---|---|
ik - SafeString! | The Idempotency Key |
ledger - LedgerMatchInput! | An object containing the ID of the ledger under which to create the ledger account |
ledgerAccount - CreateLedgerAccountInput! | The payload representing the ledger account to be created |
createLedgerAccounts
#View the Account Creation section of the docs.
ResponseReturns a CreateLedgerAccountsResponse
mutation CreateLedgerAccounts(
$ledger: LedgerMatchInput!,
$ledgerAccounts: [CreateLedgerAccountsInput!]!
) {
createLedgerAccounts(
ledger: $ledger,
ledgerAccounts: $ledgerAccounts
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateLedgerAccountsResult {
...CreateLedgerAccountsResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{
"ledger": LedgerMatchInput,
"ledgerAccounts": [CreateLedgerAccountsInput]
}
{"data": {"createLedgerAccounts": BadRequestError}}
Arguments
Name | Description |
---|---|
ledger - LedgerMatchInput! | An object containing the ID of the ledger under which to create the ledger account |
ledgerAccounts - [CreateLedgerAccountsInput!]! | The list of objects representing the ledger accounts to be created |
createOrder
#View the Orders section of the docs.
ResponseReturns a CreateOrderResponse
mutation CreateOrder(
$ik: SafeString!,
$order: CreateOrderInput!
) {
createOrder(
ik: $ik,
order: $order
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateOrderResult {
...CreateOrderResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{"ik": "some-safe-string-ik", "order": CreateOrderInput}
{"data": {"createOrder": BadRequestError}}
Arguments
Name | Description |
---|---|
ik - SafeString! | The Idempotency Key |
order - CreateOrderInput! | Payload representing the state machine of the bank transfer being made. You can define the side-effects of each state transition, such as what should happen when an order goes from one state to another (ex: submitted to settled) |
makeBankTransfer
#View the docs for makeBankTransfer here
ResponseReturns a MakeBankTransferResponse
mutation MakeBankTransfer(
$bankTransfer: MakeBankTransferInput!,
$ik: SafeString!
) {
makeBankTransfer(
bankTransfer: $bankTransfer,
ik: $ik
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on MakeBankTransferResult {
...MakeBankTransferResultFragment
}
}
}
{
"bankTransfer": MakeBankTransferInput,
"ik": "some-safe-string-ik"
}
{"data": {"makeBankTransfer": BadRequestError}}
Arguments
Name | Description |
---|---|
bankTransfer - MakeBankTransferInput! | Payload representing the bank transfer to be initiated. |
ik - SafeString! | The Idempotency Key |
reconcileTx
#View the Reconciliation section of the docs.
ResponseReturns a ReconcileTxResponse
mutation ReconcileTx($entry: LedgerEntryInput!) {
reconcileTx(entry: $entry) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on ReconcileTxResult {
...ReconcileTxResultFragment
}
}
}
{"entry": LedgerEntryInput}
{"data": {"reconcileTx": BadRequestError}}
Arguments
Name | Description |
---|---|
entry - LedgerEntryInput! | The ledger entry containing lines that specify the transaction from a linked ledger account to reconcile, as well as the ledger account with which to offset the external transaction. |
storeSchema
#Returns a StoreSchemaResponse
mutation StoreSchema($schema: SchemaInput!) {
storeSchema(schema: $schema) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on StoreSchemaResult {
...StoreSchemaResultFragment
}
}
}
{"schema": SchemaInput}
{"data": {"storeSchema": BadRequestError}}
Arguments
Name | Description |
---|---|
schema - SchemaInput! |
syncCustomAccounts
#View the Syncing Custom Accounts docs.
ResponseReturns a SyncCustomAccountsResponse
mutation SyncCustomAccounts(
$accounts: [CustomAccountInput!]!,
$link: LinkMatchInput!
) {
syncCustomAccounts(
accounts: $accounts,
link: $link
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on SyncCustomAccountsResult {
...SyncCustomAccountsResultFragment
}
}
}
{
"accounts": [CustomAccountInput],
"link": LinkMatchInput
}
{"data": {"syncCustomAccounts": BadRequestError}}
Arguments
Name | Description |
---|---|
accounts - [CustomAccountInput!]! | A list of external accounts to sync |
link - LinkMatchInput! | An object containing the ID of custom link created by createCustomLink |
syncCustomTxs
#View the Syncing Custom Transactions docs.
ResponseReturns a SyncCustomTxsResponse
mutation SyncCustomTxs(
$link: LinkMatchInput!,
$txs: [CustomTxInput!]!
) {
syncCustomTxs(
link: $link,
txs: $txs
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on SyncCustomTxsResult {
...SyncCustomTxsResultFragment
}
}
}
{
"link": LinkMatchInput,
"txs": [CustomTxInput]
}
{"data": {"syncCustomTxs": BadRequestError}}
Arguments
Name | Description |
---|---|
link - LinkMatchInput! | An object containing the ID of custom link created by createCustomLink |
txs - [CustomTxInput!]! | A list of external transactions to sync |
updateLedger
#View the Updating Ledgers section of the docs.
ResponseReturns an UpdateLedgerResponse
mutation UpdateLedger(
$ledger: LedgerMatchInput!,
$update: UpdateLedgerInput!
) {
updateLedger(
ledger: $ledger,
update: $update
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on UpdateLedgerResult {
...UpdateLedgerResultFragment
}
}
}
{
"ledger": LedgerMatchInput,
"update": UpdateLedgerInput
}
{"data": {"updateLedger": BadRequestError}}
Arguments
Name | Description |
---|---|
ledger - LedgerMatchInput! | An object containing the ID of the ledger to update |
update - UpdateLedgerInput! | The payload containing the fields to update. Currency, only the name can be updated. |
updateLedgerAccount
#View the Updating Ledger Accounts section of the docs.
ResponseReturns an UpdateLedgerAccountResponse
mutation UpdateLedgerAccount(
$ledgerAccount: LedgerAccountMatchInput!,
$update: UpdateLedgerAccountInput!
) {
updateLedgerAccount(
ledgerAccount: $ledgerAccount,
update: $update
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on UpdateLedgerAccountResult {
...UpdateLedgerAccountResultFragment
}
}
}
{
"ledgerAccount": LedgerAccountMatchInput,
"update": UpdateLedgerAccountInput
}
{"data": {"updateLedgerAccount": BadRequestError}}
Arguments
Name | Description |
---|---|
ledgerAccount - LedgerAccountMatchInput! | An object containing the ID of the ledger account to update |
update - UpdateLedgerAccountInput! | The payload containing the fields to update. Currency, only the name can be updated. |
AddLedgerEntryResponse
#AddLedgerEntryResult
#{
"entry": LedgerEntry,
"isIkReplay": true,
"lines": [LedgerLine]
}
Field Name | Description |
---|---|
entry - LedgerEntry! | The ledger entry that was posted |
isIkReplay - Boolean! | True if this request successfully completed before and the previous response is being returned |
lines - [LedgerLine!]! | The ledger lines that were created in that entry |
BadRequestError
#Equivalent to an HTTP 400 - request either has missing or incorrect data
{
"code": "abc123",
"message": "xyz789",
"retryable": false
}
Field Name | Description |
---|---|
code - String! | The HTTP status code corresponding to the error |
message - String! | The error message |
retryable - Boolean! | Whether or not the operation is retryable |
BankTransfer
#{
"description": "abc123",
"id": "4",
"order": Order,
"status": "failed"
}
Field Name | Description |
---|---|
description - String! | |
id - ID! | |
order - Order! | Internally, BankTransfers are stored as Orders. |
status - BankTransferStateMachineStatus! |
BankTransferStateMachine
#{
"status": "failed",
"transitionLog": [BankTransferStateMachineTransitionLog]
}
Field Name | Description |
---|---|
status - BankTransferStateMachineStatus! | |
transitionLog - [BankTransferStateMachineTransitionLog!]! |
BankTransferStateMachineConfigInput
#{"transitions": BankTransferStateMachineTransitionsInput}
Input Field | Description |
---|---|
transitions - BankTransferStateMachineTransitionsInput! |
BankTransferStateMachineEffect
#{"entry": LedgerEntry}
Field Name | Description |
---|---|
entry - LedgerEntry! | The side effect that was automatically applied |
BankTransferStateMachineEffectInput
#The side effect that is automatically applied when this state transition occurs
{"entry": LedgerEntryInput}
Input Field | Description |
---|---|
entry - LedgerEntryInput! |
BankTransferStateMachineInput
#{"config": BankTransferStateMachineConfigInput}
Input Field | Description |
---|---|
config - BankTransferStateMachineConfigInput! |
BankTransferStateMachineStatus
#"failed"
Enum Value | Description |
---|---|
failed | |
returned | |
settled | |
submitted |
BankTransferStateMachineTransition
#"failed_to_submitted"
Enum Value | Description |
---|---|
failed_to_submitted | |
on_submitted | |
returned_to_submitted | |
settled_to_returned | |
submitted_to_failed | |
submitted_to_settled |
BankTransferStateMachineTransitionLog
#{
"effect": BankTransferStateMachineEffect,
"timestamp": "2007-12-03T10:15:30Z",
"transition": "failed_to_submitted"
}
Field Name | Description |
---|---|
effect - BankTransferStateMachineEffect | |
timestamp - DateTime | |
transition - BankTransferStateMachineTransition! |
BankTransferStateMachineTransitionsInput
#A mapping of bank transfer state transition -> side effect for a bank transfer.
{
"failed_to_submitted": BankTransferStateMachineEffectInput,
"on_submitted": BankTransferStateMachineEffectInput,
"returned_to_submitted": BankTransferStateMachineEffectInput,
"settled_to_returned": BankTransferStateMachineEffectInput,
"submitted_to_failed": BankTransferStateMachineEffectInput,
"submitted_to_settled": BankTransferStateMachineEffectInput
}
Input Field | Description |
---|---|
failed_to_submitted - BankTransferStateMachineEffectInput | The state transition that occurs when a failed Order is re-submitted. This retry mechanism is currently not supported. |
on_submitted - BankTransferStateMachineEffectInput | The state transition that occurs when createOrder is called (i.e. submitted). |
returned_to_submitted - BankTransferStateMachineEffectInput | The state transition that occurs when a returned Order is re-submitted. This retry mechanism is currently not supported. |
settled_to_returned - BankTransferStateMachineEffectInput | The state transition that occurs when a settled payment later is returned / reversed. This can happen due to fraud. |
submitted_to_failed - BankTransferStateMachineEffectInput | The state transition that occurs if a Order fails after it is successfully submitted but before it settles (e.g. insufficient funds on an ACH debit). |
submitted_to_settled - BankTransferStateMachineEffectInput! | The state transition that occurs when a successfully submitted Order settles at your bank (i.e. the payment "clears"). |
Boolean
#The Boolean scalar type represents true or false.
true
CreateCustomCurrencyInput
#{
"customCode": "xyz789",
"customCurrencyId": "some-safe-string-ik",
"name": "abc123",
"precision": 123
}
Input Field | Description |
---|---|
customCode - String! | The currency code for custom currencies. It can be up to 5 characters long. This is used for display purposes. |
customCurrencyId - SafeString! | The ID for a custom currency. This is specified when creating the custom currency using the createCustomCurrency mutation. |
name - String! | A human readable name for the currency (e.g. United States Dollar). This is used for display purposes. |
precision - Int! | The number of decimal places this currency goes to. For example, United States Dollars have a precision of 2 (i.e. 100 cents in a dollar), whereas the Jordanian Dinar has a precision of 3. This is used for display purposes. |
CreateCustomCurrencyResponse
#CreateCustomLinkResponse
#CreateLedgerAccountInput
#{
"currency": CurrencyMatchInput,
"currencyMode": "multi",
"linkedAccount": ExternalAccountMatchInput,
"name": "xyz789",
"parent": LedgerAccountMatchInput,
"type": "asset"
}
Input Field | Description |
---|---|
currency - CurrencyMatchInput | The currency of this ledger account. If this is not set, and currencyMode is not set to multi, the workspace level default is used. |
currencyMode - CurrencyMode | If set to multi, creates a multi-currency account |
linkedAccount - ExternalAccountMatchInput | The external account to link to this ledger account |
name - String! | The name of your ledger account |
parent - LedgerAccountMatchInput | The parent of this ledger account |
type - LedgerAccountTypes | The type of ledger account to create. Required if this is a top-level ledger account. |
CreateLedgerAccountResponse
#CreateLedgerAccountResult
#{"isIkReplay": true, "ledgerAccount": LedgerAccount}
Field Name | Description |
---|---|
isIkReplay - Boolean! | true if a previous request successfully created this ledger account |
ledgerAccount - LedgerAccount! | The ledger account that was created |
CreateLedgerAccountsInput
#{
"childLedgerAccounts": [CreateLedgerAccountsInput],
"currency": CurrencyMatchInput,
"currencyMode": "multi",
"ik": "some-safe-string-ik",
"linkedAccount": ExternalAccountMatchInput,
"name": "abc123",
"parent": LedgerAccountMatchInput,
"type": "asset"
}
Input Field | Description |
---|---|
childLedgerAccounts - [CreateLedgerAccountsInput!] | Ledger accounts to create as children of this ledger account |
currency - CurrencyMatchInput | The currency of this ledger account. If this is not set, the workspace level default is used. |
currencyMode - CurrencyMode | The currency of this ledger account. If this is not set, the workspace level default is used. |
ik - SafeString! | The idempotency key for creating this ledger account. You can also use the ik to identify this account in the response, so that you can store its Fragment ID |
linkedAccount - ExternalAccountMatchInput | The external account to link to this ledger account. Can only be specified on leaf ledger accounts |
name - String! | |
parent - LedgerAccountMatchInput | The parent of this ledger account, only valid on the top level accounts in the payload |
type - LedgerAccountTypes | Only required if this is a top level account in the ledger. Otherwise the type will get inherited from its parent account |
CreateLedgerAccountsResponse
#CreateLedgerAccountsResult
#{
"ikReplays": [IkReplay],
"ledgerAccounts": [LedgerAccount]
}
Field Name | Description |
---|---|
ikReplays - [IkReplay!]! | Whether the ledger accounts were successfully created by a previous request |
ledgerAccounts - [LedgerAccount!]! | The ledger accounts that were created |
CreateLedgerInput
#{
"balanceUTCOffset": UTCOffset,
"name": "xyz789",
"type": "double"
}
Input Field | Description |
---|---|
balanceUTCOffset - UTCOffset | When aggregating balances, all transactions within a 24 hour period starting at midnight UTC are included in each day. You can specify a different starting hour for this balances in this ledger e.g. "-08:00" to align balances with Pacific Standard Time |
name - String! | |
type - LedgerTypes |
CreateLedgerResponse
#CreateOrderInput
#{
"description": "abc123",
"entry": LedgerEntryInput,
"stateMachine": CreateOrderStateMachineInput
}
Input Field | Description |
---|---|
description - String | |
entry - LedgerEntryInput | The entry to post on bank transfer settlement. This is the same as specifying stateMachine.payment.submitted_to_settled |
stateMachine - CreateOrderStateMachineInput | A configuration representing the state machine for this Order. Currently, only bank transfer state machines are supported, but in the future we plan to extend this API to support more Order types (e.g: crypto transfers, brokerage orders) |
CreateOrderResponse
#CreateOrderResult
#{
"entry": LedgerEntry,
"isIkReplay": false,
"lines": [LedgerLine],
"order": Order
}
Field Name | Description |
---|---|
entry - LedgerEntry! | The ledger entry that was posted |
isIkReplay - Boolean! | true if this request successfully completed before and the previous response is being returned |
lines - [LedgerLine!] | The ledger lines that were created in that entry |
order - Order! | The order that was created |
CreateOrderStateMachineInput
#{"bankTransfer": BankTransferStateMachineInput}
Input Field | Description |
---|---|
bankTransfer - BankTransferStateMachineInput! |
Currency
#{
"code": "AAVE",
"customCode": "abc123",
"customCurrencyId": "some-safe-string-ik",
"name": "xyz789",
"precision": 987
}
Field Name | Description |
---|---|
code - CurrencyCode! | The currency code. This is an enum type . |
customCode - String | The currency code for custom currencies. This is only set if 'currency' is set to CUSTOM. It can be up to 32 characters long. |
customCurrencyId - SafeString | The ID for a custom currency. This is specified when creating the custom currency using the createCustomCurrency mutation. |
name - String! | A human readable name for the currency (e.g. United States Dollar). This is used for display purposes. |
precision - Int! | The number of decimal places this currency goes to. For example, United States Dollars have a precision of 2 (i.e. 100 cents in a dollar), whereas the Jordanian Dinar has a precision of 3. This is used for display purposes. |
CurrencyAmountConnection
#A pageable list of amounts with their currencies
{
"nodes": [CurrencyAmount],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [CurrencyAmount!] | The current page of results |
pageInfo - PageInfo! | Pagination info for this list |
CurrencyCode
#"AAVE"
Enum Value | Description |
---|---|
AAVE | |
ADA | |
AED | |
AFN | |
ALL | |
AMD | |
ANG | |
AOA | |
ARS | |
AUD | |
AWG | |
AZN | |
BAM | |
BBD | |
BCH | |
BDT | |
BGN | |
BHD | |
BIF | |
BMD | |
BND | |
BOB | |
BRL | |
BSD | |
BTC | |
BTN | |
BWP | |
BYR | |
BZD | |
CAD | |
CDF | |
CHF | |
CLP | |
CNY | |
COP | |
CRC | |
CUC | |
CUP | |
CUSTOM | |
CVE | |
CZK | |
DAI | |
DJF | |
DKK | |
DOP | |
DZD | |
EGP | |
ERN | |
ETB | |
ETH | |
EUR | |
FJD | |
FKP | |
GBP | |
GEL | |
GGP | |
GHS | |
GIP | |
GMD | |
GNF | |
GTQ | |
GYD | |
HKD | |
HNL | |
HRK | |
HTG | |
HUF | |
IDR | |
ILS | |
IMP | |
INR | |
IQD | |
IRR | |
ISK | |
JMD | |
JOD | |
JPY | |
KES | |
KGS | |
KHR | |
KMF | |
KPW | |
KRW | |
KWD | |
KYD | |
KZT | |
LAK | |
LBP | |
LINK | |
LKR | |
LOGICAL | |
LRD | |
LSL | |
LTC | |
LYD | |
MAD | |
MATIC | |
MDL | |
MGA | |
MKD | |
MMK | |
MNT | |
MOP | |
MUR | |
MVR | |
MWK | |
MXN | |
MYR | |
MZN | |
NAD | |
NGN | |
NIO | |
NOK | |
NPR | |
NZD | |
OMR | |
PAB | |
PEN | |
PGK | |
PHP | |
PKR | |
PLN | |
PYG | |
QAR | |
RON | |
RSD | |
RUB | |
RWF | |
SAR | |
SBD | |
SCR | |
SDG | |
SEK | |
SGD | |
SHP | |
SLL | |
SOL | |
SOS | |
SPL | |
SRD | |
STN | |
SVC | |
SYP | |
SZL | |
THB | |
TJS | |
TMT | |
TND | |
TOP | |
TRY | |
TTD | |
TVD | |
TWD | |
TZS | |
UAH | |
UGX | |
UNI | |
USD | |
USDC | |
USDT | |
UYU | |
UZS | |
VEF | |
VND | |
VUV | |
WST | |
XAF | |
XCD | |
XLM | |
XOF | |
XPF | |
YER | |
ZAR | |
ZMW |
CurrencyMatchInput
#{"code": "AAVE", "customCurrencyId": "some-safe-string-ik"}
Input Field | Description |
---|---|
code - CurrencyCode! | The currency code. This is an enum type. |
customCurrencyId - SafeString | The ID for a custom currency. This is specified when creating the custom currency using the createCustomCurrency mutation. |
CurrencyMode
#Defines the currency handling of a LedgerAccount, which can either be restricted to a single currency or allow multiple currencies.
"multi"
Enum Value | Description |
---|---|
multi | |
single |
CustomAccountInput
#{
"currency": CurrencyMatchInput,
"currencyMode": "multi",
"externalId": "some-safe-string-ik",
"name": "xyz789"
}
Input Field | Description |
---|---|
currency - CurrencyMatchInput | The currency of this external account. If this is not set, the workspace level default is used. |
currencyMode - CurrencyMode | The currency mode of this external account. If set to multi, creates a multi-currency account. |
externalId - SafeString! | The ID of this account at the external system. |
name - String! | The name of the account at the external system. |
CustomTxInput
#{
"account": ExternalAccountMatchInput,
"amount": Int64,
"currency": CurrencyMatchInput,
"description": "abc123",
"externalId": "some-safe-string-ik",
"posted": "2007-12-03T10:15:30Z"
}
Input Field | Description |
---|---|
account - ExternalAccountMatchInput! | |
amount - Int64! | |
currency - CurrencyMatchInput | The currency of this tx. Should be set for multi-currency accounts. |
description - String! | |
externalId - SafeString! | |
posted - DateTime! |
Date
#ISO 8601 Date e.g. 2020-01-01
"2007-12-03"
DateTime
#ISO 8601 DateTime e.g. 2020-01-01T14:48:00.000Z
"2007-12-03T10:15:30Z"
ExternalAccount
#{
"currency": Currency,
"currencyMode": "multi",
"externalId": 4,
"id": 4,
"linkId": "4",
"name": "abc123"
}
Field Name | Description |
---|---|
currency - Currency | The currency of this external account. |
currencyMode - CurrencyMode! | Indicates if the account allows multiple currencies or is restricted to a single currency |
externalId - ID! | ID used for the external account |
id - ID! | Fragment ID of External Account |
linkId - ID! | Fragment ID of this transaction's external link |
name - String! |
ExternalAccountFilter
#{
"equalTo": ExternalAccountMatchInput,
"in": [ExternalAccountMatchInput]
}
Input Field | Description |
---|---|
equalTo - ExternalAccountMatchInput | Ledger account must linked to the the specified external account |
in - [ExternalAccountMatchInput!] | Ledger account can be linked to any of the specified external accounts |
ExternalAccountMatchInput
#Specify an external account either by its Fragment ID, or a combination of the Fragment Link ID it belongs to, and its ID at the banks
{"externalId": 4, "id": 4, "linkId": 4}
Input Field | Description |
---|---|
externalId - ID | The External systems's ID of the account |
id - ID | The Fragment ID of the external account |
linkId - ID | The Fragment ID of the link |
ExternalTransferType
#"ach"
Enum Value | Description |
---|---|
ach | |
internal | |
wire |
ID
#The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
4
IkReplay
#{"ik": "some-safe-string-ik", "isIkReplay": true}
Field Name | Description |
---|---|
ik - SafeString! | |
isIkReplay - Boolean! |
IncreaseEnv
#"production"
Enum Value | Description |
---|---|
production | |
sandbox |
IncreaseLink
#{
"created": "abc123",
"id": "4",
"increaseEnv": "production",
"name": "xyz789"
}
Field Name | Description |
---|---|
created - String! | |
id - ID! | |
increaseEnv - IncreaseEnv! | |
name - String! |
IncreasePaymentDetailsInput
#{"wire": IncreaseWirePaymentDetailsInput}
Input Field | Description |
---|---|
wire - IncreaseWirePaymentDetailsInput |
IncreaseWirePaymentDetailsInput
#Int
#The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
123
Int64
#A string representing integers up to 9,223,372,036,854,775,807 (i.e. 2^63-1)
Int64
InternalError
#Equivalent to an HTTP 5XX - something went wrong with our API.
{
"code": "abc123",
"message": "abc123",
"retryable": true
}
Field Name | Description |
---|---|
code - String! | The HTTP status code corresponding to the error |
message - String! | The error message |
retryable - Boolean! | Whether or not the operation is retryable |
LastMoment
#The last moment of a specific year, month or day or hour e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02
LastMoment
Ledger
#Ledgers are databases designed for managing money
{
"balanceUTCOffset": UTCOffset,
"created": "2007-12-03T10:15:30Z",
"id": 4,
"ik": "some-safe-string-ik",
"ledgerAccounts": LedgerAccountsConnection,
"ledgerEntries": LedgerEntriesConnection,
"migrations": LedgerMigrationConnection,
"name": "abc123",
"schema": Schema,
"type": "double",
"workspaceId": "4"
}
Field Name | Description |
---|---|
balanceUTCOffset - UTCOffset! | When aggregating balances, all transactions within a 24 hour period starting at midnight UTC plus this offset are included in each day. |
created - DateTime! | |
id - ID! | |
ik - SafeString! | The IK passed into the createLedger mutation. This is treated as a unique identifier for this ledger. |
ledgerAccounts - LedgerAccountsConnection | Query LedgerAccounts in Ledger |
Arguments after - String Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about pagination. before - String Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about pagination. filter - LedgerAccountsFilterSet Filter the ledger accounts returned. Learn more about filtering. first - Int How many ledger accounts to return per page, when paginating forwards. Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. last - Int How many ledger accounts to return per page, when paginating backwards. Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. | |
ledgerEntries - LedgerEntriesConnection | Query LedgerEntries in Ledger |
Arguments after - String Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about pagination. before - String Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about pagination. filter - LedgerEntriesFilterSet Filter the ledger entries returned. Learn more about filtering. first - Int How many ledger entries to return per page, when paginating forwards. Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. last - Int How many ledger entries to return per page, when paginating backwards. Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. | |
migrations - LedgerMigrationConnection | Schema migrations affecting this ledger. |
name - String! | The name of the ledger. Can be updated with the updateLedger mutation. |
schema - Schema | Schema key associated with this ledger. |
type - LedgerTypes! | |
workspaceId - ID! |
LedgerAccount
#A ledger account is a container for money
{
"balance": Int64,
"balanceChange": Int64,
"balanceChanges": CurrencyAmountConnection,
"balances": CurrencyAmountConnection,
"childBalance": Int64,
"childBalanceChange": Int64,
"childBalanceChanges": CurrencyAmountConnection,
"childBalances": CurrencyAmountConnection,
"created": "2007-12-03T10:15:30Z",
"currency": Currency,
"currencyMode": "multi",
"id": "4",
"ik": "abc123",
"ikPath": "abc123",
"ledger": Ledger,
"ledgerId": 4,
"lines": LedgerLinesConnection,
"link": Link,
"linkedAccount": ExternalAccount,
"name": "abc123",
"ownBalance": Int64,
"ownBalanceChange": Int64,
"ownBalances": CurrencyAmountConnection,
"parentLedgerAccount": LedgerAccount,
"parentLedgerAccountId": "4",
"path": "xyz789",
"type": "asset",
"unreconciledTxs": TxsConnection,
"workspaceId": 4
}
Field Name | Description |
---|---|
balance - Int64! | Total of all lines in this ledger account and child ledger accounts of the same currency as this ledger account |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-03 or 1969-07-21T02 currency - CurrencyMatchInput | |
balanceChange - Int64! | How much did the this ledger account's balance change during the specified period. This query will include all child accounts in the same currency as this ledger account. |
Arguments currency - CurrencyMatchInput period - Period! Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
balanceChanges - CurrencyAmountConnection! | How much did the this ledger account's balances change during the specified period. This query will include all child accounts of all currencies |
Arguments period - Period! Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
balances - CurrencyAmountConnection! | Total of all lines in this ledger account and child ledger accounts in all currencies |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
childBalance - Int64! | Total of all lines in child ledger accounts of the same currency as this ledger account |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 currency - CurrencyMatchInput | |
childBalanceChange - Int64! | How much did the this ledger account's childBalance change during the specified period. This query will only include child accounts which are in the same currency as this one. See childBalanceChanges to include children of different currencies. |
Arguments currency - CurrencyMatchInput period - Period! Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
childBalanceChanges - CurrencyAmountConnection! | How much did the this ledger account's child accounts' balances change during the specified period. This query will include all child accounts of all currencies |
Arguments period - Period! Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
childBalances - CurrencyAmountConnection! | Total of all lines in child ledger accounts of this ledger in all currencies |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
created - DateTime! | |
currency - Currency | Currency of this ledger account |
currencyMode - CurrencyMode! | Indicates if the account allows multiple currencies or is restricted to a single currency |
id - ID! | |
ik - String! | The idempotency key used to create this account |
ikPath - String! | The unique IK Path of the ledger account. This is a slash-delimited string containing the IK of an account and all its direct ancestors. |
ledger - Ledger! | Ledger this account is in |
ledgerId - ID! | ID of the ledger this account is in |
lines - LedgerLinesConnection! | List lines in this account, sorted in reverse chronological order |
Arguments after - String Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about pagination. before - String Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about pagination. filter - LedgerLinesFilterSet Filter the ledger lines returned. Learn more about filtering. first - Int How many ledger lines to return per page, when paginating forwards. Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. last - Int How many ledger lines to return per page, when paginating backwards. Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. | |
link - Link | The Link for the External Account that is linked to this ledger account |
linkedAccount - ExternalAccount | External Account that is linked to this ledger account |
name - String | |
ownBalance - Int64! | Total of all lines in this ledger account, excluding all child ledger accounts |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 currency - CurrencyMatchInput | |
ownBalanceChange - Int64! | How much did the this ledger account's ownBalance change during the specified period. This query will exclude all child accounts. |
Arguments currency - CurrencyMatchInput period - Period! Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
ownBalances - CurrencyAmountConnection! | Total of all lines across all currencies in this ledger account, excluding all child ledger accounts |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
parentLedgerAccount - LedgerAccount | The parent ledger account of this ledger account |
parentLedgerAccountId - ID | ID of the parent ledger account of this ledger account |
path - String! | The unique Path of the ledger account. This is a slash-delimited string containing the location of an account in its chart of accounts. For accounts created with a schema, this will be composed of account keys. Else, for accounts created with the createLedgerAccounts API, this will be composed of the IKs of an account and its ancestors. |
type - LedgerAccountTypes! | |
unreconciledTxs - TxsConnection | A list of external account transactions that haven't been reconciled to this ledger account yet. Only populated for linked ledger accounts |
Arguments after - String Where to start paginating from, when paginating forwards. Send endCursor from a response to get its next page. Learn more about pagination. before - String Where to start paginating from, when paginating backwards. Send startCursor from a response to get the previous page. Learn more about pagination. first - Int How many unreconciled transactions to return per page, when paginating forwards. Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. last - Int How many unreconciled transactions to return per page, when paginating backwards. Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. | |
workspaceId - ID! |
LedgerAccountFilter
#{
"equalTo": LedgerAccountMatchInput,
"in": [LedgerAccountMatchInput]
}
Input Field | Description |
---|---|
equalTo - LedgerAccountMatchInput | Result must be the specified ledger account |
in - [LedgerAccountMatchInput!] | Results can be any of specified ledger accounts |
LedgerAccountMatchInput
#{
"id": "4",
"ikPath": "xyz789",
"ledger": LedgerMatchInput
}
Input Field | Description |
---|---|
id - ID | The Fragment ID of the ledger account |
ikPath - String | The unique IK Path of the ledger account. This is a slash-delimited string containing the IK of an account and all its direct ancestors. |
ledger - LedgerMatchInput |
LedgerAccountTypeFilter
#{"equalTo": "asset", "in": ["asset"]}
Input Field | Description |
---|---|
equalTo - LedgerAccountTypes | Results must have the specified ledger account type |
in - [LedgerAccountTypes!] | Results can have any of the specified ledger account types |
LedgerAccountTypes
#"asset"
Enum Value | Description |
---|---|
asset | |
expense | |
income | |
liability |
LedgerAccountsConnection
#{
"nodes": [LedgerAccount],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [LedgerAccount!] | |
pageInfo - PageInfo! |
LedgerAccountsFilterSet
#{
"hasParentLedgerAccount": true,
"isLinkedAccount": false,
"ledgerAccount": LedgerAccountFilter,
"linkedAccount": ExternalAccountFilter,
"parentLedgerAccount": LedgerAccountFilter,
"type": LedgerAccountTypeFilter
}
Input Field | Description |
---|---|
hasParentLedgerAccount - Boolean | Use to filter ledger accounts by their parent status |
isLinkedAccount - Boolean | Use to filter ledger accounts by their linked status |
ledgerAccount - LedgerAccountFilter | Use to filter ledger accounts by their IDs |
linkedAccount - ExternalAccountFilter | Use to filter ledger accounts by their external linked account ID |
parentLedgerAccount - LedgerAccountFilter | Use to filter ledger accounts by their parent account IDs |
type - LedgerAccountTypeFilter | Use to filter ledger accounts by their type |
LedgerEntriesConnection
#{
"nodes": [LedgerEntry],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [LedgerEntry!] | |
pageInfo - PageInfo! |
LedgerEntriesFilterSet
#{
"date": DateFilter,
"posted": DateTimeFilter
}
Input Field | Description |
---|---|
date - DateFilter | |
posted - DateTimeFilter |
LedgerEntry
#{
"created": "2007-12-03T10:15:30Z",
"date": "2007-12-03",
"description": "abc123",
"id": 4,
"ledger": Ledger,
"ledgerId": 4,
"lines": LedgerLinesConnection,
"order": Order,
"orderId": "4",
"posted": "2007-12-03T10:15:30Z",
"workspaceId": 4
}
Field Name | Description |
---|---|
created - DateTime! | ISO-8601 timestamp this LedgerEntry was created in Fragment |
date - Date! | Date this LedgerEntry posted to its Ledger e.g. "2021-01-01" |
description - String | Description posted for this ledger entry |
id - ID! | |
ledger - Ledger! | Ledger this ledger entry is in |
ledgerId - ID! | ID of the ledger this ledger entry is in |
lines - LedgerLinesConnection! | Lines posted in this ledger entry |
order - Order | The order associated with this ledger entry |
orderId - ID | Order ID if this entry was posted due to an Order |
posted - DateTime! | ISO-8601 timestamp this LedgerEntry posted to its Ledger |
workspaceId - ID! |
LedgerEntryInput
#{
"description": "abc123",
"lines": [LedgerLineInput],
"posted": "2007-12-03T10:15:30Z"
}
Input Field | Description |
---|---|
description - String | If specified, will also be used as the description for LedgerLines, payments and transfers unless they specify their own description |
lines - [LedgerLineInput!]! | |
posted - DateTime | ISO 8601 timestamp to post this ledger entry e.g. "2021-01-01" or "2021-01-01T16:45:00Z". Will error out if supplied to reconcileTx or createOrder since the transaction timestamp will be used instead |
LedgerLine
#{
"account": LedgerAccount,
"accountId": "4",
"amount": Int64,
"created": "2007-12-03T10:15:30Z",
"currency": Currency,
"date": "2007-12-03",
"description": "abc123",
"externalTransferId": "abc123",
"externalTransferType": "ach",
"externalTxId": "xyz789",
"id": "4",
"ledger": Ledger,
"ledgerEntryId": 4,
"ledgerId": 4,
"otherTxExternalAccountExternalId": "abc123",
"otherTxExternalAccountId": "xyz789",
"otherTxExternalId": "xyz789",
"otherTxId": "abc123",
"posted": "2007-12-03T10:15:30Z",
"txId": "abc123",
"type": "credit",
"workspaceId": 4
}
Field Name | Description |
---|---|
account - LedgerAccount! | LedgerAccount that contains this line |
accountId - ID! | |
amount - Int64! | How much this line's LedgerAccount's balance changed in integer cents (i.e. in USD 100 is 1 dollar, 100 cents) |
Arguments absolute - Boolean If the absolute flag is passed, amount will always a positive integer in cents. Refer to type to see if this LedgerLine increased or decreased it's LedgerAccount's balance | |
created - DateTime | ISO-8601 timestamp this LedgerLine was created in Fragment |
currency - Currency | Currency of this line |
date - Date | Date this LedgerLine posted to its LedgerAccount e.g. "2021-01-01" |
description - String | |
externalTransferId - String | ID in the external system of the payment or transfer that created the transaction linked to this LedgerLine |
externalTransferType - ExternalTransferType | Whether the transaction linked to this LedgerLine was a payment or transfer |
externalTxId - String | ID in the external system of the transaction linked to this line |
id - ID! | |
ledger - Ledger! | |
ledgerEntryId - ID | LedgerEntry that contains this line |
ledgerId - ID! | Ledger that contains this line |
otherTxExternalAccountExternalId - String | ID in the external system of destination or source bank account for an internal bank transfer. Only for internal bank transfers - see otherTxId |
otherTxExternalAccountId - String | Fragment ID of destination or source bank account. Only for internal bank transfers - see otherTxId |
otherTxExternalId - String | ID in the external system of transaction in the destination or source bank account. Only for internal bank transfers - see otherTxId |
otherTxId - String | Fragment ID of the transaction in the destination account (if sending money from this account) or source account (if pulling money into this account). Only applicable if this line is linked to a transaction created through an internal transfer |
posted - DateTime | ISO-8601 timestamp this LedgerLine posted to its LedgerAccount |
txId - String | Fragment ID of the transaction linked to this line |
type - TxType! | credit or debit |
workspaceId - ID! |
LedgerLineInput
#{
"account": LedgerAccountMatchInput,
"amount": Int64,
"currency": CurrencyMatchInput,
"description": "xyz789",
"payment": PaymentInput,
"tx": TxMatchInput
}
Input Field | Description |
---|---|
account - LedgerAccountMatchInput! | The LedgerAccount this line is being added to |
amount - Int64 | A positive amount increases the balance of its LedgerAccount, a negative amount reduces the balance of its LedgerAccount |
currency - CurrencyMatchInput | The currency the ledger line is in |
description - String | If not specified the description from the parent LedgerEntryInput will be used |
payment - PaymentInput | Required for createOrder if adding a line to a linked ledger account |
tx - TxMatchInput | Required for reconcileTx to specify the transaction being reconciled, you can specify either the Fragment ID or external ID of the transaction |
LedgerLinesConnection
#{
"nodes": [LedgerLine],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [LedgerLine!] | |
pageInfo - PageInfo! |
LedgerLinesFilterSet
#{
"date": DateFilter,
"posted": DateTimeFilter,
"type": TxTypeFilter
}
Input Field | Description |
---|---|
date - DateFilter | |
posted - DateTimeFilter | |
type - TxTypeFilter |
LedgerMatchInput
#{"id": 4, "ik": "some-safe-string-ik"}
Input Field | Description |
---|---|
id - ID | The Fragment ID of the ledger |
ik - SafeString | The IK passed into the createLedger mutation. This is treated as a second unique identifier for this ledger. |
LedgerMigration
#{
"ledger": Ledger,
"schemaVersion": SchemaVersion,
"status": "completed"
}
Field Name | Description |
---|---|
ledger - Ledger! | |
schemaVersion - SchemaVersion! | |
status - LedgerMigrationStatus! |
LedgerMigrationConnection
#{
"nodes": [LedgerMigration],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [LedgerMigration!]! | |
pageInfo - PageInfo! |
LedgerMigrationStatus
#"completed"
Enum Value | Description |
---|---|
completed | |
failed | |
queued | |
skipped | |
started |
LedgerTypeFilter
#{"equalTo": "double", "in": ["double"]}
Input Field | Description |
---|---|
equalTo - LedgerTypes | |
in - [LedgerTypes!] |
LedgerTypes
#"double"
Enum Value | Description |
---|---|
double |
LedgersFilterSet
#MakeBankTransferInput
#{
"amount": Int64,
"description": "xyz789",
"linkedLedgerAccount": LedgerAccountMatchInput,
"offset": LedgerEntryInput,
"payment": PaymentInput
}
Input Field | Description |
---|---|
amount - Int64! | Positive amount of the transfer being made. |
description - String! | Required. Lines without a description will have their description set to the one provided. |
linkedLedgerAccount - LedgerAccountMatchInput! | The linked LedgerAccount against which this transfer will be made. |
offset - LedgerEntryInput! | The offsetting entry to post on bank transfer settlement. The ledger line for the transfer against the linked account will be included, by default, so it's not required to include the linked account. |
payment - PaymentInput! | Payment information for the account the pay in/out is made from. |
MakeBankTransferResponse
#MakeBankTransferResult
#{"bankTransfer": BankTransfer, "isIkReplay": true}
Field Name | Description |
---|---|
bankTransfer - BankTransfer! | The bank transfer that was created |
isIkReplay - Boolean! | true if this request successfully completed before and the previous response is being returned |
Order
#{
"description": "xyz789",
"entryIds": ["abc123"],
"id": "4",
"stateMachine": OrderStateMachine
}
Field Name | Description |
---|---|
description - String | |
entryIds - [String!] | |
id - ID! | |
stateMachine - OrderStateMachine! |
OrderStateMachine
#{"bankTransfer": BankTransferStateMachine}
Field Name | Description |
---|---|
bankTransfer - BankTransferStateMachine |
PayeeInput
#{
"accountNumber": "abc123",
"externalAccount": ExternalAccountMatchInput,
"routingNumber": "xyz789"
}
Input Field | Description |
---|---|
accountNumber - String | |
externalAccount - ExternalAccountMatchInput | |
routingNumber - String |
PaymentDetailsInput
#{"increase": IncreasePaymentDetailsInput}
Input Field | Description |
---|---|
increase - IncreasePaymentDetailsInput |
PaymentInput
#{
"description": "xyz789",
"destination": PayeeInput,
"details": PaymentDetailsInput,
"source": PayeeInput,
"type": "ach"
}
Input Field | Description |
---|---|
description - String | If specified will override the payment description sent, otherwise the line description will be used |
destination - PayeeInput | Should only be supplied if amount is negative |
details - PaymentDetailsInput | Should be used to specify additional integration-specific information |
source - PayeeInput | Should only be supplied if amount is positive and type is ACH |
type - PaymentType! | Currently only ach, wire or is supported |
PaymentType
#"ach"
Enum Value | Description |
---|---|
ach | |
internal | |
wire |
Period
#A specific year ("2021"), quarter ("2021-Q1"), month ("2021-02"), day ("2021-02-03") or hour ("2021-02-03T04")
Period
ReconcileTxResponse
#ReconcileTxResult
#{
"entry": LedgerEntry,
"isIkReplay": true,
"lines": [LedgerLine]
}
Field Name | Description |
---|---|
entry - LedgerEntry! | The ledger entry that was posted |
isIkReplay - Boolean! | True if this request successfully completed before and the previous response is being returned |
lines - [LedgerLine!]! | The ledger lines that were created in that entry |
SafeString
#A string with delimiter characters /, #, and : disallowed
"some-safe-string-ik"
Schema
#{
"key": "some-safe-string-ik",
"ledgers": LedgersConnection,
"schemaVersion": SchemaVersion,
"versions": SchemaVersionConnection
}
Field Name | Description |
---|---|
key - SafeString! | |
ledgers - LedgersConnection | |
schemaVersion - SchemaVersion! | |
Arguments version - Int | |
versions - SchemaVersionConnection! |
SchemaConnection
#{
"nodes": [Schema],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [Schema!]! | |
pageInfo - PageInfo! |
SchemaInput
#SchemaMatchInput
#{"key": "some-safe-string-ik", "version": 987}
Input Field | Description |
---|---|
key - SafeString! | Key to retrieve schema by. |
version - Int | Optional parameter to specify version of requested schema. If not provided, defaults to 0, which represents the latest available version for the provided schema key. |
SchemaVersion
#{"migrations": LedgerMigrationConnection, "version": 123}
Field Name | Description |
---|---|
migrations - LedgerMigrationConnection | |
version - Int! |
SchemaVersionConnection
#{
"nodes": [SchemaVersion],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [SchemaVersion!]! | |
pageInfo - PageInfo! |
StoreSchemaResponse
#String
#The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
"xyz789"
SyncCustomAccountsResponse
#SyncCustomAccountsResult
#{"accounts": [ExternalAccount]}
Field Name | Description |
---|---|
accounts - [ExternalAccount!]! | The external accounts that were synced. |
SyncCustomTxsResponse
#Tx
#{
"accountId": 4,
"amount": Int64,
"currency": Currency,
"date": "2007-12-03",
"description": "xyz789",
"externalAccountId": "4",
"externalId": 4,
"id": "4",
"ledgerEntries": LedgerEntriesConnection,
"ledgerEntryIds": [4],
"ledgerLineIds": ["4"],
"ledgerLines": LedgerLinesConnection,
"linkId": "4",
"posted": "2007-12-03T10:15:30Z",
"workspaceId": "4"
}
Field Name | Description |
---|---|
accountId - ID! | Fragment ID of this transaction's external account |
amount - Int64! | Integer amount in cents. Positive indicates money entering the external account, negative indicates money leaving |
currency - Currency | Currency of this Tx |
date - Date! | Date this Tx posted to the external account |
description - String! | Description at the external account (can be overridden within the Fragment Dashboard) |
externalAccountId - ID! | ID in the external system of this transaction's external account |
externalId - ID! | ID of this transaction in the external system |
id - ID! | |
ledgerEntries - LedgerEntriesConnection | Returns ledger entries that are linked to this transaction. You can link the same external account to multiple ledgers, so there could be multipe entries associated with one transaction - one for each linked ledger account this transaction has been reconciled with |
ledgerEntryIds - [ID!] | Same as ledgerEntries, but returns an array of IDs instead |
ledgerLineIds - [ID!] | Same as ledgerLines, but returns an array of IDs instead |
ledgerLines - LedgerLinesConnection | Returns ledger lines that are linked to this transaction. You can link the same external account to multiple ledgers, so there could be multipe lines associated with one transaction - one for each linked ledger account this transaction has been reconciled with |
linkId - ID! | Fragment ID of this transaction's Link |
posted - DateTime! | ISO-8601 timestamp this Tx posted to the external account |
workspaceId - ID! |
TxMatchInput
#{
"accountId": "4",
"externalAccountId": "4",
"externalId": 4,
"id": "4",
"linkId": 4
}
Input Field | Description |
---|---|
accountId - ID | The Fragment ID of the external account |
externalAccountId - ID | The external system's ID for the account |
externalId - ID | The external system's ID for the transaction |
id - ID | The Fragment ID of the transaction |
linkId - ID | The Fragment ID of the link |
TxType
#"credit"
Enum Value | Description |
---|---|
credit | |
debit |
UTCOffset
#All hour-aligned offsets from -11:00 to +12:00 are supported, e.g. "-08:00" (PT), "-05:00" (ET), "+00:00" (UTC)
UTCOffset
UpdateLedgerAccountResponse
#UpdateLedgerAccountResult
#{"ledgerAccount": LedgerAccount}
Field Name | Description |
---|---|
ledgerAccount - LedgerAccount! | The ledger account that was updated |