API Reference

1 Queries#

bankTransfer

#

Get a Bank Transfer by ID

Response

Returns a BankTransfer

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

Variables
{"bankTransfer": BankTransferMatchInput}

Response
{
  "data": {
    "bankTransfer": {
      "id": "4",
      "description": "abc123",
      "status": "submitted",
      "order": Order
    }
  }
}

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) {
    id
    name
    type
    workspaceId
    created
    balanceUTCOffset
    ledgerAccounts {
      ...LedgerAccountsConnectionFragment
    }
    ledgerEntries {
      ...LedgerEntriesConnectionFragment
    }
  }
}

Variables
{"ledger": LedgerMatchInput}

Response
{
  "data": {
    "ledger": {
      "id": "4",
      "name": "abc123",
      "type": "double",
      "workspaceId": 4,
      "created": "2007-12-03T10:15:30Z",
      "balanceUTCOffset": UTCOffset,
      "ledgerAccounts": LedgerAccountsConnection,
      "ledgerEntries": LedgerEntriesConnection
    }
  }
}

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) {
    id
    workspaceId
    ledgerId
    ledger {
      ...LedgerFragment
    }
    type
    name
    created
    lines {
      ...LedgerLinesConnectionFragment
    }
    balance
    ownBalance
    childBalance
    balances {
      ...CurrencyAmountConnectionFragment
    }
    childBalances {
      ...CurrencyAmountConnectionFragment
    }
    balanceChange
    ownBalanceChange
    childBalanceChange
    balanceChanges {
      ...CurrencyAmountConnectionFragment
    }
    childBalanceChanges {
      ...CurrencyAmountConnectionFragment
    }
    unreconciledTxs {
      ...TxsConnectionFragment
    }
    parentLedgerAccountId
    parentLedgerAccount {
      ...LedgerAccountFragment
    }
    ik
    link {
      ...LinkFragment
    }
    linkedAccount {
      ...ExternalAccountFragment
    }
    currency {
      ...CurrencyFragment
    }
  }
}

Variables
{"ledgerAccount": LedgerAccountMatchInput}

Response
{
  "data": {
    "ledgerAccount": {
      "id": 4,
      "workspaceId": 4,
      "ledgerId": 4,
      "ledger": Ledger,
      "type": "asset",
      "name": "abc123",
      "created": "2007-12-03T10:15:30Z",
      "lines": LedgerLinesConnection,
      "balance": Int64,
      "ownBalance": Int64,
      "childBalance": Int64,
      "balances": CurrencyAmountConnection,
      "childBalances": CurrencyAmountConnection,
      "balanceChange": Int64,
      "ownBalanceChange": Int64,
      "childBalanceChange": Int64,
      "balanceChanges": CurrencyAmountConnection,
      "childBalanceChanges": CurrencyAmountConnection,
      "unreconciledTxs": TxsConnection,
      "parentLedgerAccountId": 4,
      "parentLedgerAccount": LedgerAccount,
      "ik": 4,
      "link": Link,
      "linkedAccount": ExternalAccount,
      "currency": Currency
    }
  }
}

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) {
    id
    date
    posted
    created
    description
    workspaceId
    ledgerId
    ledger {
      ...LedgerFragment
    }
    orderId
    order {
      ...OrderFragment
    }
    lines {
      ...LedgerLinesConnectionFragment
    }
  }
}

Variables
{"ledgerEntry": LedgerEntryMatchInput}

Response
{
  "data": {
    "ledgerEntry": {
      "id": 4,
      "date": "2007-12-03",
      "posted": "2007-12-03T10:15:30Z",
      "created": "2007-12-03T10:15:30Z",
      "description": "xyz789",
      "workspaceId": "4",
      "ledgerId": "4",
      "ledger": Ledger,
      "orderId": "4",
      "order": Order,
      "lines": LedgerLinesConnection
    }
  }
}

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) {
    id
    type
    date
    posted
    created
    amount
    currency {
      ...CurrencyFragment
    }
    description
    txId
    externalTxId
    externalTransferId
    externalTransferType
    otherTxId
    otherTxExternalId
    otherTxExternalAccountId
    otherTxExternalAccountExternalId
    workspaceId
    ledgerId
    ledger {
      ...LedgerFragment
    }
    account {
      ...LedgerAccountFragment
    }
    accountId
    ledgerEntryId
  }
}

