API Reference
bankTransfer
#Get a Bank Transfer by ID
ResponseReturns a BankTransfer
query BankTransfer($bankTransfer: BankTransferMatchInput!) {
bankTransfer(bankTransfer: $bankTransfer) {
description
id
order {
...OrderFragment
}
status
}
}
{"bankTransfer": BankTransferMatchInput}
{
"data": {
"bankTransfer": {
"description": "abc123",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"order": Order,
"status": "failed"
}
}
}
Arguments
Name | Description |
---|---|
bankTransfer - BankTransferMatchInput! | An object specifying the ID of the bank transfer you want to query |
customCurrencies
#Query Custom Currencies in the workspace.
ResponseReturns a CustomCurrenciesConnection!
query CustomCurrencies(
$after: String,
$before: String,
$first: Int,
$last: Int
) {
customCurrencies(
after: $after,
before: $before,
first: $first,
last: $last
) {
nodes {
...CurrencyFragment
}
pageInfo {
...PageInfoFragment
}
}
}
{"after": "abc123", "before": "abc123", "first": 2277, "last": 2277}
{
"data": {
"customCurrencies": {
"nodes": [Currency],
"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 . |
first - Int | The number of currencies to return per page, when paginating forwards. Defaults to 20, maximum is 200. |
last - Int | The number of currencies to return per page, when paginating backwards. Defaults to 20, maximum is 200. |
ledger
#Get a Ledger by ID
ResponseReturns a Ledger
query Ledger($ledger: LedgerMatchInput!) {
ledger(ledger: $ledger) {
balanceUTCOffset
created
id
ik
ledgerAccounts {
...LedgerAccountsConnectionFragment
}
ledgerEntries {
...LedgerEntriesConnectionFragment
}
migrations {
...LedgerMigrationConnectionFragment
}
name
schema {
...SchemaFragment
}
type
workspaceId
}
}
{"ledger": LedgerMatchInput}
{
"data": {
"ledger": {
"balanceUTCOffset": "-08:00",
"created": "2007-12-03T10:15:30Z",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ik": "some-safe-string-ik",
"ledgerAccounts": LedgerAccountsConnection,
"ledgerEntries": LedgerEntriesConnection,
"migrations": LedgerMigrationConnection,
"name": "abc123",
"schema": Schema,
"type": "double",
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
}
}
Arguments
Name | Description |
---|---|
ledger - LedgerMatchInput! | An object specifying the ID of the ledger you want to query |
ledgerAccount
#Get a Ledger Account by ID
ResponseReturns a LedgerAccount
query LedgerAccount($ledgerAccount: LedgerAccountMatchInput!) {
ledgerAccount(ledgerAccount: $ledgerAccount) {
balance
balanceChange
balanceChanges {
...CurrencyAmountConnectionFragment
}
balances {
...CurrencyAmountConnectionFragment
}
childBalance
childBalanceChange
childBalanceChanges {
...CurrencyAmountConnectionFragment
}
childBalances {
...CurrencyAmountConnectionFragment
}
created
currency {
...CurrencyFragment
}
currencyMode
id
ik
ledger {
...LedgerFragment
}
ledgerId
lines {
...LedgerLinesConnectionFragment
}
link {
...LinkFragment
}
linkedAccount {
...ExternalAccountFragment
}
name
ownBalance
ownBalanceChange
ownBalances {
...CurrencyAmountConnectionFragment
}
parentLedgerAccount {
...LedgerAccountFragment
}
parentLedgerAccountId
path
type
unreconciledTxs {
...TxsConnectionFragment
}
workspaceId
}
}
{"ledgerAccount": LedgerAccountMatchInput}
{
"data": {
"ledgerAccount": {
"balance": "999999999999",
"balanceChange": "999999999999",
"balanceChanges": CurrencyAmountConnection,
"balances": CurrencyAmountConnection,
"childBalance": "999999999999",
"childBalanceChange": "999999999999",
"childBalanceChanges": CurrencyAmountConnection,
"childBalances": CurrencyAmountConnection,
"created": "2007-12-03T10:15:30Z",
"currency": Currency,
"currencyMode": "multi",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ik": "abc123",
"ledger": Ledger,
"ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"lines": LedgerLinesConnection,
"link": Link,
"linkedAccount": ExternalAccount,
"name": "abc123",
"ownBalance": "999999999999",
"ownBalanceChange": "999999999999",
"ownBalances": CurrencyAmountConnection,
"parentLedgerAccount": LedgerAccount,
"parentLedgerAccountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"path": "abc123",
"type": "asset",
"unreconciledTxs": TxsConnection,
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
}
}
Arguments
Name | Description |
---|---|
ledgerAccount - LedgerAccountMatchInput! | An object specifying the ID of the ledger account you want to query |
ledgerEntry
#Get Ledger Entry by ID.
ResponseReturns a LedgerEntry
query LedgerEntry($ledgerEntry: LedgerEntryMatchInput!) {
ledgerEntry(ledgerEntry: $ledgerEntry) {
created
date
description
id
ledger {
...LedgerFragment
}
ledgerId
lines {
...LedgerLinesConnectionFragment
}
order {
...OrderFragment
}
orderId
posted
type
workspaceId
}
}
{"ledgerEntry": LedgerEntryMatchInput}
{
"data": {
"ledgerEntry": {
"created": "2007-12-03T10:15:30Z",
"date": "2022-03-28",
"description": "abc123",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ledger": Ledger,
"ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"lines": LedgerLinesConnection,
"order": Order,
"orderId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"posted": "2007-12-03T10:15:30Z",
"type": "some-safe-string-ik",
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
}
}
Arguments
Name | Description |
---|---|
ledgerEntry - LedgerEntryMatchInput! | An object specifying the ID of the Ledger Entry you want to query. |
ledgerLine
#Get Ledger Line by ID
ResponseReturns a LedgerLine
query LedgerLine($ledgerLine: LedgerLineMatchInput!) {
ledgerLine(ledgerLine: $ledgerLine) {
account {
...LedgerAccountFragment
}
accountId
amount
created
currency {
...CurrencyFragment
}
date
description
externalTransferId
externalTransferType
externalTxId
id
key
ledger {
...LedgerFragment
}
ledgerEntryId
ledgerId
otherTxExternalAccountExternalId
otherTxExternalAccountId
otherTxExternalId
otherTxId
posted
txId
type
workspaceId
}
}
{"ledgerLine": LedgerLineMatchInput}
{
"data": {
"ledgerLine": {
"account": LedgerAccount,
"accountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"amount": "999999999999",
"created": "2007-12-03T10:15:30Z",
"currency": Currency,
"date": "2022-03-28",
"description": "abc123",
"externalTransferId": "abc123",
"externalTransferType": "ach",
"externalTxId": "abc123",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"key": "abc123",
"ledger": Ledger,
"ledgerEntryId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"otherTxExternalAccountExternalId": "abc123",
"otherTxExternalAccountId": "abc123",
"otherTxExternalId": "abc123",
"otherTxId": "abc123",
"posted": "2007-12-03T10:15:30Z",
"txId": "abc123",
"type": "credit",
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
}
}
Arguments
Name | Description |
---|---|
ledgerLine - LedgerLineMatchInput! | An object specifying the ID of the ledger line you want to query |
ledgers
#Query Ledgers in workspace. Ledgers are paginated and returned in reverse-chronological order by their created date.
ResponseReturns a LedgersConnection
query Ledgers(
$after: String,
$before: String,
$filter: LedgersFilterSet,
$first: Int,
$last: Int
) {
ledgers(
after: $after,
before: $before,
filter: $filter,
first: $first,
last: $last
) {
nodes {
...LedgerFragment
}
pageInfo {
...PageInfoFragment
}
}
}
{
"after": "abc123",
"before": "abc123",
"filter": LedgersFilterSet,
"first": 2277,
"last": 2277
}
{
"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 (reverse-chronological order by created date). 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 (chronological order by created date). Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. |
order
#Get a Order by ID
ResponseReturns an Order
query Order($order: OrderMatchInput!) {
order(order: $order) {
description
entryIds
id
stateMachine {
...OrderStateMachineFragment
}
}
}
{"order": OrderMatchInput}
{
"data": {
"order": {
"description": "abc123",
"entryIds": ["abc123"],
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"stateMachine": OrderStateMachine
}
}
}
Arguments
Name | Description |
---|---|
order - OrderMatchInput! | An object specifying the ID of the order you want to query |
schema
#Get a Schema by key. Under development; unexpected results may occur.
ResponseReturns a Schema
query Schema($schema: SchemaMatchInput!) {
schema(schema: $schema) {
key
ledgers {
...LedgersConnectionFragment
}
name
version {
...SchemaVersionFragment
}
versions {
...SchemaVersionConnectionFragment
}
}
}
{"schema": SchemaMatchInput}
{
"data": {
"schema": {
"key": "some-safe-string-ik",
"ledgers": LedgersConnection,
"name": "abc123",
"version": SchemaVersion,
"versions": SchemaVersionConnection
}
}
}
Arguments
Name | Description |
---|---|
schema - SchemaMatchInput! | This contains the key of the Schema you want to retrieve. |
schemas
#Retrieve all of the Schemas in the workspace. Under development; unexpected results may occur.
ResponseReturns a SchemaConnection
query Schemas {
schemas {
nodes {
...SchemaFragment
}
pageInfo {
...PageInfoFragment
}
}
}
{
"data": {
"schemas": {
"nodes": [Schema],
"pageInfo": PageInfo
}
}
}
Arguments
tx
#Get a Tx by ID
ResponseReturns a Tx
query Tx($tx: TxMatchInput!) {
tx(tx: $tx) {
accountId
amount
currency {
...CurrencyFragment
}
date
description
externalAccountId
externalId
id
ledgerEntries {
...LedgerEntriesConnectionFragment
}
ledgerEntryIds
ledgerLineIds
ledgerLines {
...LedgerLinesConnectionFragment
}
linkId
posted
workspaceId
}
}
{"tx": TxMatchInput}
{
"data": {
"tx": {
"accountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"amount": "999999999999",
"currency": Currency,
"date": "2022-03-28",
"description": "abc123",
"externalAccountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"externalId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ledgerEntries": LedgerEntriesConnection,
"ledgerEntryIds": ["3116551f-5efc-4c9e-84ac-5a36a51b09c1"],
"ledgerLineIds": ["3116551f-5efc-4c9e-84ac-5a36a51b09c1"],
"ledgerLines": LedgerLinesConnection,
"linkId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"posted": "2007-12-03T10:15:30Z",
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
}
}
Arguments
Name | Description |
---|---|
tx - TxMatchInput! | The transaction you're querying. You can specify either: * The Fragment ID of the transaction (id) * The external system's transaction ID (externalId) and Fragment ID of the external account (accountId) * The external system's transaction ID (externalId), the external system's account ID (externalAccountId) and Fragment ID of the Link (linkId) |
addLedgerEntry
#Adds a Ledger Entry to a Ledger. This Ledger Entry cannot be into a Linked Ledger Account. For that, use reconcileTx
ResponseReturns an AddLedgerEntryResponse
mutation AddLedgerEntry(
$entry: LedgerEntryInput!,
$ik: SafeString!
) {
addLedgerEntry(
entry: $entry,
ik: $ik
) {
... on AddLedgerEntryResult {
...AddLedgerEntryResultFragment
}
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{"entry": LedgerEntryInput, "ik": "some-safe-string-ik"}
{"data": {"addLedgerEntry": AddLedgerEntryResult}}
Arguments
Name | Description |
---|---|
entry - LedgerEntryInput! | An object containing the Ledger Lines as well as an optional description and posted timestamp. |
ik - SafeString! | The Idempotency Key |
createCustomCurrency
#Creates a custom currency.
ResponseReturns a CreateCustomCurrencyResponse
mutation CreateCustomCurrency($customCurrency: CreateCustomCurrencyInput!) {
createCustomCurrency(customCurrency: $customCurrency) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateCustomCurrencyResult {
...CreateCustomCurrencyResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{"customCurrency": CreateCustomCurrencyInput}
{"data": {"createCustomCurrency": BadRequestError}}
Arguments
Name | Description |
---|---|
customCurrency - CreateCustomCurrencyInput! | The custom currency to be created. |
createCustomLink
#Custom Links let you integrate external systems that don't have native support. See Custom Links
ResponseReturns a CreateCustomLinkResponse
mutation CreateCustomLink(
$ik: SafeString!,
$name: String!
) {
createCustomLink(
ik: $ik,
name: $name
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateCustomLinkResult {
...CreateCustomLinkResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{"ik": "some-safe-string-ik", "name": "abc123"}
{"data": {"createCustomLink": BadRequestError}}
Arguments
Name | Description |
---|---|
ik - SafeString! | The Idempotency Key |
name - String! | The name of your custom link |
createLedger
#Creates a Ledger.
ResponseReturns a CreateLedgerResponse
mutation CreateLedger(
$ik: SafeString!,
$ledger: CreateLedgerInput!,
$schema: SchemaMatchInput
) {
createLedger(
ik: $ik,
ledger: $ledger,
schema: $schema
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateLedgerResult {
...CreateLedgerResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{
"ik": "some-safe-string-ik",
"ledger": CreateLedgerInput,
"schema": SchemaMatchInput
}
{"data": {"createLedger": BadRequestError}}
Arguments
Name | Description |
---|---|
ik - SafeString! | The Idempotency Key |
ledger - CreateLedgerInput! | The payload representing the ledger to be created |
schema - SchemaMatchInput | EXPERIMENTAL: Create this ledger with a schema |
createLedgerAccount
#Prefer using the plural createLedgerAccounts instead
ResponseReturns a CreateLedgerAccountResponse
mutation CreateLedgerAccount(
$ik: SafeString!,
$ledger: LedgerMatchInput!,
$ledgerAccount: CreateLedgerAccountInput!
) {
createLedgerAccount(
ik: $ik,
ledger: $ledger,
ledgerAccount: $ledgerAccount
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateLedgerAccountResult {
...CreateLedgerAccountResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{
"ik": "some-safe-string-ik",
"ledger": LedgerMatchInput,
"ledgerAccount": CreateLedgerAccountInput
}
{"data": {"createLedgerAccount": BadRequestError}}
Arguments
Name | Description |
---|---|
ik - SafeString! | The Idempotency Key |
ledger - LedgerMatchInput! | An object containing the ID of the ledger under which to create the ledger account |
ledgerAccount - CreateLedgerAccountInput! | The payload representing the ledger account to be created |
createLedgerAccounts
#This API call is used to create Ledger Accounts. It is only used if you are not using a Schema. Unlike other mutations that take a single IK, 'createLedgerAccount' accepts an IK for each of the ledger accounts in the request payload. This is so you can recover in the case of a partial failure. One API call can create up to 200 Ledger Accounts, up to 10 levels deep.
ResponseReturns a CreateLedgerAccountsResponse
mutation CreateLedgerAccounts(
$ledger: LedgerMatchInput!,
$ledgerAccounts: [CreateLedgerAccountsInput!]!
) {
createLedgerAccounts(
ledger: $ledger,
ledgerAccounts: $ledgerAccounts
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateLedgerAccountsResult {
...CreateLedgerAccountsResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{
"ledger": LedgerMatchInput,
"ledgerAccounts": [CreateLedgerAccountsInput]
}
{"data": {"createLedgerAccounts": BadRequestError}}
Arguments
Name | Description |
---|---|
ledger - LedgerMatchInput! | An object containing the ID of the Ledger under which to create the Ledger Account. |
ledgerAccounts - [CreateLedgerAccountsInput!]! | The list of objects representing the Ledger Accounts to be created. |
createOrder
#View the Payments section of the docs.
ResponseReturns a CreateOrderResponse
mutation CreateOrder(
$ik: SafeString!,
$order: CreateOrderInput!
) {
createOrder(
ik: $ik,
order: $order
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on CreateOrderResult {
...CreateOrderResultFragment
}
... on InternalError {
...InternalErrorFragment
}
}
}
{"ik": "some-safe-string-ik", "order": CreateOrderInput}
{"data": {"createOrder": BadRequestError}}
Arguments
Name | Description |
---|---|
ik - SafeString! | The Idempotency Key |
order - CreateOrderInput! | Payload representing the state machine of the bank transfer being made. You can define the side-effects of each state transition, such as what should happen when an order goes from one state to another (ex: submitted to settled) |
makeBankTransfer
#View the Payments section of the docs.
ResponseReturns a MakeBankTransferResponse
mutation MakeBankTransfer(
$bankTransfer: MakeBankTransferInput!,
$ik: SafeString!
) {
makeBankTransfer(
bankTransfer: $bankTransfer,
ik: $ik
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on MakeBankTransferResult {
...MakeBankTransferResultFragment
}
}
}
{
"bankTransfer": MakeBankTransferInput,
"ik": "some-safe-string-ik"
}
{"data": {"makeBankTransfer": BadRequestError}}
Arguments
Name | Description |
---|---|
bankTransfer - MakeBankTransferInput! | Payload representing the bank transfer to be initiated. |
ik - SafeString! | The Idempotency Key |
reconcileTx
#This mutation is used to reconcile transactions from an external system into a Ledger Entry. This mutation does not require an idempotency key since a transaction can only be reconciled once per Linked Ledger Account. If you are reconciling a transfer between two Link Accounts which are both linked to the same Ledger, use a transit account in between to split the transfer into two reconcileTx calls.
ResponseReturns a ReconcileTxResponse
mutation ReconcileTx($entry: LedgerEntryInput!) {
reconcileTx(entry: $entry) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on ReconcileTxResult {
...ReconcileTxResultFragment
}
}
}
{"entry": LedgerEntryInput}
{"data": {"reconcileTx": BadRequestError}}
Arguments
Name | Description |
---|---|
entry - LedgerEntryInput! | The ledger entry containing lines that specify the transaction from a linked ledger account to reconcile, as well as the ledger account with which to offset the external transaction. |
storeSchema
#EXPERIMENTAL: Store a new ledger schema in FRAGMENT.
ResponseReturns a StoreSchemaResponse
mutation StoreSchema($schema: SchemaInput!) {
storeSchema(schema: $schema) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on StoreSchemaResult {
...StoreSchemaResultFragment
}
}
}
{"schema": SchemaInput}
{"data": {"storeSchema": BadRequestError}}
Arguments
Name | Description |
---|---|
schema - SchemaInput! |
syncCustomAccounts
#Once you've created a Custom Link, create accounts under it using this mutation. Each Custom Account is an immutable, single-entry view of all the transactions in the external account. You can sync up to 100 Custom Accounts in one API call.
ResponseReturns a SyncCustomAccountsResponse
mutation SyncCustomAccounts(
$accounts: [CustomAccountInput!]!,
$link: LinkMatchInput!
) {
syncCustomAccounts(
accounts: $accounts,
link: $link
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on SyncCustomAccountsResult {
...SyncCustomAccountsResultFragment
}
}
}
{
"accounts": [CustomAccountInput],
"link": LinkMatchInput
}
{"data": {"syncCustomAccounts": BadRequestError}}
Arguments
Name | Description |
---|---|
accounts - [CustomAccountInput!]! | A list of external accounts to sync |
link - LinkMatchInput! | An object containing the ID of a Custom Link. |
syncCustomTxs
#You can create transactions under a Custom Account in a Custom Link using this mutation. Once you've imported transactions, you can use the reconcileTx mutation to add them to a Ledger via the Linked Ledger Account. You can sync up to 100 Custom Transactions in one API call.
ResponseReturns a SyncCustomTxsResponse
mutation SyncCustomTxs(
$link: LinkMatchInput!,
$txs: [CustomTxInput!]!
) {
syncCustomTxs(
link: $link,
txs: $txs
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on SyncCustomTxsResult {
...SyncCustomTxsResultFragment
}
}
}
{
"link": LinkMatchInput,
"txs": [CustomTxInput]
}
{"data": {"syncCustomTxs": BadRequestError}}
Arguments
Name | Description |
---|---|
link - LinkMatchInput! | An object containing the ID of a Custom Link. |
txs - [CustomTxInput!]! | A list of external transactions to sync |
updateLedger
#Updates a ledger. Only supports name right now.
ResponseReturns an UpdateLedgerResponse
mutation UpdateLedger(
$ledger: LedgerMatchInput!,
$update: UpdateLedgerInput!
) {
updateLedger(
ledger: $ledger,
update: $update
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on UpdateLedgerResult {
...UpdateLedgerResultFragment
}
}
}
{
"ledger": LedgerMatchInput,
"update": UpdateLedgerInput
}
{"data": {"updateLedger": BadRequestError}}
Arguments
Name | Description |
---|---|
ledger - LedgerMatchInput! | An object containing the ID of the ledger to update |
update - UpdateLedgerInput! | The payload containing the fields to update. Currency, only the name can be updated. |
updateLedgerAccount
#Updates a ledger account. Only supports name right now.
ResponseReturns an UpdateLedgerAccountResponse
mutation UpdateLedgerAccount(
$ledgerAccount: LedgerAccountMatchInput!,
$update: UpdateLedgerAccountInput!
) {
updateLedgerAccount(
ledgerAccount: $ledgerAccount,
update: $update
) {
... on BadRequestError {
...BadRequestErrorFragment
}
... on InternalError {
...InternalErrorFragment
}
... on UpdateLedgerAccountResult {
...UpdateLedgerAccountResultFragment
}
}
}
{
"ledgerAccount": LedgerAccountMatchInput,
"update": UpdateLedgerAccountInput
}
{"data": {"updateLedgerAccount": BadRequestError}}
Arguments
Name | Description |
---|---|
ledgerAccount - LedgerAccountMatchInput! | The Ledger Account that is being updated |
update - UpdateLedgerAccountInput! | The payload containing the fields to update. Currency, only the name can be updated. |
AddLedgerEntryResponse
#AddLedgerEntryResult
#{
"entry": LedgerEntry,
"isIkReplay": true,
"lines": [LedgerLine]
}
Field Name | Description |
---|---|
entry - LedgerEntry! | The ledger entry that was posted |
isIkReplay - Boolean! | True if this request successfully completed before and the previous response is being returned |
lines - [LedgerLine!]! | The ledger lines that were created in that entry |
BadRequestError
#Equivalent to an HTTP 400 - request either has missing or incorrect data
{"code": "abc123", "message": "abc123", "retryable": true}
Field Name | Description |
---|---|
code - String! | The HTTP status code corresponding to the error |
message - String! | The error message |
retryable - Boolean! | Whether or not the operation is retryable |
BankTransfer
#{
"description": "abc123",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"order": Order,
"status": "failed"
}
Field Name | Description |
---|---|
description - String! | |
id - ID! | |
order - Order! | Internally, BankTransfers are stored as Orders. |
status - BankTransferStateMachineStatus! |
BankTransferStateMachine
#{
"status": "failed",
"transitionLog": [BankTransferStateMachineTransitionLog]
}
Field Name | Description |
---|---|
status - BankTransferStateMachineStatus! | |
transitionLog - [BankTransferStateMachineTransitionLog!]! |
BankTransferStateMachineConfigInput
#{"transitions": BankTransferStateMachineTransitionsInput}
Input Field | Description |
---|---|
transitions - BankTransferStateMachineTransitionsInput! |
BankTransferStateMachineEffect
#{"entry": LedgerEntry}
Field Name | Description |
---|---|
entry - LedgerEntry! | The side effect that was automatically applied |
BankTransferStateMachineEffectInput
#The side effect that is automatically applied when this state transition occurs
{"entry": LedgerEntryInput}
Input Field | Description |
---|---|
entry - LedgerEntryInput! |
BankTransferStateMachineInput
#{"config": BankTransferStateMachineConfigInput}
Input Field | Description |
---|---|
config - BankTransferStateMachineConfigInput! |
BankTransferStateMachineStatus
#"failed"
Enum Value | Description |
---|---|
failed | |
returned | |
settled | |
submitted |
BankTransferStateMachineTransition
#"failed_to_submitted"
Enum Value | Description |
---|---|
failed_to_submitted | |
on_submitted | |
returned_to_submitted | |
settled_to_returned | |
submitted_to_failed | |
submitted_to_settled |
BankTransferStateMachineTransitionLog
#{
"effect": BankTransferStateMachineEffect,
"timestamp": "2007-12-03T10:15:30Z",
"transition": "failed_to_submitted"
}
Field Name | Description |
---|---|
effect - BankTransferStateMachineEffect | |
timestamp - DateTime | |
transition - BankTransferStateMachineTransition! |
BankTransferStateMachineTransitionsInput
#A mapping of bank transfer state transition -> side effect for a bank transfer.
{
"failed_to_submitted": BankTransferStateMachineEffectInput,
"on_submitted": BankTransferStateMachineEffectInput,
"returned_to_submitted": BankTransferStateMachineEffectInput,
"settled_to_returned": BankTransferStateMachineEffectInput,
"submitted_to_failed": BankTransferStateMachineEffectInput,
"submitted_to_settled": BankTransferStateMachineEffectInput
}
Input Field | Description |
---|---|
failed_to_submitted - BankTransferStateMachineEffectInput | The state transition that occurs when a failed Order is re-submitted. This retry mechanism is currently not supported. |
on_submitted - BankTransferStateMachineEffectInput | The state transition that occurs when createOrder is called (i.e. submitted). |
returned_to_submitted - BankTransferStateMachineEffectInput | The state transition that occurs when a returned Order is re-submitted. This retry mechanism is currently not supported. |
settled_to_returned - BankTransferStateMachineEffectInput | The state transition that occurs when a settled payment later is returned / reversed. This can happen due to fraud. |
submitted_to_failed - BankTransferStateMachineEffectInput | The state transition that occurs if a Order fails after it is successfully submitted but before it settles (e.g. insufficient funds on an ACH debit). |
submitted_to_settled - BankTransferStateMachineEffectInput! | The state transition that occurs when a successfully submitted Order settles at your bank (i.e. the payment "clears"). |
Boolean
#The Boolean scalar type represents true or false.
true
ChartOfAccountsInput
#The input for your Chart of Accounts in a Schema.
{
"accounts": [SchemaLedgerAccountInput],
"defaultCurrency": CurrencyMatchInput,
"defaultCurrencyMode": "multi"
}
Input Field | Description |
---|---|
accounts - [SchemaLedgerAccountInput!]! | The Ledger Accounts modeled by your Schema. |
defaultCurrency - CurrencyMatchInput | The default currency of each Ledger Account in the Chart Of Accounts. It must be provided if defaultCurrencyMode is set to single . Additionally, defaultCurrency must be omitted if defaultCurrencyMode is set to multi . |
defaultCurrencyMode - CurrencyMode | The default currency mode of each Ledger Account in the Chart Of Accounts. |
CreateCustomCurrencyInput
#{
"customCode": "abc123",
"customCurrencyId": "some-safe-string-ik",
"name": "abc123",
"precision": 2277
}
Input Field | Description |
---|---|
customCode - String! | The currency code for custom currencies. It can be up to 5 characters long. This is used for display purposes. |
customCurrencyId - SafeString! | The ID for a custom currency. This is specified when creating the custom currency using the createCustomCurrency mutation. |
name - String! | A human readable name for the currency (e.g. United States Dollar). This is used for display purposes. |
precision - Int! | The number of decimal places this currency goes to. For example, United States Dollars have a precision of 2 (i.e. 100 cents in a dollar), whereas the Jordanian Dinar has a precision of 3. This is used for display purposes. |
CreateCustomCurrencyResponse
#CreateCustomLinkResponse
#CreateLedgerAccountInput
#{
"currency": CurrencyMatchInput,
"currencyMode": "multi",
"linkedAccount": ExternalAccountMatchInput,
"name": "abc123",
"parent": LedgerAccountMatchInput,
"type": "asset"
}
Input Field | Description |
---|---|
currency - CurrencyMatchInput | The currency of this Ledger Account. If this is not set, and currencyMode is not set to multi , the workspace-level default is used. |
currencyMode - CurrencyMode | If set to multi , creates a multi-currency Ledger Account. If set to single , creates a single-currency Ledger Account. |
linkedAccount - ExternalAccountMatchInput | The External Account to link to this Ledger Account. |
name - String! | The human-readable name of this 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. If not provided, the type will be inferred from the parent. |
CreateLedgerAccountResponse
#CreateLedgerAccountResult
#{"isIkReplay": true, "ledgerAccount": LedgerAccount}
Field Name | Description |
---|---|
isIkReplay - Boolean! | true if a previous request successfully created this ledger account |
ledgerAccount - LedgerAccount! | The ledger account that was created |
CreateLedgerAccountsInput
#{
"childLedgerAccounts": [CreateLedgerAccountsInput],
"currency": CurrencyMatchInput,
"currencyMode": "multi",
"ik": "some-safe-string-ik",
"linkedAccount": ExternalAccountMatchInput,
"name": "abc123",
"parent": LedgerAccountMatchInput,
"type": "asset"
}
Input Field | Description |
---|---|
childLedgerAccounts - [CreateLedgerAccountsInput!] | Ledger Accounts to create as children of this Ledger Account. |
currency - CurrencyMatchInput | The currency of this Ledger Account. If this is not set, the workspace level default is used. |
currencyMode - CurrencyMode | The currency mode of this Ledger Account. If this is not set, the workspace level default is used. |
ik - SafeString! | The idempotency key for creating this Ledger Account. |
linkedAccount - ExternalAccountMatchInput | The External Account to link to this Ledger Account. This can only be specified on leaf Ledger Accounts. See Reconcilation . |
name - String! | The name of the Ledger Account. |
parent - LedgerAccountMatchInput | The parent of this Ledger Account. This is only valid on the top level Ledger Account in the payload. |
type - LedgerAccountTypes | The type of this Ledger Account. This field is only required if this is a root Ledger Account. Otherwise, the type will get inherited from its parent. |
CreateLedgerAccountsResponse
#CreateLedgerAccountsResult
#{
"ikReplays": [IkReplay],
"ledgerAccounts": [LedgerAccount]
}
Field Name | Description |
---|---|
ikReplays - [IkReplay!]! | Whether the ledger accounts were successfully created by a previous request |
ledgerAccounts - [LedgerAccount!]! | The ledger accounts that were created |
CreateLedgerInput
#{"balanceUTCOffset": "-08:00", "name": "abc123", "type": "double"}
Input Field | Description |
---|---|
balanceUTCOffset - UTCOffset | Use this field to specify a timezone for queries to your Ledger. 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 balances. For example, use "-08:00" to align balances with Pacific Standard Time. Balance queries would then consider the start of each local day to be at 8am UTC the next day in UTC. The default timezone is UTC. |
name - String! | |
type - LedgerTypes |
CreateLedgerResponse
#CreateOrderInput
#{
"description": "abc123",
"entry": LedgerEntryInput,
"stateMachine": CreateOrderStateMachineInput
}
Input Field | Description |
---|---|
description - String | |
entry - LedgerEntryInput | The entry to post on bank transfer settlement. This is the same as specifying stateMachine.payment.submitted_to_settled |
stateMachine - CreateOrderStateMachineInput | A configuration representing the state machine for this Order. Currently, only bank transfer state machines are supported, but in the future we plan to extend this API to support more Order types (e.g: crypto transfers, brokerage orders) |
CreateOrderResponse
#CreateOrderResult
#{
"entry": LedgerEntry,
"isIkReplay": 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
#{"bankTransfer": BankTransferStateMachineInput}
Input Field | Description |
---|---|
bankTransfer - BankTransferStateMachineInput! |
Currency
#{
"code": "AAVE",
"customCode": "abc123",
"customCurrencyId": "some-safe-string-ik",
"name": "abc123",
"precision": 2277
}
Field Name | Description |
---|---|
code - CurrencyCode! | The currency code. This is an enum type . |
customCode - String | The currency code for custom currencies. This is only set if 'currency' is set to CUSTOM. It can be up to 32 characters long. |
customCurrencyId - SafeString | The ID for a custom currency. This is specified when creating the custom currency using the createCustomCurrency mutation. |
name - String! | A human readable name for the currency (e.g. United States Dollar). This is used for display purposes. |
precision - Int! | The number of decimal places this currency goes to. For example, United States Dollars have a precision of 2 (i.e. 100 cents in a dollar), whereas the Jordanian Dinar has a precision of 3. This is used for display purposes. |
CurrencyAmountConnection
#A paginated list of amounts with their currencies
{
"nodes": [CurrencyAmount],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [CurrencyAmount!] | The current page of results |
pageInfo - PageInfo! | Pagination info for this list |
CurrencyCode
#"AAVE"
Enum Value | Description |
---|---|
AAVE | |
ADA | |
AED | |
AFN | |
ALL | |
AMD | |
ANG | |
AOA | |
ARS | |
AUD | |
AWG | |
AZN | |
BAM | |
BBD | |
BCH | |
BDT | |
BGN | |
BHD | |
BIF | |
BMD | |
BND | |
BOB | |
BRL | |
BSD | |
BTC | |
BTN | |
BWP | |
BYR | |
BZD | |
CAD | |
CDF | |
CHF | |
CLP | |
CNY | |
COP | |
CRC | |
CUC | |
CUP | |
CUSTOM | |
CVE | |
CZK | |
DAI | |
DJF | |
DKK | |
DOP | |
DZD | |
EGP | |
ERN | |
ETB | |
ETH | |
EUR | |
FJD | |
FKP | |
GBP | |
GEL | |
GGP | |
GHS | |
GIP | |
GMD | |
GNF | |
GTQ | |
GYD | |
HKD | |
HNL | |
HRK | |
HTG | |
HUF | |
IDR | |
ILS | |
IMP | |
INR | |
IQD | |
IRR | |
ISK | |
JMD | |
JOD | |
JPY | |
KES | |
KGS | |
KHR | |
KMF | |
KPW | |
KRW | |
KWD | |
KYD | |
KZT | |
LAK | |
LBP | |
LINK | |
LKR | |
LOGICAL | |
LRD | |
LSL | |
LTC | |
LYD | |
MAD | |
MATIC | |
MDL | |
MGA | |
MKD | |
MMK | |
MNT | |
MOP | |
MUR | |
MVR | |
MWK | |
MXN | |
MYR | |
MZN | |
NAD | |
NGN | |
NIO | |
NOK | |
NPR | |
NZD | |
OMR | |
PAB | |
PEN | |
PGK | |
PHP | |
PKR | |
PLN | |
PYG | |
QAR | |
RON | |
RSD | |
RUB | |
RWF | |
SAR | |
SBD | |
SCR | |
SDG | |
SEK | |
SGD | |
SHP | |
SLL | |
SOL | |
SOS | |
SPL | |
SRD | |
STN | |
SVC | |
SYP | |
SZL | |
THB | |
TJS | |
TMT | |
TND | |
TOP | |
TRY | |
TTD | |
TVD | |
TWD | |
TZS | |
UAH | |
UGX | |
UNI | |
USD | |
USDC | |
USDT | |
UYU | |
UZS | |
VEF | |
VND | |
VUV | |
WST | |
XAF | |
XCD | |
XLM | |
XOF | |
XPF | |
YER | |
ZAR | |
ZMW |
CurrencyMatchInput
#{"code": "AAVE", "customCurrencyId": "some-safe-string-ik"}
Input Field | Description |
---|---|
code - CurrencyCode! | The currency code. This is an enum type . |
customCurrencyId - SafeString | The ID for a custom currency. This is specified when creating the custom currency using the createCustomCurrency mutation. |
CurrencyMode
#Defines the currency handling of a LedgerAccount, which can either be restricted to a single currency or allow multiple currencies.
"multi"
Enum Value | Description |
---|---|
multi | |
single |
CustomAccountInput
#{
"currency": CurrencyMatchInput,
"currencyMode": "multi",
"externalId": "some-safe-string-ik",
"name": "abc123"
}
Input Field | Description |
---|---|
currency - CurrencyMatchInput | The currency of this external account. If this is not set, the workspace level default is used. 'currency' cannot be set if 'currencyMode' is 'multi'. |
currencyMode - CurrencyMode | The currency mode of this external account. If set to multi, creates a multi-currency account. |
externalId - SafeString! | The ID of this account at the external system. This is used as the idempotency key, within the scope of its Custom Link. |
name - String! | The name of the account at the external system. |
CustomCurrenciesConnection
#{
"nodes": [Currency],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [Currency!]! | |
pageInfo - PageInfo! |
CustomTxInput
#{
"account": ExternalAccountMatchInput,
"amount": "999999999999",
"currency": CurrencyMatchInput,
"description": "abc123",
"externalId": "some-safe-string-ik",
"posted": "2007-12-03T10:15:30Z"
}
Input Field | Description |
---|---|
account - ExternalAccountMatchInput! | |
amount - Int96! | |
currency - CurrencyMatchInput | The currency of this tx. Should be set for multi-currency accounts. |
description - String! | |
externalId - SafeString! | The ID of this tx at the external system. This is used as the idempotency key, within the scope of its Custom Account. |
posted - DateTime! |
Date
#ISO 8601 Date e.g. 1969-07-21
"2022-03-28"
DateTime
#ISO 8601 DateTime e.g. 1969-07-16T13:32:00.000Z. You can also provide a date e.g. 1969-01-01 and it will be converted to 1969-01-01T00:00:00.000Z
"2007-12-03T10:15:30Z"
DateTimeFilter
#Filters a timestamp field between two moments in time
{"after": "2007-12-03T10:15:30Z", "before": "2007-12-03T10:15:30Z"}
Input Field | Description |
---|---|
after - DateTime | The timestamp value must be after this moment. Specified in ISO 8601 format e.g "1968-01-01T16:45:00Z" |
before - DateTime | The timestamp value must be before this moment. Specified in ISO 8601 format e.g "1968-01-01T16:45:00Z" |
ExternalAccount
#{
"currency": Currency,
"currencyMode": "multi",
"externalId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"linkId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"name": "abc123"
}
Field Name | Description |
---|---|
currency - Currency | The currency of this external account. |
currencyMode - CurrencyMode! | Indicates if the account allows multiple currencies or is restricted to a single currency |
externalId - ID! | ID used for the external account |
id - ID! | Fragment ID of External Account |
linkId - ID! | Fragment ID of this transaction's external link |
name - String! |
ExternalAccountFilter
#{
"equalTo": ExternalAccountMatchInput,
"in": [ExternalAccountMatchInput]
}
Input Field | Description |
---|---|
equalTo - ExternalAccountMatchInput | Ledger account must linked to the the specified external account |
in - [ExternalAccountMatchInput!] | Ledger account can be linked to any of the specified external accounts |
ExternalAccountMatchInput
#Specify an External Account by using id, or linkId and externalId.
{
"externalId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"linkId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
Input Field | Description |
---|---|
externalId - ID | The external system's ID of the External Account. If this is specified, linkId is required. id is optional, but will be validated if provided. |
id - ID | The Fragment ID of the External Account. If this is specified, both linkId and externalId are optional, but will be validated if provided. |
linkId - ID | The Fragment ID of the Link the External Account is in. If this is specified, externalId is required. id is optional, but will be validated if provided. |
ExternalTransferType
#"ach"
Enum Value | Description |
---|---|
ach | |
card | |
check | |
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.
"3116551f-5efc-4c9e-84ac-5a36a51b09c1"
IkReplay
#{"ik": "some-safe-string-ik", "isIkReplay": true}
Field Name | Description |
---|---|
ik - SafeString! | |
isIkReplay - Boolean! |
IncreaseEnv
#"production"
Enum Value | Description |
---|---|
production | |
sandbox |
IncreaseLink
#{
"created": "abc123",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"increaseEnv": "production",
"name": "abc123"
}
Field Name | Description |
---|---|
created - String! | |
id - ID! | |
increaseEnv - IncreaseEnv! | |
name - String! |
IncreasePaymentDetailsInput
#{"wire": IncreaseWirePaymentDetailsInput}
Input Field | Description |
---|---|
wire - IncreaseWirePaymentDetailsInput |
IncreaseWirePaymentDetailsInput
#Int
#The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
2277
Int96
#A string representing integers as big as 2^96-1. The number is signed so the range is from -79,228,162,514,264,337,593,543,950,336 to 79,228,162,514,264,337,593,543,950,336.
"999999999999"
InternalError
#Equivalent to an HTTP 5XX - something went wrong with our API.
{"code": "abc123", "message": "abc123", "retryable": true}
Field Name | Description |
---|---|
code - String! | The HTTP status code corresponding to the error |
message - String! | The error message |
retryable - Boolean! | Whether or not the operation is retryable |
JSON
#The JSON scalar type represents JSON values as specified by ECMA-404.
"{"key":"value"}"
LastMoment
#The last moment of a specific year, month or day or hour e.g. 1969 or 1969-12 or 1969-12-31 or 1969-12-31T23. All of the previous examples are equivalent to 1969-12-31T23:59:59.999.
"2021-07"
Ledger
#Ledgers are databases designed for managing money
{
"balanceUTCOffset": "-08:00",
"created": "2007-12-03T10:15:30Z",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ik": "some-safe-string-ik",
"ledgerAccounts": LedgerAccountsConnection,
"ledgerEntries": LedgerEntriesConnection,
"migrations": LedgerMigrationConnection,
"name": "abc123",
"schema": Schema,
"type": "double",
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
Field Name | Description |
---|---|
balanceUTCOffset - UTCOffset! | When aggregating balances, all transactions within a 24 hour period starting at midnight UTC plus this offset are included in each day. |
created - DateTime! | |
id - ID! | |
ik - SafeString! | The IK passed into the createLedger mutation. This is treated as a unique identifier for this ledger. |
ledgerAccounts - LedgerAccountsConnection | Query LedgerAccounts in Ledger. Ledgers are paginated and returned in reverse-chronological order by their created date. |
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 (reverse-chronological order by their created date). 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 (chronological order by their created date). Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. | |
ledgerEntries - LedgerEntriesConnection | Query Ledger Entries in a Ledger. Ledger Entries are paginated and sorted in reverse-chronological order by posted date. |
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 (reverse chronological order by posted date). 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 (chronological order by posted date). Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. | |
migrations - LedgerMigrationConnection | Schema migrations affecting this ledger. |
name - String! | The name of the ledger. Can be updated with the updateLedger mutation. |
schema - Schema | Schema key associated with this ledger. |
type - LedgerTypes! | |
workspaceId - ID! | Callers should not need to query or store this value. |
LedgerAccount
#A ledger account is a container for money
{
"balance": "999999999999",
"balanceChange": "999999999999",
"balanceChanges": CurrencyAmountConnection,
"balances": CurrencyAmountConnection,
"childBalance": "999999999999",
"childBalanceChange": "999999999999",
"childBalanceChanges": CurrencyAmountConnection,
"childBalances": CurrencyAmountConnection,
"created": "2007-12-03T10:15:30Z",
"currency": Currency,
"currencyMode": "multi",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ik": "abc123",
"ledger": Ledger,
"ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"lines": LedgerLinesConnection,
"link": Link,
"linkedAccount": ExternalAccount,
"name": "abc123",
"ownBalance": "999999999999",
"ownBalanceChange": "999999999999",
"ownBalances": CurrencyAmountConnection,
"parentLedgerAccount": LedgerAccount,
"parentLedgerAccountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"path": "abc123",
"type": "asset",
"unreconciledTxs": TxsConnection,
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
Field Name | Description |
---|---|
balance - Int96! | Total of all lines in this ledger account and child ledger accounts of the same currency as this ledger account |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-03 or 1969-07-21T02 currency - CurrencyMatchInput | |
balanceChange - Int96! | How much did the this ledger account's balance change during the specified period. This query will include all child accounts in the same currency as this ledger account. |
Arguments currency - CurrencyMatchInput period - Period! Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
balanceChanges - CurrencyAmountConnection! | How much did the this ledger account's balances change during the specified period. This query will include all child accounts of all currencies |
Arguments period - Period! Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
balances - CurrencyAmountConnection! | Total of all lines in this ledger account and child ledger accounts in all currencies |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
childBalance - Int96! | Total of all lines in child ledger accounts of the same currency as this ledger account |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 currency - CurrencyMatchInput | |
childBalanceChange - Int96! | How much did the this ledger account's childBalance change during the specified period. This query will only include child accounts which are in the same currency as this one. See childBalanceChanges to include children of different currencies. |
Arguments currency - CurrencyMatchInput period - Period! Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
childBalanceChanges - CurrencyAmountConnection! | How much did the this ledger account's child accounts' balances change during the specified period. This query will include all child accounts of all currencies |
Arguments period - Period! Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
childBalances - CurrencyAmountConnection! | Total of all lines in child ledger accounts of this ledger in all currencies |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
created - DateTime! | |
currency - Currency | Currency of this ledger account |
currencyMode - CurrencyMode! | Indicates if the account allows multiple currencies or is restricted to a single currency |
id - ID! | |
ik - String! | The idempotency key used to create this account |
ledger - Ledger! | Ledger this account is in |
ledgerId - ID! | ID of the ledger this account is in |
lines - LedgerLinesConnection! | List Ledger Lines in this account, sorted by posted in reverse chronological order. Does not include Ledger Lines from child 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. filter - LedgerLinesFilterSet Filter the Ledger Lines returned. Learn more about filtering. first - Int How many Ledger Lines to return per page, when paginating forwards (reverse-chronological order by posted date). 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 (chronological order by posted date). 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 - Int96! | Total of all lines in this ledger account, excluding all child ledger accounts |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 currency - CurrencyMatchInput | |
ownBalanceChange - Int96! | How much did the this ledger account's ownBalance change during the specified period. This query will exclude all child accounts. |
Arguments currency - CurrencyMatchInput period - Period! Specifies the period of time over which this query will calculate the balance difference e.g. 1969 or 1969-Q3 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
ownBalances - CurrencyAmountConnection! | Total of all lines across all currencies in this ledger account, excluding all child ledger accounts |
Arguments at - LastMoment Provide a timestamp to get this balance at a specific logical time. If not specified, the latest value will be returned e.g. 1969 or 1969-07 or 1969-07-21 or 1969-07-21T02 | |
parentLedgerAccount - LedgerAccount | The parent ledger account of this ledger account |
parentLedgerAccountId - ID | ID of the parent ledger account of this ledger account |
path - String! | The unique Path of the ledger account. This is a slash-delimited string containing the location of an account in its chart of accounts. For accounts created with a schema, this will be composed of account keys. Else, for accounts created with the createLedgerAccounts API, this will be composed of the IKs of an account and its ancestors. |
type - LedgerAccountTypes! | |
unreconciledTxs - TxsConnection | A list of external account transactions that haven't been reconciled to this ledger account yet. Only populated for linked ledger accounts. Transactions are sorted in reverse chronological order by posted date. |
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 (reverse-chronological order by posted date). 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 (chronological order by posted date). Once you start paginating, the page size can't be changed. Defaults to 20, maximum is 200. | |
workspaceId - ID! | Callers should not need to query or store this value. |
LedgerAccountFilter
#{
"equalTo": LedgerAccountMatchInput,
"in": [LedgerAccountMatchInput]
}
Input Field | Description |
---|---|
equalTo - LedgerAccountMatchInput | Result must be the specified ledger account |
in - [LedgerAccountMatchInput!] | Results can be any of specified ledger accounts |
LedgerAccountMatchInput
#{
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ledger": LedgerMatchInput,
"path": "abc123"
}
Input Field | Description |
---|---|
id - ID | The Fragment ID of the ledger account |
ledger - LedgerMatchInput | |
path - String | The unique path of the ledger account. For accounts in a schematized ledger, this is a slash-delimited string containing the keys of an account and all its direct ancestors. For accounts created via the createLedgerAccounts mutation, this is a slash-delimited string containing the IK of an account and all its direct ancestors. |
LedgerAccountTypeFilter
#{"equalTo": "asset", "in": ["asset"]}
Input Field | Description |
---|---|
equalTo - LedgerAccountTypes | Results must have the specified ledger account type |
in - [LedgerAccountTypes!] | Results can have any of the specified ledger account types |
LedgerAccountTypes
#"asset"
Enum Value | Description |
---|---|
asset | |
expense | |
income | |
liability |
LedgerAccountsConnection
#{
"nodes": [LedgerAccount],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [LedgerAccount!] | |
pageInfo - PageInfo! |
LedgerAccountsFilterSet
#{
"hasParentLedgerAccount": true,
"isLinkedAccount": 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
#{
"nodes": [LedgerEntry],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [LedgerEntry!] | |
pageInfo - PageInfo! |
LedgerEntriesFilterSet
#{
"date": DateFilter,
"posted": DateTimeFilter,
"type": StringFilter
}
Input Field | Description |
---|---|
date - DateFilter | |
posted - DateTimeFilter | |
type - StringFilter | Use this to filter Ledger Entries by type. Ledger Entry types are defined in Schemas. |
LedgerEntry
#{
"created": "2007-12-03T10:15:30Z",
"date": "2022-03-28",
"description": "abc123",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ledger": Ledger,
"ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"lines": LedgerLinesConnection,
"order": Order,
"orderId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"posted": "2007-12-03T10:15:30Z",
"type": "some-safe-string-ik",
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
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! | The Ledger that this Ledger Entry is posted to. |
ledgerId - ID! | The ID of the Ledger this Ledger Entry is posted to. |
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. |
type - SafeString | The type of the Ledger Entry. |
workspaceId - ID! | Callers should not need to query or store this value. |
LedgerEntryInput
#Ledger Entries are limited to 40 units, where units are calculated with the following formula: '3 base units + 1 unit per Ledger Line + 2 units per Ledger Account' So a basic ledger entry with two Ledger Lines on two different accounts would be: '3 base + 2 for Ledger Lines + 4 for accounts = 9 units' If you're only affecting two Ledger Accounts, you can include 33 Ledger Lines, but if every Ledger Line is for a different Ledger Account, you can send only 12 Ledger Lines.
{
"description": "abc123",
"ledger": LedgerMatchInput,
"lines": [LedgerLineInput],
"parameters": "{"key":"value"}",
"posted": "2007-12-03T10:15:30Z",
"type": "abc123"
}
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 |
ledger - LedgerMatchInput | The Ledger to which to post this Ledger Entry. Must be linked to a Schema that defines the provided Ledger Entry type. |
lines - [LedgerLineInput!] | The Ledger Lines to create as part of this Ledger Entry. This cannot be used with Ledger Entries that have a 'type' i.e. Ledger Entries defined in the Schema. This can be useful during non-routine operations such as an incident. It is not recommended to use 'lines' during routine operations. |
parameters - JSON | Parameters to be included in a templated Ledger Entry. All provided parameters must be present in the typed Ledger Entry within the Schema linked to the provided Ledger. |
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 |
type - String | The type of the Ledger Entry. Must be defined in the Schema linked to the Ledger specified below. |
LedgerLine
#{
"account": LedgerAccount,
"accountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"amount": "999999999999",
"created": "2007-12-03T10:15:30Z",
"currency": Currency,
"date": "2022-03-28",
"description": "abc123",
"externalTransferId": "abc123",
"externalTransferType": "ach",
"externalTxId": "abc123",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"key": "abc123",
"ledger": Ledger,
"ledgerEntryId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"otherTxExternalAccountExternalId": "abc123",
"otherTxExternalAccountId": "abc123",
"otherTxExternalId": "abc123",
"otherTxId": "abc123",
"posted": "2007-12-03T10:15:30Z",
"txId": "abc123",
"type": "credit",
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
Field Name | Description |
---|---|
account - LedgerAccount! | LedgerAccount that contains this line |
accountId - ID! | |
amount - Int96! | 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! | |
key - String | |
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! | Callers should not need to query or store this value. |
LedgerLineInput
#{
"account": LedgerAccountMatchInput,
"amount": "999999999999",
"currency": CurrencyMatchInput,
"description": "abc123",
"key": "abc123",
"payment": PaymentInput,
"tx": TxMatchInput
}
Input Field | Description |
---|---|
account - LedgerAccountMatchInput! | The LedgerAccount this line is being added to |
amount - Int96 | 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 |
key - String | Optional identifier for Ledger Line. You can filter lines by key using LedgerLinesFilterSet . |
payment - PaymentInput | Required for createOrder if adding a line to a linked ledger account |
tx - TxMatchInput | Required for reconcileTx to specify the transaction being reconciled, you can specify either the Fragment ID or external ID of the transaction |
LedgerLinesConnection
#{
"nodes": [LedgerLine],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [LedgerLine!] | |
pageInfo - PageInfo! |
LedgerLinesFilterSet
#{
"date": DateFilter,
"key": StringFilter,
"posted": DateTimeFilter,
"type": TxTypeFilter
}
Input Field | Description |
---|---|
date - DateFilter | |
key - StringFilter | Use this to filter Ledger Lines by key. Ledger Line keys are defined in Schemas. |
posted - DateTimeFilter | |
type - TxTypeFilter |
LedgerMatchInput
#{"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1", "ik": "some-safe-string-ik"}
Input Field | Description |
---|---|
id - ID | The Fragment ID of the ledger |
ik - SafeString | The IK passed into the createLedger mutation. This is treated as a second unique identifier for this ledger. |
LedgerMigration
#Represents a Schema being applied to a Ledger. It contains metadata about the Ledger, the Schema, and the status of the migration.
{
"ledger": Ledger,
"schemaVersion": SchemaVersion,
"status": "completed"
}
Field Name | Description |
---|---|
ledger - Ledger! | The Ledger that the migration is run on. |
schemaVersion - SchemaVersion! | |
status - LedgerMigrationStatus! | The status of the Ledger Migration. |
LedgerMigrationConnection
#A paginated list of Ledger Migrations
{
"nodes": [LedgerMigration],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [LedgerMigration!]! | The current page of results. |
pageInfo - PageInfo! | Pagination info for this list. |
LedgerMigrationStatus
#The status of a ledger migration.
"completed"
Enum Value | Description |
---|---|
completed | The Ledger Migration has been successfully completed. This is a terminal state. |
failed | The Ledger Migration has failed. This can happen either due to an invalid schema or an internal error. This is a terminal state. |
queued | The Ledger Migration has been queued. |
skipped | The Ledger Migration has been skipped because a newer version is available. This is a terminal state. |
started | The Ledger Migration has been started. |
LedgerTypeFilter
#{"equalTo": "double", "in": ["double"]}
Input Field | Description |
---|---|
equalTo - LedgerTypes | |
in - [LedgerTypes!] |
LedgerTypes
#"double"
Enum Value | Description |
---|---|
double |
LedgersFilterSet
#MakeBankTransferInput
#{
"amount": "999999999999",
"description": "abc123",
"linkedLedgerAccount": LedgerAccountMatchInput,
"offset": LedgerEntryInput,
"payment": PaymentInput
}
Input Field | Description |
---|---|
amount - Int96! | Positive amount of the transfer being made. |
description - String! | Required. Lines without a description will have their description set to the one provided. |
linkedLedgerAccount - LedgerAccountMatchInput! | The linked LedgerAccount against which this transfer will be made. |
offset - LedgerEntryInput! | The offsetting entry to post on bank transfer settlement. The ledger line for the transfer against the linked account will be included, by default, so it's not required to include the linked account. |
payment - PaymentInput! | Payment information for the account the pay in/out is made from. |
MakeBankTransferResponse
#MakeBankTransferResult
#{"bankTransfer": BankTransfer, "isIkReplay": true}
Field Name | Description |
---|---|
bankTransfer - BankTransfer! | The bank transfer that was created |
isIkReplay - Boolean! | true if this request successfully completed before and the previous response is being returned |
Order
#{
"description": "abc123",
"entryIds": ["abc123"],
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"stateMachine": OrderStateMachine
}
Field Name | Description |
---|---|
description - String | |
entryIds - [String!] | |
id - ID! | |
stateMachine - OrderStateMachine! |
OrderStateMachine
#{"bankTransfer": BankTransferStateMachine}
Field Name | Description |
---|---|
bankTransfer - BankTransferStateMachine |
ParameterizedString
#A string that can contain parameterized values via handlebars syntax. ex: "Hello from {{country}}".
"Hello {{name}}"
PayeeInput
#{
"accountNumber": "abc123",
"externalAccount": ExternalAccountMatchInput,
"routingNumber": "abc123"
}
Input Field | Description |
---|---|
accountNumber - String | |
externalAccount - ExternalAccountMatchInput | |
routingNumber - String |
PaymentDetailsInput
#{"increase": IncreasePaymentDetailsInput}
Input Field | Description |
---|---|
increase - IncreasePaymentDetailsInput |
PaymentInput
#{
"description": "abc123",
"destination": PayeeInput,
"details": PaymentDetailsInput,
"source": PayeeInput,
"type": "ach"
}
Input Field | Description |
---|---|
description - String | If specified will override the payment description sent, otherwise the line description will be used |
destination - PayeeInput | Should only be supplied if amount is negative |
details - PaymentDetailsInput | Should be used to specify additional integration-specific information |
source - PayeeInput | Should only be supplied if amount is positive and type is ACH |
type - PaymentType! | Currently only ach, wire or is supported |
PaymentType
#"ach"
Enum Value | Description |
---|---|
ach | |
internal | |
wire |
Period
#A specific year ("2021"), quarter ("2021-Q1"), month ("2021-02"), day ("2021-02-03") or hour ("2021-02-03T04")
"2022-Q3"
ReconcileTxResponse
#ReconcileTxResult
#{
"entry": LedgerEntry,
"isIkReplay": true,
"lines": [LedgerLine]
}
Field Name | Description |
---|---|
entry - LedgerEntry! | The ledger entry that was posted |
isIkReplay - Boolean! | True if this request successfully completed before and the previous response is being returned |
lines - [LedgerLine!]! | The ledger lines that were created in that entry |
SafeString
#A string with delimiter characters /, #, and : disallowed, as well as parameters in {{handlebar}} syntax.
"some-safe-string-ik"
Schema
#{
"key": "some-safe-string-ik",
"ledgers": LedgersConnection,
"name": "abc123",
"version": SchemaVersion,
"versions": SchemaVersionConnection
}
Field Name | Description |
---|---|
key - SafeString! | The identifier for a Schema. key is unique to a Workspace. |
ledgers - LedgersConnection | The paginated list of ledgers the Schema has been applied to. |
name - String! | The name of a Schema. It defaults to the key if not provided in your SchemaInput. |
version - SchemaVersion! | The metadata for a specific SchemaVersion. |
Arguments version - Int The version of the schema to retrieve. If this is not provided, the latest version will be returned. | |
versions - SchemaVersionConnection! | A paginated list of SchemaVersions. |
SchemaConnection
#A paginated list of Schemas in a Workspace.
{
"nodes": [Schema],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [Schema!]! | The current page of results. |
pageInfo - PageInfo! | Pagination info for this list. |
SchemaCurrencyMatchInput
#Matches a Currency. Can be a built-in CurrencyCode, custom Currency, or a parameterized string. If you supply a parameterized string, you must pass in a valid CurrencyCode as a parameter when posting a Ledger Entry.
{"code": "Hello {{name}}", "customCurrencyId": "Hello {{name}}"}
Input Field | Description |
---|---|
code - ParameterizedString! | The currency code. This must either be a CurrencyCode or a parameterized string that resolves to a CurrencyCode . |
customCurrencyId - ParameterizedString | The ID for a custom currency. This is specified when creating the custom currency using the createCustomCurrency mutation. |
SchemaExternalAccountMatchInput
#{
"externalId": "Hello {{name}}",
"id": "Hello {{name}}",
"linkId": "Hello {{name}}"
}
Input Field | Description |
---|---|
externalId - ParameterizedString | The External systems's ID of the account |
id - ParameterizedString | The Fragment ID of the external account |
linkId - ParameterizedString | The Fragment ID of the link |
SchemaInput
#Input to the API for creating a Schema.
{
"chartOfAccounts": ChartOfAccountsInput,
"key": "some-safe-string-ik",
"ledgerEntries": SchemaLedgerEntriesInput,
"name": "Hello {{name}}"
}
Input Field | Description |
---|---|
chartOfAccounts - ChartOfAccountsInput! | The Chart of Accounts for the Schema. |
key - SafeString! | The key of the Schema. This is a stable, unique identifier for the Schema. Uniqueness is enforced at the Workspace level. |
ledgerEntries - SchemaLedgerEntriesInput | The Ledger Entries to add to the Schema. |
name - ParameterizedString | The human-readable name of the Schema. |
SchemaLedgerAccountInput
#Models a Ledger Account in a Schema. Upon succesfully storing a Schema, a LedgerAccount will be created for each corresponding non-templated SchemaLedgerAccountInput in your Chart of Accounts.
{
"children": [SchemaLedgerAccountInput],
"currency": SchemaCurrencyMatchInput,
"currencyMode": "multi",
"key": "some-safe-string-ik",
"linkedAccount": SchemaExternalAccountMatchInput,
"name": "Hello {{name}}",
"template": true,
"type": "asset"
}
Input Field | Description |
---|---|
children - [SchemaLedgerAccountInput!] | Ledger Accounts to create as children of this Ledger Account. |
currency - SchemaCurrencyMatchInput | The currency of this Ledger Account. If this is not set, and currencyMode is not set to multi , it is derived from the Chart of Accounts' default. |
currencyMode - CurrencyMode | If set to multi , creates a multi-currency Ledger Account. If set to single , creates a single-currency Ledger Account. |
key - SafeString! | The key of this Ledger Account. Keys are used to formulate the unique path of the Ledger Account in your Chart of Accounts. Siblings must have unique keys. |
linkedAccount - SchemaExternalAccountMatchInput | The External Account to link to this Ledger Account. It must be provided of linked is true. |
name - ParameterizedString | The human-readable name of this Ledger Account. |
template - Boolean | Whether or not this Ledger Account should be templated. |
type - LedgerAccountTypes | The type of ledger account to create. Required if this is a top-level Ledger Account. If not provided, the type will be inferred from the parent. |
SchemaLedgerAccountMatchInput
#Matches a Ledger Account in a Schema.
{"path": "Hello {{name}}"}
Input Field | Description |
---|---|
path - ParameterizedString! | The unique path of the Ledger Account in the Schema. This is a slash-delimited string containing the keys of a Ledger Account and all its direct ancestors. ex: expense-root/subscriptions/netflix For Templated Ledger Accounts, you must supply a parameter in the path that will be used to name an instance of the template. ex: "expense-root/subscriptions/vendor:{{vendor_name}}" |
SchemaLedgerEntriesInput
#The Ledger Entries in your Schema.
{"types": [SchemaLedgerEntryInput]}
Input Field | Description |
---|---|
types - [SchemaLedgerEntryInput!]! | A list of Ledger Entry definitions. |
SchemaLedgerEntryInput
#A Ledger Entry in a Schema. All Ledger Entries defined in a Schema must have a unique type.
{
"description": "Hello {{name}}",
"lines": [SchemaLedgerLineInput],
"type": "some-safe-string-ik"
}
Input Field | Description |
---|---|
description - ParameterizedString | Human-readable description of the Ledger Entry. |
lines - [SchemaLedgerLineInput!] | The Ledger Lines in the Ledger Entry. If provided, when posting a Typed Entry, a LedgerEntry will be posted containing LedgerLines corresponding to the values you provide here. If your lines contain parameters, you must supply values for those parameters that balance out the Ledger Entry. If not provided, lines will be required when posting a Typed Entry. |
type - SafeString! | The type of this Ledger Entry. This is a stable, unique identifier for this entry. Uniqueness is enforced at the Schema level. You can filter on this field when querying for Ledger Entries. See the docs on LedgerEntryFilterSet |
SchemaLedgerLineInput
#A Ledger Line in a Ledger Entry.
{
"account": SchemaLedgerAccountMatchInput,
"amount": "Hello {{name}}",
"currency": SchemaCurrencyMatchInput,
"description": "Hello {{name}}",
"key": "some-safe-string-ik",
"tx": SchemaTxMatchInput
}
Input Field | Description |
---|---|
account - SchemaLedgerAccountMatchInput! | The Ledger Account this Ledger Line will be posted to. It supports parameters in its attributes via handlebars syntax. |
amount - ParameterizedString | The amount of the Ledger Line. It supports parameters via the handlebars syntax and addition (+) and subtraction (-). |
currency - SchemaCurrencyMatchInput | The currency of the Ledger Line. This is required if the Ledger Account has currencyMode multi. It supports parameters in its attributes via handlebars syntax. |
description - ParameterizedString | Human-readable description of the line. |
key - SafeString! | The key for the Ledger Line. Ledger Line keys must be unique within a Ledger Entry. Key can be filtered on as part of the LedgerLinesFilterSet. |
tx - SchemaTxMatchInput | The external transaction to reconcile. This field is required if the Ledger Account being posted to is a Linked Ledger Acccount. Otherwise, this field is disallowed. It supports parameters in its attributes via handlebars syntax. See the docs on reconciliation and Linked Ledger Accounts. |
SchemaMatchInput
#An object used to retrieve a Schema.
{"key": "some-safe-string-ik", "version": 2277}
Input Field | Description |
---|---|
key - SafeString! | The key to retrieve a Schema by. key is unique to a Workspace. |
version - Int | Optional parameter to specify version of requested Schema. If not provided, it defaults to 0, representing the latest available version for the provided Schema key. |
SchemaTxMatchInput
#Matches a transaction at an external system. This is used to specify the transaction being reconciled into a Linked Ledger Account
{"externalId": "Hello {{name}}", "id": "Hello {{name}}"}
Input Field | Description |
---|---|
externalId - ParameterizedString | |
id - ParameterizedString | The external system's ID for the transaction. |
SchemaVersion
#An instance of a Schema stored in a Workspace. A new SchemaVersion is created each time a Schema is stored. It stores the Chart of Accounts and list of Ledger Entries as well as a history of its Ledger migrations.
{"migrations": LedgerMigrationConnection, "version": 2277}
Field Name | Description |
---|---|
migrations - LedgerMigrationConnection | |
version - Int! | The version of the schema. |
SchemaVersionConnection
#A paginated list of SchemaVersions for a given Schema.
{
"nodes": [SchemaVersion],
"pageInfo": PageInfo
}
Field Name | Description |
---|---|
nodes - [SchemaVersion!]! | The current page of results. |
pageInfo - PageInfo! | Pagination info for this list. |
StoreSchemaResponse
#Returned by the storeSchema mutation.
BadRequestError
Union Types |
---|
BadRequestError |
InternalError |
StoreSchemaResult |
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.
"abc123"
SyncCustomAccountsResponse
#SyncCustomAccountsResult
#{"accounts": [ExternalAccount]}
Field Name | Description |
---|---|
accounts - [ExternalAccount!]! | The external accounts that were synced. |
SyncCustomTxsResponse
#Tx
#{
"accountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"amount": "999999999999",
"currency": Currency,
"date": "2022-03-28",
"description": "abc123",
"externalAccountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"externalId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ledgerEntries": LedgerEntriesConnection,
"ledgerEntryIds": ["3116551f-5efc-4c9e-84ac-5a36a51b09c1"],
"ledgerLineIds": ["3116551f-5efc-4c9e-84ac-5a36a51b09c1"],
"ledgerLines": LedgerLinesConnection,
"linkId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"posted": "2007-12-03T10:15:30Z",
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
Field Name | Description |
---|---|
accountId - ID! | Fragment ID of this transaction's external account |
amount - Int96! | Integer amount in cents. Positive indicates money entering the external account, negative indicates money leaving |
currency - Currency | Currency of this Tx |
date - Date! | Date this Tx posted to the external account |
description - String! | Description at the external account (can be overridden within the Fragment Dashboard) |
externalAccountId - ID! | ID in the external system of this transaction's external account |
externalId - ID! | ID of this transaction in the external system |
id - ID! | |
ledgerEntries - LedgerEntriesConnection | Returns ledger entries that are linked to this transaction. You can link the same external account to multiple ledgers, so there could be multipe entries associated with one transaction - one for each linked ledger account this transaction has been reconciled with |
ledgerEntryIds - [ID!] | Same as ledgerEntries, but returns an array of IDs instead |
ledgerLineIds - [ID!] | Same as ledgerLines, but returns an array of IDs instead |
ledgerLines - LedgerLinesConnection | Returns ledger lines that are linked to this transaction. You can link the same external account to multiple ledgers, so there could be multipe lines associated with one transaction - one for each linked ledger account this transaction has been reconciled with |
linkId - ID! | Fragment ID of this transaction's Link |
posted - DateTime! | ISO-8601 timestamp this Tx posted to the external account |
workspaceId - ID! | Callers should not need to query or store this value. |
TxMatchInput
#{
"accountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"externalAccountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"externalId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"linkId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
Input Field | Description |
---|---|
accountId - ID | The Fragment ID of the external account |
externalAccountId - ID | The external system's ID for the account |
externalId - ID | The external system's ID for the transaction |
id - ID | The Fragment ID of the transaction |
linkId - ID | The Fragment ID of the link |
TxType
#"credit"
Enum Value | Description |
---|---|
credit | |
debit |
UTCOffset
#All hour-aligned offsets from -11:00 to +12:00 are supported, e.g. "-08:00" (PT), "-05:00" (ET), "+00:00" (UTC)
"-08:00"
UnitEnv
#"production"
Enum Value | Description |
---|---|
production | |
sandbox |
UpdateLedgerAccountResponse
#UpdateLedgerAccountResult
#{"ledgerAccount": LedgerAccount}
Field Name | Description |
---|---|
ledgerAccount - LedgerAccount! | The ledger account that was updated |