API Reference

A Queries#

bankTransfer

#

Get a Bank Transfer by ID

Response

Returns a BankTransfer

Query
query BankTransfer($bankTransfer: BankTransferMatchInput!) {
  bankTransfer(bankTransfer: $bankTransfer) {
    description
    id
    order {
      ...OrderFragment
    }
    status
  }
}

Variables
{"bankTransfer": BankTransferMatchInput}

Response
{
  "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

Response

Returns a Ledger

Query
query Ledger($ledger: LedgerMatchInput!) {
  ledger(ledger: $ledger) {
    balanceUTCOffset
    created
    id
    ik
    ledgerAccounts {
      ...LedgerAccountsConnectionFragment
    }
    ledgerEntries {
      ...LedgerEntriesConnectionFragment
    }
    name
    type
    workspaceId
  }
}

Variables
{"ledger": LedgerMatchInput}

Response
{
  "data": {
    "ledger": {
      "balanceUTCOffset": UTCOffset,
      "created": "2007-12-03T10:15:30Z",
      "id": "4",
      "ik": "xyz789",
      "ledgerAccounts": LedgerAccountsConnection,
      "ledgerEntries": LedgerEntriesConnection,
      "name": "xyz789",
      "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

Response

Returns a LedgerAccount

Query
query LedgerAccount($ledgerAccount: LedgerAccountMatchInput!) {
  ledgerAccount(ledgerAccount: $ledgerAccount) {
    balance
    balanceChange
    balanceChanges {
      ...CurrencyAmountConnectionFragment
    }
    balances {
      ...CurrencyAmountConnectionFragment
    }
    childBalance
    childBalanceChange
    childBalanceChanges {
      ...CurrencyAmountConnectionFragment
    }
    childBalances {
      ...CurrencyAmountConnectionFragment
    }
    created
    currency {
      ...CurrencyFragment
    }
    id
    ik
    ledger {
      ...LedgerFragment
    }
    ledgerId
    lines {
      ...LedgerLinesConnectionFragment
    }
    link {
      ...LinkFragment
    }
    linkedAccount {
      ...ExternalAccountFragment
    }
    name
    ownBalance
    ownBalanceChange
    parentLedgerAccount {
      ...LedgerAccountFragment
    }
    parentLedgerAccountId
    type
    unreconciledTxs {
      ...TxsConnectionFragment
    }
    workspaceId
  }
}

Variables
{"ledgerAccount": LedgerAccountMatchInput}

Response
{
  "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,
      "id": "4",
      "ik": 4,
      "ledger": Ledger,
      "ledgerId": "4",
      "lines": LedgerLinesConnection,
      "link": Link,
      "linkedAccount": ExternalAccount,
      "name": "abc123",
      "ownBalance": Int64,
      "ownBalanceChange": Int64,
      "parentLedgerAccount": LedgerAccount,
      "parentLedgerAccountId": "4",
      "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

Response

Returns a LedgerEntry

Query
query LedgerEntry($ledgerEntry: LedgerEntryMatchInput!) {
  ledgerEntry(ledgerEntry: $ledgerEntry) {
    created
    date
    description
    id
    ledger {
      ...LedgerFragment
    }
    ledgerId
    lines {
      ...LedgerLinesConnectionFragment
    }
    order {
      ...OrderFragment
    }
    orderId
    posted
    workspaceId
  }
}

Variables
{"ledgerEntry": LedgerEntryMatchInput}

Response
{
  "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

Response

Returns a LedgerLine

Query
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
  }
}

Variables
{"ledgerLine": LedgerLineMatchInput}

Response
{
  "data": {
    "ledgerLine": {
      "account": LedgerAccount,
      "accountId": "4",
      "amount": Int64,
      "created": "2007-12-03T10:15:30Z",
      "currency": Currency,
      "date": "2007-12-03",
      "description": "abc123",
      "externalTransferId": "xyz789",
      "externalTransferType": "ach",
      "externalTxId": "abc123",
      "id": "4",
      "ledger": Ledger,
      "ledgerEntryId": 4,
      "ledgerId": 4,
      "otherTxExternalAccountExternalId": "xyz789",
      "otherTxExternalAccountId": "xyz789",
      "otherTxExternalId": "xyz789",
      "otherTxId": "abc123",
      "posted": "2007-12-03T10:15:30Z",
      "txId": "abc123",
      "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

Response

Returns a LedgersConnection

Query
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
    }
  }
}

Variables
{
  "after": "abc123",
  "before": "abc123",
  "filter": LedgersFilterSet,
  "first": 123,
  "last": 123
}

Response
{
  "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

Response

Returns an Order

Query
query Order($order: OrderMatchInput!) {
  order(order: $order) {
    description
    entryIds
    id
    stateMachine {
      ...OrderStateMachineFragment
    }
  }
}

Variables
{"order": OrderMatchInput}

Response
{
  "data": {
    "order": {
      "description": "abc123",
      "entryIds": ["xyz789"],
      "id": "4",
      "stateMachine": OrderStateMachine
    }
  }
}

Arguments
Name Description
order - OrderMatchInput! An object specifying the ID of the order you want to query

tx

#

Get a Tx by ID

Response

Returns a Tx

Query
query Tx($tx: TxMatchInput!) {
  tx(tx: $tx) {
    accountId
    amount
    date
    description
    externalAccountId
    externalId
    id
    ledgerEntries {
      ...LedgerEntriesConnectionFragment
    }
    ledgerEntryIds
    ledgerLineIds
    ledgerLines {
      ...LedgerLinesConnectionFragment
    }
    linkId
    posted
    workspaceId
  }
}

Variables
{"tx": TxMatchInput}

Response
{
  "data": {
    "tx": {
      "accountId": "4",
      "amount": Int64,
      "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)
B Mutations#

addLedgerEntry

#

View the Add Ledger Entry section of the docs.

Response

Returns an AddLedgerEntryResponse

Query
mutation AddLedgerEntry(
  $entry: LedgerEntryInput!,
  $ik: ID!
) {
  addLedgerEntry(
    entry: $entry,
    ik: $ik
  ) {
    ... on AddLedgerEntryResult {
      ...AddLedgerEntryResultFragment
    }
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

Variables
{"entry": LedgerEntryInput, "ik": 4}

Response
{"data": {"addLedgerEntry": AddLedgerEntryResult}}

Arguments
Name Description
entry - LedgerEntryInput! An object containing the Ledger Lines as well as an optional description and posted timestamp.
ik - ID! The Idempotency Key

createCustomCurrency

#

View the Multi-Currency section of the docs.

Response

Returns a CreateCustomCurrencyResponse

Query
mutation CreateCustomCurrency($customCurrency: CreateCustomCurrencyInput!) {
  createCustomCurrency(customCurrency: $customCurrency) {
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on CreateCustomCurrencyResult {
      ...CreateCustomCurrencyResultFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

Variables
{"customCurrency": CreateCustomCurrencyInput}

Response
{"data": {"createCustomCurrency": BadRequestError}}

Arguments
Name Description
customCurrency - CreateCustomCurrencyInput! The custom currency to be created

createLedger

#

View the Ledger Creation section of the docs.

Response

Returns a CreateLedgerResponse

Query
mutation CreateLedger(
  $ik: ID!,
  $ledger: CreateLedgerInput!
) {
  createLedger(
    ik: $ik,
    ledger: $ledger
  ) {
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on CreateLedgerResult {
      ...CreateLedgerResultFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

Variables
{
  "ik": "4",
  "ledger": CreateLedgerInput
}

Response
{"data": {"createLedger": BadRequestError}}

Arguments
Name Description
ik - ID! The Idempotency Key
ledger - CreateLedgerInput! The payload representing the ledger to be created

createLedgerAccount

#

Prefer using the plural createLedgerAccounts instead

Response

Returns a CreateLedgerAccountResponse

Query
mutation CreateLedgerAccount(
  $ik: ID!,
  $ledger: LedgerMatchInput!,
  $ledgerAccount: CreateLedgerAccountInput!
) {
  createLedgerAccount(
    ik: $ik,
    ledger: $ledger,
    ledgerAccount: $ledgerAccount
  ) {
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on CreateLedgerAccountResult {
      ...CreateLedgerAccountResultFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

Variables
{
  "ik": "4",
  "ledger": LedgerMatchInput,
  "ledgerAccount": CreateLedgerAccountInput
}

Response
{"data": {"createLedgerAccount": BadRequestError}}

Arguments
Name Description
ik - ID! 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.

Response

Returns a CreateLedgerAccountsResponse

Query
mutation CreateLedgerAccounts(
  $ledger: LedgerMatchInput!,
  $ledgerAccounts: [CreateLedgerAccountsInput!]!
) {
  createLedgerAccounts(
    ledger: $ledger,
    ledgerAccounts: $ledgerAccounts
  ) {
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on CreateLedgerAccountsResult {
      ...CreateLedgerAccountsResultFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

Variables
{
  "ledger": LedgerMatchInput,
  "ledgerAccounts": [CreateLedgerAccountsInput]
}

Response
{"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.

Response

Returns a CreateOrderResponse

Query
mutation CreateOrder(
  $ik: ID!,
  $order: CreateOrderInput!
) {
  createOrder(
    ik: $ik,
    order: $order
  ) {
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on CreateOrderResult {
      ...CreateOrderResultFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

Variables
{"ik": 4, "order": CreateOrderInput}

Response
{"data": {"createOrder": BadRequestError}}

Arguments
Name Description
ik - ID! 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

Response

Returns a MakeBankTransferResponse

Query
mutation MakeBankTransfer(
  $bankTransfer: MakeBankTransferInput!,
  $ik: ID!
) {
  makeBankTransfer(
    bankTransfer: $bankTransfer,
    ik: $ik
  ) {
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
    ... on MakeBankTransferResult {
      ...MakeBankTransferResultFragment
    }
  }
}

Variables
{
  "bankTransfer": MakeBankTransferInput,
  "ik": "4"
}

Response
{"data": {"makeBankTransfer": BadRequestError}}

Arguments
Name Description
bankTransfer - MakeBankTransferInput! Payload representing the bank transfer to be initiated.
ik - ID! The Idempotency Key

reconcileTx

#

View the Reconciliation section of the docs.

Response

Returns a ReconcileTxResponse

Query
mutation ReconcileTx($entry: LedgerEntryInput!) {
  reconcileTx(entry: $entry) {
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
    ... on ReconcileTxResult {
      ...ReconcileTxResultFragment
    }
  }
}

Variables
{"entry": LedgerEntryInput}

Response
{"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.

syncCustomAccounts

#

View the Syncing Custom Accounts docs.

Response

Returns a SyncCustomAccountsResponse

Query
mutation SyncCustomAccounts(
  $accounts: [CustomAccountInput!]!,
  $link: LinkMatchInput!
) {
  syncCustomAccounts(
    accounts: $accounts,
    link: $link
  ) {
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
    ... on SyncCustomAccountsResult {
      ...SyncCustomAccountsResultFragment
    }
  }
}

Variables
{
  "accounts": [CustomAccountInput],
  "link": LinkMatchInput
}

Response
{"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.

Response

Returns a SyncCustomTxsResponse

Query
mutation SyncCustomTxs(
  $link: LinkMatchInput!,
  $txs: [CustomTxInput!]!
) {
  syncCustomTxs(
    link: $link,
    txs: $txs
  ) {
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
    ... on SyncCustomTxsResult {
      ...SyncCustomTxsResultFragment
    }
  }
}

Variables
{
  "link": LinkMatchInput,
  "txs": [CustomTxInput]
}

Response
{"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.

Response

Returns an UpdateLedgerResponse

Query
mutation UpdateLedger(
  $ledger: LedgerMatchInput!,
  $update: UpdateLedgerInput!
) {
  updateLedger(
    ledger: $ledger,
    update: $update
  ) {
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
    ... on UpdateLedgerResult {
      ...UpdateLedgerResultFragment
    }
  }
}

Variables
{
  "ledger": LedgerMatchInput,
  "update": UpdateLedgerInput
}

Response
{"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.

Response

Returns an UpdateLedgerAccountResponse

Query
mutation UpdateLedgerAccount(
  $ledgerAccount: LedgerAccountMatchInput!,
  $update: UpdateLedgerAccountInput!
) {
  updateLedgerAccount(
    ledgerAccount: $ledgerAccount,
    update: $update
  ) {
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
    ... on UpdateLedgerAccountResult {
      ...UpdateLedgerAccountResultFragment
    }
  }
}

Variables
{
  "ledgerAccount": LedgerAccountMatchInput,
  "update": UpdateLedgerAccountInput
}

Response
{"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.
C Types#

AddLedgerEntryResponse

#

Example
AddLedgerEntryResult


AddLedgerEntryResult

#

Example
{
  "entry": LedgerEntry,
  "isIkReplay": false,
  "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


Example
{
  "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

#

Example
{
  "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!

BankTransferMatchInput

#

Example
{"id": "4"}

Input Field Description
id - ID!

BankTransferStateMachine

#

Example
{
  "status": "failed",
  "transitionLog": [BankTransferStateMachineTransitionLog]
}

Field Name Description
status - BankTransferStateMachineStatus!
transitionLog - [BankTransferStateMachineTransitionLog!]!

BankTransferStateMachineConfigInput

#

Example
{"transitions": BankTransferStateMachineTransitionsInput}

Input Field Description
transitions - BankTransferStateMachineTransitionsInput!

BankTransferStateMachineEffect

#

Example
{"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


Example
{"entry": LedgerEntryInput}

Input Field Description
entry - LedgerEntryInput!

BankTransferStateMachineInput

#

Example
{"config": BankTransferStateMachineConfigInput}

Input Field Description
config - BankTransferStateMachineConfigInput!

BankTransferStateMachineStatus

#

Example
"failed"

Enum Value Description
failed
returned
settled
submitted

BankTransferStateMachineTransition

#

Example
"failed_to_submitted"

Enum Value Description
failed_to_submitted
on_submitted
returned_to_submitted
settled_to_returned
submitted_to_failed
submitted_to_settled

BankTransferStateMachineTransitionLog

#

Example
{
  "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.


Example
{
  "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.


Example
true


CreateCustomCurrencyInput

#

Example
{
  "customCode": "abc123",
  "customCurrencyId": SafeString,
  "name": "xyz789",
  "precision": 987
}

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

#

Example
BadRequestError


CreateCustomCurrencyResult

#

Example
{"customCurrency": Currency}

Field Name Description
customCurrency - Currency! The Currency that was created

CreateCustomLinkResponse

#

Example
BadRequestError


CreateCustomLinkResult

#

Example
{"isIkReplay": true, "link": Link}

Field Name Description
isIkReplay - Boolean!
link - Link! The custom link that was created. Represents an instance of an external system.

CreateLedgerAccountInput

#

Example
{
  "currency": CurrencyMatchInput,
  "linkedAccount": ExternalAccountMatchInput,
  "name": "xyz789",
  "parent": LedgerAccountMatchInput,
  "type": "asset"
}

Input Field Description
currency - CurrencyMatchInput The currency of this ledger account. If this is not set, the workspace level default is used.
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

#

Example
BadRequestError


CreateLedgerAccountResult

#

Example
{"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

#

Example
{
  "childLedgerAccounts": [CreateLedgerAccountsInput],
  "currency": CurrencyMatchInput,
  "ik": 4,
  "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.
ik - ID! 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

#

Example
BadRequestError


CreateLedgerAccountsResult

#

Example
{
  "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

#

Example
{
  "balanceUTCOffset": UTCOffset,
  "name": "abc123",
  "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

#

Example
BadRequestError


CreateLedgerResult

#

Example
{"isIkReplay": false, "ledger": Ledger}

Field Name Description
isIkReplay - Boolean! true if this request successfully completed before and the previous response is being returned
ledger - Ledger! The ledger that was created

CreateOrderInput

#

Example
{
  "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

#

Example
BadRequestError


CreateOrderResult

#

Example
{
  "entry": LedgerEntry,
  "isIkReplay": true,
  "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

#

Example
{"bankTransfer": BankTransferStateMachineInput}

Input Field Description
bankTransfer - BankTransferStateMachineInput!

Currency

#

Example
{
  "code": "ADA",
  "customCode": "abc123",
  "customCurrencyId": SafeString,
  "name": "xyz789",
  "precision": 123
}

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.

CurrencyAmount

#

A single amount accompanied by its currency


Example
{
  "amount": Int64,
  "currency": Currency
}

Field Name Description
amount - Int64! Numerical integer value, serialized as a string
currency - Currency! The currency this amount is in

CurrencyAmountConnection

#

A pageable list of amounts with their currencies


Example
{
  "nodes": [CurrencyAmount],
  "pageInfo": PageInfo
}

Field Name Description
nodes - [CurrencyAmount!] The current page of results
pageInfo - PageInfo! Pagination info for this list

CurrencyCode

#

Example
"ADA"

Enum Value Description
ADA
AED
AFN
ALL
AMD
ANG
AOA
ARS
AUD
AWG
AZN
BAM
BBD
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
LKR
LOGICAL
LRD
LSL
LYD
MAD
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
USD
USDC
USDT
UYU
UZS
VEF
VND
VUV
WST
XAF
XCD
XLM
XOF
XPF
YER
ZAR
ZMW

CurrencyMatchInput

#

Example
{"code": "ADA", "customCurrencyId": SafeString}

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.

CustomAccountInput

#

Example
{
  "currency": CurrencyMatchInput,
  "externalId": SafeString,
  "name": "xyz789"
}

Input Field Description
currency - CurrencyMatchInput The currency of this external account. If this is not set, the workspace level default is used.
externalId - SafeString! The ID of this account at the external system.
name - String! The name of the account at the external system.

CustomTxInput

#

Example
{
  "account": ExternalAccountMatchInput,
  "amount": Int64,
  "description": "xyz789",
  "externalId": SafeString,
  "posted": "2007-12-03T10:15:30Z"
}

Input Field Description
account - ExternalAccountMatchInput!
amount - Int64!
description - String!
externalId - SafeString!
posted - DateTime!

Date

#

ISO 8601 Date e.g. 2020-01-01


Example
"2007-12-03"


DateFilter

#

Example
{
  "equalTo": "2007-12-03",
  "in": ["2007-12-03"]
}

Input Field Description
equalTo - Date
in - [Date!]

DateTime

#

ISO 8601 DateTime e.g. 2020-01-01T14:48:00.000Z


Example
"2007-12-03T10:15:30Z"


DateTimeFilter

#

Example
{
  "after": "2007-12-03T10:15:30Z",
  "before": "2007-12-03T10:15:30Z"
}

Input Field Description
after - DateTime
before - DateTime

Error

#

Base error interface


Example
{
  "code": "xyz789",
  "message": "xyz789",
  "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

ExternalAccount

#

Example
{
  "currency": Currency,
  "externalId": "4",
  "id": 4,
  "linkId": 4,
  "name": "abc123"
}

Field Name Description
currency - Currency The currency of this external account.
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

#

Example
{
  "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


Example
{
  "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

#

Example
"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.


Example
"4"


IkReplay

#

Example
{"ik": "4", "isIkReplay": false}

Field Name Description
ik - ID!
isIkReplay - Boolean!

IncreaseEnv

#

Example
"production"

Enum Value Description
production
sandbox

Int

#

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.


Example
123


Int64

#

A string representing integers up to 9,223,372,036,854,775,807 (i.e. 2^63-1)


Example
Int64


InternalError

#

Equivalent to an HTTP 5XX - something went wrong with our API.


Example
{
  "code": "abc123",
  "message": "abc123",
  "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

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


Example
LastMoment


Ledger

#

Ledgers are databases designed for managing money


Example
{
  "balanceUTCOffset": UTCOffset,
  "created": "2007-12-03T10:15:30Z",
  "id": "4",
  "ik": "abc123",
  "ledgerAccounts": LedgerAccountsConnection,
  "ledgerEntries": LedgerEntriesConnection,
  "name": "xyz789",
  "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 - String! The IK passed into the createLedger mutation.
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.
name - String! The name of the ledger. Can be updated with the updateLedger mutation.
type - LedgerTypes!
workspaceId - ID!

LedgerAccount

#

A ledger account is a container for money


Example
{
  "balance": Int64,
  "balanceChange": Int64,
  "balanceChanges": CurrencyAmountConnection,
  "balances": CurrencyAmountConnection,
  "childBalance": Int64,
  "childBalanceChange": Int64,
  "childBalanceChanges": CurrencyAmountConnection,
  "childBalances": CurrencyAmountConnection,
  "created": "2007-12-03T10:15:30Z",
  "currency": Currency,
  "id": 4,
  "ik": "4",
  "ledger": Ledger,
  "ledgerId": "4",
  "lines": LedgerLinesConnection,
  "link": Link,
  "linkedAccount": ExternalAccount,
  "name": "abc123",
  "ownBalance": Int64,
  "ownBalanceChange": Int64,
  "parentLedgerAccount": LedgerAccount,
  "parentLedgerAccountId": "4",
  "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
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

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
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

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
id - ID!
ik - ID! The idempotency key used to create this account
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
ownBalanceChange - Int64! How much did the this ledger account's ownBalance change during the specified period. This query will exclude all child accounts.
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
parentLedgerAccount - LedgerAccount The parent ledger account of this ledger account
parentLedgerAccountId - ID ID of the parent ledger account of this ledger account
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

#

Example
{
  "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

#

Example
{"id": 4}

Input Field Description
id - ID! The Fragment ID of the ledger account

LedgerAccountTypeFilter

#

Example
{"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

#

Example
"asset"

Enum Value Description
asset
expense
income
liability

LedgerAccountsConnection

#

Example
{
  "nodes": [LedgerAccount],
  "pageInfo": PageInfo
}

Field Name Description
nodes - [LedgerAccount!]
pageInfo - PageInfo!

LedgerAccountsFilterSet

#

Example
{
  "hasParentLedgerAccount": true,
  "isLinkedAccount": true,
  "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

#

Example
{
  "nodes": [LedgerEntry],
  "pageInfo": PageInfo
}

Field Name Description
nodes - [LedgerEntry!]
pageInfo - PageInfo!

LedgerEntriesFilterSet

#

Example
{
  "date": DateFilter,
  "posted": DateTimeFilter
}

Input Field Description
date - DateFilter
posted - DateTimeFilter

LedgerEntry

#

Example
{
  "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

#

Example
{
  "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

LedgerEntryMatchInput

#

Example
{"id": "4"}

Input Field Description
id - ID! The Fragment ID of the ledger entry

LedgerLine

#

Example
{
  "account": LedgerAccount,
  "accountId": 4,
  "amount": Int64,
  "created": "2007-12-03T10:15:30Z",
  "currency": Currency,
  "date": "2007-12-03",
  "description": "xyz789",
  "externalTransferId": "abc123",
  "externalTransferType": "ach",
  "externalTxId": "xyz789",
  "id": "4",
  "ledger": Ledger,
  "ledgerEntryId": "4",
  "ledgerId": "4",
  "otherTxExternalAccountExternalId": "abc123",
  "otherTxExternalAccountId": "xyz789",
  "otherTxExternalId": "abc123",
  "otherTxId": "xyz789",
  "posted": "2007-12-03T10:15:30Z",
  "txId": "xyz789",
  "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

#

Example
{
  "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

LedgerLineMatchInput

#

Example
{"id": 4}

Input Field Description
id - ID! The Fragment ID of the ledger line

LedgerLinesConnection

#

Example
{
  "nodes": [LedgerLine],
  "pageInfo": PageInfo
}

Field Name Description
nodes - [LedgerLine!]
pageInfo - PageInfo!

LedgerLinesFilterSet

#

Example
{
  "date": DateFilter,
  "posted": DateTimeFilter,
  "type": TxTypeFilter
}

Input Field Description
date - DateFilter
posted - DateTimeFilter
type - TxTypeFilter

LedgerMatchInput

#

Example
{"id": 4}

Input Field Description
id - ID! The Fragment ID of the ledger

LedgerTypeFilter

#

Example
{"equalTo": "double", "in": ["double"]}

Input Field Description
equalTo - LedgerTypes
in - [LedgerTypes!]

LedgerTypes

#

Example
"double"

Enum Value Description
double

LedgersConnection

#

Example
{
  "nodes": [Ledger],
  "pageInfo": PageInfo
}

Field Name Description
nodes - [Ledger!]
pageInfo - PageInfo!

LedgersFilterSet

#

Example
{"type": LedgerTypeFilter}

Input Field Description
type - LedgerTypeFilter

LinkMatchInput

#

Example
{"id": 4}

Input Field Description
id - ID!

MakeBankTransferInput

#

Example
{
  "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

#

Example
BadRequestError


MakeBankTransferResult

#

Example
{"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

#

Example
{
  "description": "xyz789",
  "entryIds": ["abc123"],
  "id": 4,
  "stateMachine": OrderStateMachine
}

Field Name Description
description - String
entryIds - [String!]
id - ID!
stateMachine - OrderStateMachine!

OrderMatchInput

#

Example
{"id": "4"}

Input Field Description
id - ID! The Fragment ID of the order

OrderStateMachine

#

Example
{"bankTransfer": BankTransferStateMachine}

Field Name Description
bankTransfer - BankTransferStateMachine

PageInfo

#

Example
{
  "endCursor": "abc123",
  "hasNextPage": true,
  "hasPreviousPage": true,
  "startCursor": "abc123"
}

Field Name Description
endCursor - String
hasNextPage - Boolean!
hasPreviousPage - Boolean!
startCursor - String

PayeeInput

#

Example
{
  "accountNumber": "abc123",
  "externalAccount": ExternalAccountMatchInput,
  "routingNumber": "xyz789"
}

Input Field Description
accountNumber - String
externalAccount - ExternalAccountMatchInput
routingNumber - String

PaymentInput

#

Example
{
  "description": "xyz789",
  "destination": PayeeInput,
  "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
source - PayeeInput Should only be supplied if amount is positive and type is ACH
type - PaymentType! Currently only ach, wire or is supported

PaymentType

#

Example
"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")


Example
Period


ReconcileTxResponse

#

Example
BadRequestError


ReconcileTxResult

#

Example
{
  "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 / # : disallowed


Example
SafeString


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.


Example
"abc123"


SyncCustomAccountsResponse

#

Example
BadRequestError


SyncCustomAccountsResult

#

Example
{"accounts": [ExternalAccount]}

Field Name Description
accounts - [ExternalAccount!]! The external accounts that were synced.

SyncCustomTxsResponse

#

Example
BadRequestError


SyncCustomTxsResult

#

Example
{"txs": [Tx]}

Field Name Description
txs - [Tx!]!

Tx

#

Example
{
  "accountId": 4,
  "amount": Int64,
  "date": "2007-12-03",
  "description": "abc123",
  "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
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

#

Example
{
  "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

#

Example
"credit"

Enum Value Description
credit
debit

TxTypeFilter

#

Example
{"equalTo": "credit", "in": ["credit"]}

Input Field Description
equalTo - TxType
in - [TxType!]

TxsConnection

#

Example
{
  "nodes": [Tx],
  "pageInfo": PageInfo
}

Field Name Description
nodes - [Tx!]
pageInfo - PageInfo!

UTCOffset

#

All hour-aligned offsets from -11:00 to +12:00 are supported, e.g. "-08:00" (PT), "-05:00" (ET), "+00:00" (UTC)


Example
UTCOffset


UpdateLedgerAccountInput

#

Example
{"name": "xyz789"}

Input Field Description
name - String The name to update the ledger account to

UpdateLedgerAccountResponse

#

Example
BadRequestError


UpdateLedgerAccountResult

#

Example
{"ledgerAccount": LedgerAccount}

Field Name Description
ledgerAccount - LedgerAccount! The ledger account that was updated

UpdateLedgerInput

#

Example
{"name": "abc123"}

Input Field Description
name - String The name to update the ledger account to

UpdateLedgerResponse

#

Example
BadRequestError


UpdateLedgerResult

#

Example
{"ledger": Ledger}

Field Name Description
ledger - Ledger! The ledger that was updated