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
}
}
}
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. |
Get External Account by Link and External ID or FRAGMENT ID.
ResponseReturns an ExternalAccount
query ExternalAccount($externalAccount: ExternalAccountMatchInput!) {
externalAccount(externalAccount: $externalAccount) {
currency {
...CurrencyFragment
}
currencyMode
externalId
id
ledgerAccounts {
...LedgerAccountsConnectionFragment
}
link {
...LinkFragment
}
linkId
name
txs {
...TxsConnectionFragment
}
}
}
{"externalAccount": ExternalAccountMatchInput}
{
"data": {
"externalAccount": {
"currency": Currency,
"currencyMode": "multi",
"externalId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ledgerAccounts": LedgerAccountsConnection,
"link": Link,
"linkId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"name": "abc123",
"txs": TxsConnection
}
}
}
Name | Description |
---|---|
externalAccount - ExternalAccountMatchInput! |
Get a Ledger by ID
ResponseReturns a Ledger
query Ledger($ledger: LedgerMatchInput!) {
ledger(ledger: $ledger) {
balanceUTCOffset
created
dashboardUrl
id
ik
ledgerAccounts {
...LedgerAccountsConnectionFragment
}
ledgerEntries {
...LedgerEntriesConnectionFragment
}
ledgerEntryGroup {
...LedgerEntryGroupFragment
}
ledgerEntryGroups {
...LedgerEntryGroupsConnectionFragment
}
migrations {
...LedgerMigrationConnectionFragment
}
name
schema {
...SchemaFragment
}
type
workspaceId
}
}
{"ledger": LedgerMatchInput}
{
"data": {
"ledger": {
"balanceUTCOffset": "-08:00",
"created": "2007-12-03T10:15:30Z",
"dashboardUrl": "abc123",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ik": "some-safe-string-ik",
"ledgerAccounts": LedgerAccountsConnection,
"ledgerEntries": LedgerEntriesConnection,
"ledgerEntryGroup": LedgerEntryGroup,
"ledgerEntryGroups": LedgerEntryGroupsConnection,
"migrations": LedgerMigrationConnection,
"name": "abc123",
"schema": Schema,
"type": "double",
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
}
}
Name | Description |
---|---|
ledger - LedgerMatchInput! | An object specifying the ID of the ledger you want to query |
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
}
childLedgerAccounts {
...LedgerAccountsConnectionFragment
}
consistencyConfig {
...LedgerAccountConsistencyConfigFragment
}
created
currency {
...CurrencyFragment
}
currencyMode
dashboardUrl
id
ik
ledger {
...LedgerFragment
}
ledgerId
lines {
...LedgerLinesConnectionFragment
}
link {
...LinkFragment
}
linkedAccount {
...ExternalAccountFragment
}
name
ownBalance
ownBalanceChange
ownBalanceChanges {
...CurrencyAmountConnectionFragment
}
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,
"childLedgerAccounts": LedgerAccountsConnection,
"consistencyConfig": LedgerAccountConsistencyConfig,
"created": "2007-12-03T10:15:30Z",
"currency": Currency,
"currencyMode": "multi",
"dashboardUrl": "abc123",
"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",
"ownBalanceChanges": CurrencyAmountConnection,
"ownBalances": CurrencyAmountConnection,
"parentLedgerAccount": LedgerAccount,
"parentLedgerAccountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"path": "abc123",
"type": "asset",
"unreconciledTxs": TxsConnection,
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
}
}
Name | Description |
---|---|
ledgerAccount - LedgerAccountMatchInput! | An object specifying the ID of the ledger account you want to query |
Get Ledger Entry by ID.
ResponseReturns a LedgerEntry
query LedgerEntry($ledgerEntry: LedgerEntryMatchInput!) {
ledgerEntry(ledgerEntry: $ledgerEntry) {
conditions {
...LedgerEntryConditionFragment
}
created
dashboardUrl
date
description
groups {
...LedgerEntryGroupFragment
}
id
ik
ledger {
...LedgerFragment
}
ledgerId
lines {
...LedgerLinesConnectionFragment
}
parameters
posted
tags {
...LedgerEntryTagFragment
}
type
workspaceId
}
}
{"ledgerEntry": LedgerEntryMatchInput}
{
"data": {
"ledgerEntry": {
"conditions": [LedgerEntryCondition],
"created": "2007-12-03T10:15:30Z",
"dashboardUrl": "abc123",
"date": "2022-03-28",
"description": "abc123",
"groups": [LedgerEntryGroup],
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"ik": "abc123",
"ledger": Ledger,
"ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"lines": LedgerLinesConnection,
"parameters": {"bank_name": "bank-name", "deposit_amount": "10000"},
"posted": "2007-12-03T10:15:30Z",
"tags": [LedgerEntryTag],
"type": "some-safe-string-ik",
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
}
}
Name | Description |
---|---|
ledgerEntry - LedgerEntryMatchInput! | An object specifying the ID of the Ledger Entry you want to query. |
Query a Ledger Entry Group given its Ledger, key, and value.
ResponseReturns a LedgerEntryGroup
query LedgerEntryGroup($ledgerEntryGroup: LedgerEntryGroupMatchInput!) {
ledgerEntryGroup(ledgerEntryGroup: $ledgerEntryGroup) {
balances {
...LedgerEntryGroupBalanceConnectionFragment
}
created
dashboardUrl
key
ledger {
...LedgerFragment
}
ledgerEntries {
...LedgerEntriesConnectionFragment
}
ledgerId
value
}
}
{"ledgerEntryGroup": LedgerEntryGroupMatchInput}
{
"data": {
"ledgerEntryGroup": {
"balances": LedgerEntryGroupBalanceConnection,
"created": "2007-12-03T10:15:30Z",
"dashboardUrl": "abc123",
"key": "some-safe-string-ik",
"ledger": Ledger,
"ledgerEntries": LedgerEntriesConnection,
"ledgerId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"value": "some-safe-string-ik"
}
}
}
Name | Description |
---|---|
ledgerEntryGroup - LedgerEntryGroupMatchInput! |
Get LedgerLine 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
}
ledgerEntry {
...LedgerEntryFragment
}
ledgerEntryId
ledgerId
otherTxExternalAccountExternalId
otherTxExternalAccountId
otherTxExternalId
otherTxId
posted
tx {
...TxFragment
}
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,
"ledgerEntry": LedgerEntry,
"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",
"tx": Tx,
"txId": "abc123",
"type": "credit",
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
}
}
Name | Description |
---|---|
ledgerLine - LedgerLineMatchInput! | An object specifying the ID of the LedgerLine you want to query |
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
}
}
}
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 querying Ledgers . |
first - Int | The number of Ledgers to return per page, when paginating forwards. Defaults to 20, maximum is 200. |
last - Int | The number of Ledgers to return per page, when paginating backwards. Defaults to 20, maximum is 200. |
Get a Link by ID. Returns a BadRequestError if the Link is not found.
ResponseReturns a Link
query Link($link: LinkMatchInput!) {
link(link: $link) {
created
dashboardUrl
externalAccounts {
...ExternalAccountsConnectionFragment
}
id
name
}
}
{"link": LinkMatchInput}
{
"data": {
"link": {
"created": "abc123",
"dashboardUrl": "abc123",
"externalAccounts": ExternalAccountsConnection,
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"name": "abc123"
}
}
}
Name | Description |
---|---|
link - LinkMatchInput! | An object containing the ID of the Link you are querying |
Get all links in a workspace
ResponseReturns a LinksConnection!
query Links {
links {
nodes {
...LinkFragment
}
pageInfo {
...PageInfoFragment
}
}
}
{
"data": {
"links": {
"nodes": [Link],
"pageInfo": PageInfo
}
}
}
Get a Schema by key.
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
}
}
}
Name | Description |
---|---|
schema - SchemaMatchInput! | This contains the key of the Schema you want to retrieve. |
Retrieve all of the Schemas in the workspace.
ResponseReturns a SchemaConnection!
query Schemas(
$after: String,
$before: String,
$first: Int,
$last: Int
) {
schemas(
after: $after,
before: $before,
first: $first,
last: $last
) {
nodes {
...SchemaFragment
}
pageInfo {
...PageInfoFragment
}
}
}
{"after": "abc123", "before": "abc123", "first": 2277, "last": 2277}
{
"data": {
"schemas": {
"nodes": [Schema],
"pageInfo": PageInfo
}
}
}
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 schemas to return per page, when paginating forwards. Defaults to 20, maximum is 200. |
last - Int | The number of schemas to return per page, when paginating backwards. Defaults to 20, maximum is 200. |
Get a Tx by ID
ResponseReturns a Tx
query Tx($tx: TxMatchInput!) {
tx(tx: $tx) {
accountId
amount
currency {
...CurrencyFragment
}
date
deletedAt
description
externalAccount {
...ExternalAccountFragment
}
externalAccountId
externalId
id
isDeleted
ledgerEntries {
...LedgerEntriesConnectionFragment
}
ledgerEntryIds
ledgerLineIds
ledgerLines {
...LedgerLinesConnectionFragment
}
link {
...LinkFragment
}
linkId
posted
sequence
workspaceId
}
}
{"tx": TxMatchInput}
{
"data": {
"tx": {
"accountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"amount": "999999999999",
"currency": Currency,
"date": "2022-03-28",
"deletedAt": "2007-12-03T10:15:30Z",
"description": "abc123",
"externalAccount": ExternalAccount,
"externalAccountId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"externalId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"id": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"isDeleted": true,
"ledgerEntries": LedgerEntriesConnection,
"ledgerEntryIds": ["3116551f-5efc-4c9e-84ac-5a36a51b09c1"],
"ledgerLineIds": ["3116551f-5efc-4c9e-84ac-5a36a51b09c1"],
"ledgerLines": LedgerLinesConnection,
"link": Link,
"linkId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1",
"posted": "2007-12-03T10:15:30Z",
"sequence": 2277,
"workspaceId": "3116551f-5efc-4c9e-84ac-5a36a51b09c1"
}
}
}
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) |
Get the current Workspace
ResponseReturns a Workspace!
query Workspace {
workspace {
id
name
}
}
{"data": {"workspace": {"id": "abc123", "name": "abc123"}}}