Variables
{"ledgerLine": LedgerLineMatchInput}

Response
{
  "data": {
    "ledgerLine": {
      "id": "4",
      "type": "credit",
      "date": "2007-12-03",
      "posted": "2007-12-03T10:15:30Z",
      "created": "2007-12-03T10:15:30Z",
      "amount": Int64,
      "currency": Currency,
      "description": "xyz789",
      "txId": "abc123",
      "externalTxId": "xyz789",
      "externalTransferId": "xyz789",
      "externalTransferType": "ach",
      "otherTxId": "abc123",
      "otherTxExternalId": "xyz789",
      "otherTxExternalAccountId": "abc123",
      "otherTxExternalAccountExternalId": "abc123",
      "workspaceId": "4",
      "ledgerId": 4,
      "ledger": Ledger,
      "account": LedgerAccount,
      "accountId": "4",
      "ledgerEntryId": 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,
  $first: Int,
  $filter: LedgersFilterSet
) {
  ledgers(
    after: $after,
    first: $first,
    filter: $filter
  ) {
    nodes {
      ...LedgerFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}

Variables
{
  "after": "abc123",
  "first": 987,
  "filter": LedgersFilterSet
}

Response
{
  "data": {
    "ledgers": {
      "nodes": [Ledger],
      "pageInfo": PageInfo
    }
  }
}

Arguments
Name Description
after - String The cursor to retrieve nodes after in the connection
first - Int The requested number of nodes per page
filter - LedgersFilterSet The filter to be applied to the nodes in the connection. Learn more about filtering

order

#

Get a Order by ID

Response

Returns an Order

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

Variables
{"order": OrderMatchInput}

Response
{
  "data": {
    "order": {
      "id": "4",
      "description": "abc123",
      "entryIds": ["xyz789"],
      "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) {
    id
    workspaceId
    posted
    date
    amount
    description
    externalId
    linkId
    accountId
    externalAccountId
    ledgerLines {
      ...LedgerLinesConnectionFragment
    }
    ledgerLineIds
    ledgerEntries {
      ...LedgerEntriesConnectionFragment
    }
    ledgerEntryIds
  }
}

Variables
{"tx": TxMatchInput}

Response
{
  "data": {
    "tx": {
      "id": 4,
      "workspaceId": "4",
      "posted": "2007-12-03T10:15:30Z",
      "date": "2007-12-03",
      "amount": Int64,
      "description": "abc123",
      "externalId": 4,
      "linkId": "4",
      "accountId": 4,
      "externalAccountId": 4,
      "ledgerLines": LedgerLinesConnection,
      "ledgerLineIds": ["4"],
      "ledgerEntries": LedgerEntriesConnection,
      "ledgerEntryIds": ["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)
2 Mutations#

addLedgerEntry

#

View the Add Ledger Entry section of the docs.

Response

Returns an AddLedgerEntryResponse

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

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

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

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

createCustomCurrency

#

View the Multi-Currency section of the docs.

Response

Returns a CreateCustomCurrencyResponse

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

Variables
{"customCurrency": CreateCustomCurrencyInput}

Response
{
  "data": {
    "createCustomCurrency": CreateCustomCurrencyResult
  }
}

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

createLedger

#

View the Setup section of the docs.

Response

Returns a CreateLedgerResponse

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

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

Response
{"data": {"createLedger": CreateLedgerResult}}

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 CreateLedgerAccountResult {
      ...CreateLedgerAccountResultFragment
    }
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

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

Response
{
  "data": {
    "createLedgerAccount": CreateLedgerAccountResult
  }
}

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 CreateLedgerAccountsResult {
      ...CreateLedgerAccountsResultFragment
    }
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

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

Response
{
  "data": {
    "createLedgerAccounts": CreateLedgerAccountsResult
  }
}

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 CreateOrderResult {
      ...CreateOrderResultFragment
    }
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

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

Response
{"data": {"createOrder": CreateOrderResult}}

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(
  $ik: ID!,
  $bankTransfer: MakeBankTransferInput!
) {
  makeBankTransfer(
    ik: $ik,
    bankTransfer: $bankTransfer
  ) {
    ... on MakeBankTransferResult {
      ...MakeBankTransferResultFragment
    }
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

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

Response
{"data": {"makeBankTransfer": MakeBankTransferResult}}

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

reconcileTx

#

View the Reconciliation section of the docs.

Response

Returns a ReconcileTxResponse

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

Variables
{"entry": LedgerEntryInput}

Response
{"data": {"reconcileTx": ReconcileTxResult}}

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(
  $link: LinkMatchInput!,
  $accounts: [CustomAccountInput!]!
) {
  syncCustomAccounts(
    link: $link,
    accounts: $accounts
  ) {
    ... on SyncCustomAccountsResult {
      ...SyncCustomAccountsResultFragment
    }
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

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

Response
{"data": {"syncCustomAccounts": SyncCustomAccountsResult}}

Arguments
Name Description
link - LinkMatchInput! An object containing the ID of custom link created by createCustomLink
accounts - [CustomAccountInput!]! A list of external accounts to sync

syncCustomTxs

#

View the Syncing Custom Transactions docs.

Response

Returns a SyncCustomTxsResponse

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

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

Response
{"data": {"syncCustomTxs": SyncCustomTxsResult}}

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 UpdateLedgerResult {
      ...UpdateLedgerResultFragment
    }
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

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

Response
{"data": {"updateLedger": UpdateLedgerResult}}

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 UpdateLedgerAccountResult {
      ...UpdateLedgerAccountResultFragment
    }
    ... on BadRequestError {
      ...BadRequestErrorFragment
    }
    ... on InternalError {
      ...InternalErrorFragment
    }
  }
}

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

Response
{
  "data": {
    "updateLedgerAccount": UpdateLedgerAccountResult
  }
}

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.
3 Types#

AddLedgerEntryResponse

#

Example
AddLedgerEntryResult


AddLedgerEntryResult

#

Example
{
  "entry": LedgerEntry,
  "lines": [LedgerLine],
  "isIkReplay": true
}

Field Name Description
entry - LedgerEntry! The ledger entry that was posted
lines - [LedgerLine!]! The ledger lines that were created in that entry
isIkReplay - Boolean! True if this request successfully completed before and the previous response is being returned

BadRequestError

#

Equivalent to an HTTP 400 - request either has missing or incorrect data


Example
{
  "message": "xyz789",
  "code": "abc123",
  "retryable": false
}

Field Name Description
message - String! The error message
code - String! The HTTP status code corresponding to the error
retryable - Boolean! Whether or not the operation is retryable

BankTransfer

#

Example
{
  "id": 4,
  "description": "abc123",
  "status": "submitted",
  "order": Order
}

Field Name Description
id - ID!
description - String!
status - BankTransferStateMachineStatus!
order - Order! Internally, BankTransfers are stored as Orders.

BankTransferMatchInput

#

Example
{"id": 4}

Input Field Description
id - ID!

BankTransferStateMachine

#

Example
{
  "status": "submitted",
  "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
"submitted"

Enum Value Description
submitted
settled
failed
returned

BankTransferStateMachineTransition

#

Example
"on_submitted"

Enum Value Description
on_submitted
submitted_to_failed
submitted_to_settled
settled_to_returned
returned_to_submitted
failed_to_submitted

BankTransferStateMachineTransitionLog

#

Example
{
  "transition": "on_submitted",
  "effect": BankTransferStateMachineEffect,
  "timestamp": "2007-12-03T10:15:30Z"
}

Field Name Description
transition - BankTransferStateMachineTransition!
effect - BankTransferStateMachineEffect
timestamp - DateTime

BankTransferStateMachineTransitionsInput

#

A mapping of bank transfer state transition -> side effect for a bank transfer.


Example
{
  "on_submitted": BankTransferStateMachineEffectInput,
  "submitted_to_failed": BankTransferStateMachineEffectInput,
  "submitted_to_settled": BankTransferStateMachineEffectInput,
  "settled_to_returned": BankTransferStateMachineEffectInput,
  "returned_to_submitted": BankTransferStateMachineEffectInput,
  "failed_to_submitted": BankTransferStateMachineEffectInput
}

Input Field Description
on_submitted - BankTransferStateMachineEffectInput The state transition that occurs when createOrder is called (i.e. submitted).
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").
settled_to_returned - BankTransferStateMachineEffectInput The state transition that occurs when a settled payment later is returned / reversed. This can happen due to fraud.
returned_to_submitted - BankTransferStateMachineEffectInput The state transition that occurs when a returned Order is re-submitted. This retry mechanism is currently not supported.
failed_to_submitted - BankTransferStateMachineEffectInput The state transition that occurs when a failed Order is re-submitted. This retry mechanism is currently not supported.

Boolean

#

The Boolean scalar type represents true or false.




CreateCustomCurrencyInput

#

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

Input Field Description
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.
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.

CreateCustomCurrencyResponse

#

Example
CreateCustomCurrencyResult


CreateCustomCurrencyResult

#

Example
{"customCurrency": Currency}

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

CreateCustomLinkResponse

#

Example
CreateCustomLinkResult


CreateCustomLinkResult

#

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

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

CreateLedgerAccountInput

#

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

Input Field Description
name - String! The name of your ledger account
type - LedgerAccountTypes The type of ledger account to create. Required if this is a top-level ledger account.
parent - LedgerAccountMatchInput The parent of this ledger account
linkedAccount - ExternalAccountMatchInput The external account to link to this ledger account
currency - CurrencyMatchInput The currency of this ledger account. If this is not set, the workspace level default is used.

CreateLedgerAccountResponse

#

Example
CreateLedgerAccountResult


CreateLedgerAccountResult

#

Example
{"ledgerAccount": LedgerAccount, "isIkReplay": false}

Field Name Description
ledgerAccount - LedgerAccount! The ledger account that was created
isIkReplay - Boolean! true if a previous request successfully created this ledger account

CreateLedgerAccountsInput

#

Example
{
  "ik": "4",
  "name": "xyz789",
  "type": "asset",
  "parent": LedgerAccountMatchInput,
  "linkedAccount": ExternalAccountMatchInput,
  "currency": CurrencyMatchInput,
  "childLedgerAccounts": [CreateLedgerAccountsInput]
}

Input Field Description
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
name - String!
type - LedgerAccountTypes Only required if this is a top level account in the ledger. Otherwise the type will get inherited from its parent account
parent - LedgerAccountMatchInput The parent of this ledger account, only valid on the top level accounts in the payload, s
linkedAccount - ExternalAccountMatchInput The external account to link to this ledger account. Can only be specified on leaf ledger accounts
currency - CurrencyMatchInput The currency of this ledger account. If this is not set, the workspace level default is used.
childLedgerAccounts - [CreateLedgerAccountsInput!] Ledger accounts to create as children of this ledger account

CreateLedgerAccountsResponse

#

Example
CreateLedgerAccountsResult


CreateLedgerAccountsResult

#

Example
{
  "ledgerAccounts": [LedgerAccount],
  "ikReplays": [IkReplay]
}

Field Name Description
ledgerAccounts - [LedgerAccount!]! The ledger accounts that were created
ikReplays - [IkReplay!]! Whether the ledger accounts were successfully created by a previous request

CreateLedgerInput

#

Example
{
  "name": "xyz789",
  "type": "double",
  "balanceUTCOffset": UTCOffset
}

Input Field Description
name - String!
type - LedgerTypes
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

CreateLedgerResponse

#

Example
CreateLedgerResult


CreateLedgerResult

#

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

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

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
CreateOrderResult


CreateOrderResult

#

Example
{
  "order": Order,
  "entry": LedgerEntry,
  "lines": [LedgerLine],
  "isIkReplay": true
}

Field Name Description
order - Order! The order that was created
entry - LedgerEntry! The ledger entry that was posted
lines - [LedgerLine!] The ledger lines that were created in that entry
isIkReplay - Boolean! true if this request successfully completed before and the previous response is being returned

CreateOrderStateMachineInput

#

Example
{"bankTransfer": BankTransferStateMachineInput}

Input Field Description
bankTransfer - BankTransferStateMachineInput!

Currency

#

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

Field Name Description
code - CurrencyCode! The currency code. This is an enum type .
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.
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.

CurrencyAmount

#

A single amount accompanied by its currency


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

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

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
BTC
DAI
ETH
SOL
USDC
USDT
XLM
AED
AFN
ALL
AMD
ANG
AOA
ARS
AUD
AWG
AZN
BAM
BBD
BDT
BGN
BHD
BIF
BMD
BND
BOB
BRL
BSD
BTN
BWP
BYR
BZD
CAD
CDF
CHF
CLP
CNY
COP
CRC
CUC
CUP
CVE
CZK
DJF
DKK
DOP
DZD
EGP
ERN
ETB
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
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
SOS
SPL
SRD
STN
SVC
SYP
SZL
THB
TJS
TMT
TND
TOP
TRY
TTD
TVD
TWD
TZS
UAH
UGX
USD
UYU
UZS
VEF
VND
VUV
WST
XAF
XCD
XOF
XPF
YER
ZAR
ZMW
LOGICAL
CUSTOM

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
{
  "externalId": SafeString,
  "name": "abc123",
  "currency": CurrencyMatchInput
}

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

CustomTxInput

#

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

Input Field Description
account - ExternalAccountMatchInput!
externalId - SafeString!
description - String!
amount - Int64!
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
{
  "message": "xyz789",
  "code": "abc123",
  "retryable": true
}

Field Name Description
message - String! The error message
code - String! The HTTP status code corresponding to the error
retryable - Boolean! Whether or not the operation is retryable

ExternalAccount

#

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

Field Name Description
id - ID! Fragment ID of External Account
name - String!
externalId - ID! ID used for the external account
linkId - ID! Fragment ID of this transaction's external link
currency - Currency The currency of this external account.

ExternalAccountFilter

#

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

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

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
{"linkId": "4", "id": 4, "externalId": 4}

Input Field Description
linkId - ID The Fragment ID of the link
id - ID The Fragment ID of the external account
externalId - ID The External systems's ID of the account

ExternalTransferType

#

Example
"ach"

Enum Value Description
ach
wire
internal

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

Enum Value Description
sandbox
production

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
{
  "message": "abc123",
  "code": "xyz789",
  "retryable": true
}

Field Name Description
message - String! The error message
code - String! The HTTP status code corresponding to the error
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
{
  "id": "4",
  "name": "xyz789",
  "type": "double",
  "workspaceId": "4",
  "created": "2007-12-03T10:15:30Z",
  "balanceUTCOffset": UTCOffset,
  "ledgerAccounts": LedgerAccountsConnection,
  "ledgerEntries": LedgerEntriesConnection
}

Field Name Description
id - ID!
name - String!
type - LedgerTypes!
workspaceId - ID!
created - DateTime!
balanceUTCOffset - UTCOffset! When aggregating balances, all transactions within a 24 hour period starting at midnight UTC plus this offset are included in each day.
ledgerAccounts - LedgerAccountsConnection Query LedgerAccounts in Ledger
Arguments

after - String

first - Int

filter - LedgerAccountsFilterSet
ledgerEntries - LedgerEntriesConnection Query LedgerEntries in Ledger
Arguments

after - String

first - Int

filter - LedgerEntriesFilterSet

LedgerAccount

#

A ledger account is a container for money


Example
{
  "id": 4,
  "workspaceId": "4",
  "ledgerId": 4,
  "ledger": Ledger,
  "type": "asset",
  "name": "abc123",
  "created": "2007-12-03T10:15:30Z",
  "lines": LedgerLinesConnection,
  "balance": Int64,
  "ownBalance": Int64,
  "childBalance": Int64,
  "balances": CurrencyAmountConnection,
  "childBalances": CurrencyAmountConnection,
  "balanceChange": Int64,
  "ownBalanceChange": Int64,
  "childBalanceChange": Int64,
  "balanceChanges": CurrencyAmountConnection,
  "childBalanceChanges": CurrencyAmountConnection,
  "unreconciledTxs": TxsConnection,
  "parentLedgerAccountId": 4,
  "parentLedgerAccount": LedgerAccount,
  "ik": "4",
  "link": Link,
  "linkedAccount": ExternalAccount,
  "currency": Currency
}

Field Name Description
id - ID!
workspaceId - ID!
ledgerId - ID! ID of the ledger this account is in
ledger - Ledger! Ledger this account is in
type - LedgerAccountTypes!
name - String
created - DateTime!
lines - LedgerLinesConnection! List lines in this account, sorted in reverse chronological order
Arguments

after - String

first - Int

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

first - Int
parentLedgerAccountId - ID ID of the parent ledger account of this ledger account
parentLedgerAccount - LedgerAccount The parent ledger account of this ledger account
ik - ID! The idempotency key used to create this account
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
currency - Currency! Currency of this ledger account

LedgerAccountFilter

#

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

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

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
in - [LedgerAccountTypes!]

LedgerAccountTypes

#

Example
"asset"

Enum Value Description
asset
liability
income
expense

LedgerAccountsConnection

#

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

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

LedgerAccountsFilterSet

#

Example
{
  "type": LedgerAccountTypeFilter,
  "linkedAccount": ExternalAccountFilter,
  "isLinkedAccount": true,
  "parentLedgerAccount": LedgerAccountFilter,
  "hasParentLedgerAccount": false
}

Input Field Description
type - LedgerAccountTypeFilter
linkedAccount - ExternalAccountFilter
isLinkedAccount - Boolean
parentLedgerAccount - LedgerAccountFilter
hasParentLedgerAccount - Boolean

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
{
  "id": "4",
  "date": "2007-12-03",
  "posted": "2007-12-03T10:15:30Z",
  "created": "2007-12-03T10:15:30Z",
  "description": "abc123",
  "workspaceId": "4",
  "ledgerId": "4",
  "ledger": Ledger,
  "orderId": "4",
  "order": Order,
  "lines": LedgerLinesConnection
}

Field Name Description
id - ID!
date - Date! Date this LedgerEntry posted to its Ledger e.g. "2021-01-01"
posted - DateTime! ISO-8601 timestamp this LedgerEntry posted to its Ledger
created - DateTime! ISO-8601 timestamp this LedgerEntry was created in Fragment
description - String
workspaceId - ID! Ledger entries can be posted, pending or cancelled
ledgerId - ID! ID of the ledger this account is in
ledger - Ledger! Ledger this account is in
orderId - ID Order ID if this entry was posted due to an Order
order - Order The order associated with this ledger entry
lines - LedgerLinesConnection!

LedgerEntryInput

#

Example
{
  "description": "abc123",
  "posted": "2007-12-03T10:15:30Z",
  "lines": [LedgerLineInput]
}

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
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
lines - [LedgerLineInput!]!

LedgerEntryMatchInput

#

Example
{"id": "4"}

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

LedgerLine

#

Example
{
  "id": 4,
  "type": "credit",
  "date": "2007-12-03",
  "posted": "2007-12-03T10:15:30Z",
  "created": "2007-12-03T10:15:30Z",
  "amount": Int64,
  "currency": Currency,
  "description": "abc123",
  "txId": "xyz789",
  "externalTxId": "abc123",
  "externalTransferId": "xyz789",
  "externalTransferType": "ach",
  "otherTxId": "xyz789",
  "otherTxExternalId": "abc123",
  "otherTxExternalAccountId": "xyz789",
  "otherTxExternalAccountExternalId": "abc123",
  "workspaceId": "4",
  "ledgerId": 4,
  "ledger": Ledger,
  "account": LedgerAccount,
  "accountId": 4,
  "ledgerEntryId": "4"
}

Field Name Description
id - ID!
type - TxType! credit or debit
date - Date Date this LedgerLine posted to its LedgerAccount e.g. "2021-01-01"
posted - DateTime ISO-8601 timestamp this LedgerLine posted to its LedgerAccount
created - DateTime ISO-8601 timestamp this LedgerLine was created in Fragment
amount - Int64! How much this line's LedgerAccount's balance changed in integer 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
currency - Currency Currency of this line
description - String
txId - String Fragment ID of the transaction linked to this line
externalTxId - String ID in the external system of the transaction linked to this line
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
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
otherTxExternalId - String ID in the external system of transaction in the destination or source bank account. Only for internal bank transfers - see otherTxId
otherTxExternalAccountId - String Fragment ID of destination or source bank account. Only for internal bank transfers - see otherTxId
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
workspaceId - ID!
ledgerId - ID! Ledger that contains this line
ledger - Ledger!
account - LedgerAccount! LedgerAccount that contains this line
accountId - ID!
ledgerEntryId - ID LedgerEntry that contains this line

LedgerLineInput

#

Example
{
  "amount": Int64,
  "currency": CurrencyMatchInput,
  "account": LedgerAccountMatchInput,
  "description": "abc123",
  "payment": PaymentInput,
  "tx": TxMatchInput
}

Input Field Description
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
account - LedgerAccountMatchInput! The LedgerAccount this line is being added to
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
{
  "type": TxTypeFilter,
  "date": DateFilter,
  "posted": DateTimeFilter
}

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

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
{
  "description": "xyz789",
  "payment": PaymentInput,
  "amount": Int64,
  "linkedLedgerAccount": LedgerAccountMatchInput,
  "offset": LedgerEntryInput
}

Input Field Description
description - String! Required. Lines without a description will have their description set to the one provided.
payment - PaymentInput! Payment information for the account the pay in/out is made from.
amount - Int64! Positive amount of the transfer being made.
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.

MakeBankTransferResponse

#

Example
MakeBankTransferResult


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
{
  "id": 4,
  "description": "xyz789",
  "entryIds": ["abc123"],
  "stateMachine": OrderStateMachine
}

Field Name Description
id - ID!
description - String
entryIds - [String!]
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
{
  "hasNextPage": false,
  "endCursor": "xyz789"
}

Field Name Description
hasNextPage - Boolean!
endCursor - String

PayeeInput

#

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

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

PaymentInput

#

Example
{
  "source": PayeeInput,
  "destination": PayeeInput,
  "description": "xyz789",
  "type": "ach"
}

Input Field Description
source - PayeeInput Should only be supplied if amount is positive and type is ACH
destination - PayeeInput Should only be supplied if amount is negative
description - String If specified will override the payment description sent, otherwise the line description will be used
type - PaymentType! Currently only ach, wire or is supported

PaymentType

#

Example
"ach"

Enum Value Description
ach
wire
internal

Period

#

A specific year ("2021"), quarter ("2021-Q1"), month ("2021-02"), day ("2021-02-03") or hour ("2021-02-03T04")


Example
Period


ReconcileTxResponse

#

Example
ReconcileTxResult


ReconcileTxResult

#

Example
{
  "entry": LedgerEntry,
  "lines": [LedgerLine],
  "isIkReplay": false
}

Field Name Description
entry - LedgerEntry! The ledger entry that was posted
lines - [LedgerLine!]! The ledger lines that were created in that entry
isIkReplay - Boolean! True if this request successfully completed before and the previous response is being returned

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


SyncCustomAccountsResponse

#

Example
SyncCustomAccountsResult


SyncCustomAccountsResult

#

Example
{"accounts": [ExternalAccount]}

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

SyncCustomTxsResponse

#

Example
SyncCustomTxsResult


SyncCustomTxsResult

#

Example
{"txs": [Tx]}

Field Name Description
txs - [Tx!]!

Tx

#

Example
{
  "id": "4",
  "workspaceId": "4",
  "posted": "2007-12-03T10:15:30Z",
  "date": "2007-12-03",
  "amount": Int64,
  "description": "xyz789",
  "externalId": "4",
  "linkId": 4,
  "accountId": "4",
  "externalAccountId": "4",
  "ledgerLines": LedgerLinesConnection,
  "ledgerLineIds": [4],
  "ledgerEntries": LedgerEntriesConnection,
  "ledgerEntryIds": [4]
}

Field Name Description
id - ID!
workspaceId - ID!
posted - DateTime! ISO-8601 timestamp this Tx posted to the external account
date - Date! Date this Tx posted to the external account
amount - Int64! Integer amount in cents. Positive indicates money entering the external account, negative indicates money leaving
description - String! Description at the external account (can be overridden within the Fragment Dashboard)
externalId - ID! ID of this transaction in the external system
linkId - ID! Fragment ID of this transaction's Link
accountId - ID! Fragment ID of this transaction's external account
externalAccountId - ID! ID in the external system of this transaction's external account
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
ledgerLineIds - [ID!] Same as ledgerLines, but returns an array of IDs instead
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

TxMatchInput

#

Example
{
  "linkId": "4",
  "accountId": 4,
  "externalAccountId": "4",
  "id": "4",
  "externalId": "4"
}

Input Field Description
linkId - ID The Fragment ID of the link
accountId - ID The Fragment ID of the external account
externalAccountId - ID The external system's ID for the account
id - ID The Fragment ID of the transaction
externalId - ID The external system's ID for the transaction

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": "abc123"}

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

UpdateLedgerAccountResponse

#

Example
UpdateLedgerAccountResult


UpdateLedgerAccountResult

#

Example
{"ledgerAccount": LedgerAccount}

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

UpdateLedgerInput

#

Example
{"name": "xyz789"}

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

UpdateLedgerResponse

#

Example
UpdateLedgerResult


UpdateLedgerResult

#

Example
{"ledger": Ledger}

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