GraphQL

Types

Objects

Account

Accounts model all of the economic activity that your ledger provides.

The chart of accounts is the basis for creating balance sheets, P&L reports, and for understanding the balances for the customer and business entities your business services.

Accounts can be organized into sets with the AccountSet type. Hierarchical tree structures which roll up balances across many accounts can be modeled by nesting sets within other sets.

Fields

id - ID! Globally unique identifier for a record to support Global Object Identification. Uses format ac:<key> where key is base64(json({ 1: accountId })).
accountId - UUID! Unique identifier for the account.
externalId - String! Allows specifying a unique external ID associated with this account.
name - String! Account name. Examples: "Bill Pay Settlement", "Courtesy Credit"
code - String! Shorthand code for the account, often an abbreviated version of the account name. Example: 'ACH_RECON' for an account named 'ACH Reconciliation'.
description - String! Description of the account.
status - AccountStatus! Current status for the account.

normalBalanceType - DebitOrCredit!

Flag indicating whether this account uses a "debit normal" or a "credit normal" balance.

In double-entry accounting, accounts with a debit normal balance use the balance calculation balance = debits - credits. This is used for asset and expense account types.

Accounts with a credit normal balance, in contrast, calculate their balance with the equation balance = credits - debits. This is the default type for liabilities, equity, and revenue account types.

metadata - JSON Metadata attached to this account.
config - AccountConfig! System config for this account.
created - Timestamp! Date and time when the account was first created.
modified - Timestamp! Time of the last change. Especially useful when reviewing the history.
version - Int! The current version number of this account. Previous versions are tracked in history.

balances - BalanceConnection!

Reference to the balances for this account.

Accounts have balances across all three layers: SETTLED, PENDING, and ENCUMBRANCE.

Each balance reflects the current total debits and credits for all entries in this account within the specified journal and currency.

balance - Balance Reference to the balance for a specific journal and currency (defaults to "USD").
entries - EntryConnection! All ledger entries associated with this account.
sets - AccountSetConnection! Accounts can be organized into sets. Each account can belong to zero or multiple account sets.
history - AccountConnection! History of changes to this Account record. Because ledgers are immutable and append-only, all changes are recorded as sequenced versions of the record, providing an unbroken lineage of the current state.

AccountConfig

System configuration for an account.

Fields

enableConcurrentPosting - Boolean When true, optimizes the account for a ridiculously high rate of entries written. Tradeoff is that read operations for balances become much more expensive and slow; use with caution. Defaults to false.

AccountConnection

Connection to a list of Account nodes. Access Account nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [Account]!

Accounts model all of the economic activity that your ledger provides.

The chart of accounts is the basis for creating balance sheets, P&L reports, and for understanding the balances for the customer and business entities your business services.

Accounts can be organized into sets with the AccountSet type. Hierarchical tree structures which roll up balances across many accounts can be modeled by nesting sets within other sets.

edges - [AccountConnectionEdge]! Edges represent links connecting a parent or query field to a list of Account nodes. They contain a reference to the Account node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

AccountConnectionEdge

Edges represent links connecting a parent or query field to a list of Account nodes. They contain a reference to the Account node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - Account Reference to the Account node at this edge.

AccountSet

A set of accounts.

Account sets contain members which can include accounts as well as other account sets.

Every account set has multiple balances which represent the sum of all balances of member accounts and member account sets. Like balances for accounts, account set balances are computed for every currency used by the entries posted to accounts in a set and all of its sub-sets.

Because account sets are tied to a specific journal, they only compute balances using entries posted to their journal.

Fields

id - ID! Globally unique identifier for a record to support Global Object Identification. Uses format as:<key> where key is base64(json({ 1: accountSetId })).
accountSetId - UUID! Unique identifier for the set.
journalId - UUID! The journal for the set. Account sets are confined to a single journal and roll up balances for entries on their journal. Account sets can only contain other sets using the same journal.
name - String! Name for the set.
description - String! Description of the account set.
metadata - JSON Metadata attached to this account set.
config - AccountSetConfig! System config for this account set.

normalBalanceType - DebitOrCredit!

Indicates whether this account set uses a "debit normal" or a "credit normal" balance.

In double-entry accounting, a debit normal balance uses the calculation balance = debits - credits.

A credit normal balance, in contrast, is calculated with the equation balance = credits - debits.

created - Timestamp! Date and time when the account set was first created.
modified - Timestamp! Time of the last change. Especially useful when reviewing the history.
version - Int! The current version number of this account set. Previous versions are tracked in history.
balance - Balance Reference to the balance for a specific currency (defaults to "USD").

balances - BalanceConnection!

Reference to the balances for this account set.

Each balance reflects the current sum of debits and credits for all entries on accounts in this set and all accounts in any sub-sets, on the current layer and all layers above.

Because account sets are tied to a specific journal, they only compute balances using entries posted to their journal.

entries - EntryConnection! All ledger entries associated with accounts in this set and in all subsets.
history - AccountSetConnection! History of changes to this AccountSet record. Because ledgers are immutable and append-only, all changes are recorded as sequenced versions of the record, providing an unbroken lineage of the current state.
members - AccountSetMemberConnection! All members of the account set. Sets can include other account sets.

AccountSetConfig

System configuration for an account set.

Fields

enableConcurrentPosting - Boolean When true, optimizes the account set for a ridiculously high rate of entries written. Tradeoff is that read operations for balances become much more expensive and slow; use with caution. Defaults to false.

AccountSetConnection

Connection to a list of AccountSet nodes. Access AccountSet nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [AccountSet]!

A set of accounts.

Account sets contain members which can include accounts as well as other account sets.

Every account set has multiple balances which represent the sum of all balances of member accounts and member account sets. Like balances for accounts, account set balances are computed for every currency used by the entries posted to accounts in a set and all of its sub-sets.

Because account sets are tied to a specific journal, they only compute balances using entries posted to their journal.

edges - [AccountSetConnectionEdge]! Edges represent links connecting a parent or query field to a list of AccountSet nodes. They contain a reference to the AccountSet node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

AccountSetConnectionEdge

Edges represent links connecting a parent or query field to a list of AccountSet nodes. They contain a reference to the AccountSet node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - AccountSet Reference to the AccountSet node at this edge.

AccountSetMemberConnection

Connection to a list of AccountSetMember nodes. Access AccountSetMember nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [AccountSetMember!]! Account set members can be of type Account or AccountSet.
edges - [AccountSetMemberConnectionEdge]! Edges represent links connecting a parent or query field to a list of AccountSetMember nodes. They contain a reference to the AccountSetMember node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

AccountSetMemberConnectionEdge

Edges represent links connecting a parent or query field to a list of AccountSetMember nodes. They contain a reference to the AccountSetMember node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - AccountSetMember Reference to the AccountSetMember node at this edge.

Balance

Balances are auto-calculated sums of the entries for a given account.

Every balance record maintains a drBalance for entries on the debit side of the ledger and a crBalance for credit entries.

Additionally, every account has a normalBalance, which is equal to crBalance - drBalance for credit normal accounts, and drBalance - crBalance for debit normal accounts.

Each account can have balances across all three layers: SETTLED, PENDING, and ENCUMBRANCE.

Fields

id - ID! Globally unique identifier for a record to support Global Object Identification. Uses format ba:<key> where key is base64(json({ 1: accountId, 2: journalId, 3: currency })) The journalId and currency are optional and will use the default values if they are missing
journalId - UUID! ID of the journal within which the balance is calculated.
accountId - UUID! ID of the account for which the balance is calculated.
entryId - UUID! ID of the most recent entry used to calculate the balance.

currency - CurrencyCode!

The currency of the balance amounts.

Balances represent the sum of entries using the same currency. Multi-currency ledgers will therefore have different balances for each currency.

settled - BalanceAmount! The balance amounts on the settled layer.
pending - BalanceAmount! The balance amounts on the pending layer.
encumbrance - BalanceAmount! The balance amounts on the encumbrance layer.
available - BalanceAmount! The balance amounts available by combining the provided layer with all layers above.
created - Timestamp! Date and time when the balance was first created.
modified - Timestamp! Time of the last change. Especially useful when reviewing the history.
version - Int! The current version number of this balance. Previous versions are tracked in history.
account - Account! Reference to the balance's account.
entry - Entry! Reference to the most recent entry used to calculate the balance.
entries - EntryConnection! All ledger entries for this balance.
journal - Journal! Reference to the balance's journal.
history - BalanceConnection! History of changes to this Balance record. Because ledgers are immutable and append-only, all changes are recorded as sequenced versions of the record, providing an unbroken lineage of the current state.

BalanceAmount

Fields

drBalance - Money! Sum of all amounts for entries on the DEBIT side of the ledger.
crBalance - Money! Sum of all amounts for entries on the CREDIT side of the ledger.

normalBalance - Money!

The "normal balance" for an account is different for credit normal and debit normal accounts.

For credit normal accounts, the normal balance is equal to crBalance - drBalance. For debit normal accounts, the normal balance is the reverse: drBalance - crBalance.

entryId - UUID! ID of the most recent entry used to calculate the balance on this layer.
modified - Timestamp! Time of the last change of balance on this layer.

BalanceConnection

Connection to a list of Balance nodes. Access Balance nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [Balance]!

Balances are auto-calculated sums of the entries for a given account.

Every balance record maintains a drBalance for entries on the debit side of the ledger and a crBalance for credit entries.

Additionally, every account has a normalBalance, which is equal to crBalance - drBalance for credit normal accounts, and drBalance - crBalance for debit normal accounts.

Each account can have balances across all three layers: SETTLED, PENDING, and ENCUMBRANCE.

edges - [BalanceConnectionEdge]! Edges represent links connecting a parent or query field to a list of Balance nodes. They contain a reference to the Balance node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

BalanceConnectionEdge

Edges represent links connecting a parent or query field to a list of Balance nodes. They contain a reference to the Balance node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - Balance Reference to the Balance node at this edge.

Client

Fields

id - ID! Globally unique identifier for a record to support Global Object Identification. Uses format cl:<key> where key is the base64(json({ 1: principal }))
principal - String! Principal that this client applies to. If you're supplying your own OIDC this will be the iss claim on your JWT. If using Twisp IAM/OIDC token exchange, this will be the IAM principal you signed with, typically a role ARN.
name - String! Unique name of the client.
policies - [Policy]! The policies to evaluate.

ClientConnection

Connection to a list of Client nodes. Access Client nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [Client]!
edges - [ClientConnectionEdge]! Edges represent links connecting a parent or query field to a list of Client nodes. They contain a reference to the Client node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

ClientConnectionEdge

Edges represent links connecting a parent or query field to a list of Client nodes. They contain a reference to the Client node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - Client Reference to the Client node at this edge.

Entry

An entry represents one side of a transaction in a ledger. In other systems, these may be called "ledger lines" or "journal entries".

Entries always have an account, amount, and direction (CREDIT or DEBIT). In addition, Twisp uses the concept of "entry types" to assign every entry to a categorical type.

Twisp enforces double-entry accounting, which in practice means that entries can only be entered in the context of a Transaction. Posting a transaction will create at least 2 ledger entries.

Fields

id - ID! Globally unique identifier for a record to support Global Object Identification. Uses format en:<key> where key is base64(json({ 1: entryId })).
entryId - UUID! Unique identifier for the ledger entry.
transactionId - UUID! Unique identifier for the transaction which posted this entry. Every entry is associated with a transaction.
accountId - UUID! ID of the account to be debited/credited.
journalId - UUID! The journal identifier of the ledger entry.
entryType - EntryType! Type code for the entry.
layer - Layer! The layer on which this entry is recorded (SETTLED, PENDING, or ENCUMBRANCE).
units - Decimal! Syntactic sugar for amount { units }.
currency - CurrencyCode! Syntactic sugar for amount { currency }.
amount - Money! Amount of the ledger entry using the currency-supported Money type.
direction - DebitOrCredit! The side of the ledger (DEBIT or CREDIT) this entry is posted on.

sequence - Int!

The order in which this entry was posted within the context of a transaction.

This order is auto-generated at time of posting and is determined by the position of the entries posted within the transaction.

description - String! Description of the ledger entry.
created - Timestamp! Date and time when the entry was posted.
modified - Timestamp! Time of the last change. Especially useful when reviewing the history.
version - Int! The current version number of this entry. Previous versions are tracked in history.
account - Account! Reference to the account to be debited/credited.
balance - Balance! Reference to the resulting balance from the entry.
journal - Journal! Reference to the journal of the entry.
history - EntryConnection! History of changes to this Entry record. Because ledgers are immutable and append-only, all changes are recorded as sequenced versions of the record, providing an unbroken lineage of the current state.
transaction - Transaction! Reference to the transaction which posted this entry.

EntryConnection

Connection to a list of Entry nodes. Access Entry nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [Entry]!

An entry represents one side of a transaction in a ledger. In other systems, these may be called "ledger lines" or "journal entries".

Entries always have an account, amount, and direction (CREDIT or DEBIT). In addition, Twisp uses the concept of "entry types" to assign every entry to a categorical type.

Twisp enforces double-entry accounting, which in practice means that entries can only be entered in the context of a Transaction. Posting a transaction will create at least 2 ledger entries.

edges - [EntryConnectionEdge]! Edges represent links connecting a parent or query field to a list of Entry nodes. They contain a reference to the Entry node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

EntryConnectionEdge

Edges represent links connecting a parent or query field to a list of Entry nodes. They contain a reference to the Entry node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - Entry Reference to the Entry node at this edge.

Group

Grouping of users within an organization.

Groups are used to manage access control and permissions for users. Each group can have one or more associated policies that define the allowed actions for its member users.

Users can belong to multiple groups, and their permissions are determined by the combined set of policies from all their groups.

Fields

id - UUID! Unique ID for the group.
organizationId - UUID! The unique identifier of the organization to which the group belongs.
name - String! A human-friendly name for the group, such as 'Admins' or 'DataAnalysts'.
description - String! A brief description of the group's purpose, intended to provide additional context.

policy - String!

A set of policies as a JSON list that define the permissions granted to users within this group.

The structure of these policies matches the Policy type, but serialized as a JSON string.

Example:

policy: "[{\"actions\": [\"*\"],\"effect\": \"DENY\",\"resources\":[\"*\"],\"assertions\": {\"always false\": \"1 == 0\"}}]"
version - Int! The current version number of this group. Updates will increment the version.

GroupConnection

Connection to a list of Group nodes. Access Group nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [Group]!

Grouping of users within an organization.

Groups are used to manage access control and permissions for users. Each group can have one or more associated policies that define the allowed actions for its member users.

Users can belong to multiple groups, and their permissions are determined by the combined set of policies from all their groups.

edges - [GroupConnectionEdge]! Edges represent links connecting a parent or query field to a list of Group nodes. They contain a reference to the Group node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

GroupConnectionEdge

Edges represent links connecting a parent or query field to a list of Group nodes. They contain a reference to the Group node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - Group Reference to the Group node at this edge.

Index

Fields

id - ID! Globally unique identifier for a record to support Global Object Identification. Uses format ix:<key> where key is base64(json({ 1: name, 2: on })).
name - String! Unique identifier of this index. Typically human readable.
on - IndexOnEnum! The type of record this index applies to.
unique - Boolean! Indicates if this index is unique.
historical - Boolean! Indicates if this index is historical, i.e. created with schema.createHistoricalIndex.
partition - [PartitionKey]! The partition key used for this index.
range - [IndexKey]! The range key to use for query/sorting.

constraints - ExpressionMap

Map of named CEL expressions specifying the conditions for including a record in this index.

Records are only included in the index if all expressions evaluate to true, i.e. they are combined with a logical AND. Each expression must return a boolean value.

For example, a custom index on a metadata.category field might use the constraints { hasCateogory: "has(document.metadata.category)" } to ensure that only records whose metadata document has a defined value for the category field are included.

version - Int! The current version number of this index.

IndexConnection

Connection to a list of Index nodes. Access Index nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [Index]!
edges - [IndexConnectionEdge]! Edges represent links connecting a parent or query field to a list of Index nodes. They contain a reference to the Index node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

IndexConnectionEdge

Edges represent links connecting a parent or query field to a list of Index nodes. They contain a reference to the Index node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - Index Reference to the Index node at this edge.

IndexKey

A named expression used for sorting and range conditions.

Fields

alias - String! Identifier for this key.

value - Expression!

CEL expression which resolves to the value that is to be sorted.

Within the expression, the document object represents the record.

sort - SortOrder! Whether the sort is in ascending or descending order.

Journal

Journals allow for the organizing of transactions within separate "books".

In many cases, users only need a single journal. For this reason, Twisp always contains a default journal with code DEFAULT.

Journals can be used for a variety of functions. For example, users may create separate journals for different currencies, or product-specific journals.

Fields

id - ID! Globally unique identifier for a record to support Global Object Identification. Uses format jl:<key> where key is base64(json({ 1: journalId })).
journalId - UUID! Unique identifier for the journal.
name - String! Name for the journal.
description - String! Description of the journal.
status - Status! Operational status of the journal. ACTIVE journals can be written to with postTransaction, whereas LOCKED journals do not allow transactions to be posted to them.
code - String Optional unique code for the journal. The default journal uses the code DEFAULT.
created - Timestamp! Date and time when the journal was first created.
modified - Timestamp! Time of the last change. Especially useful when reviewing the history.
version - Int! The current version number of this journal. Previous versions are tracked in history.
history - JournalConnection! History of changes to this Journal record. Because ledgers are immutable and append-only, all changes are recorded as sequenced versions of the record, providing an unbroken lineage of the current state.

JournalConnection

Connection to a list of Journal nodes. Access Journal nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [Journal]!

Journals allow for the organizing of transactions within separate "books".

In many cases, users only need a single journal. For this reason, Twisp always contains a default journal with code DEFAULT.

Journals can be used for a variety of functions. For example, users may create separate journals for different currencies, or product-specific journals.

edges - [JournalConnectionEdge]! Edges represent links connecting a parent or query field to a list of Journal nodes. They contain a reference to the Journal node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

JournalConnectionEdge

Edges represent links connecting a parent or query field to a list of Journal nodes. They contain a reference to the Journal node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - Journal Reference to the Journal node at this edge.

LithicTransactionBalance

Fields

transaction - Transaction! The transaction that Twisp posted.
balance - Balance! The balance for the account.

Money

Money type with multi-currency support.

Monetary amounts are represented as decimal units of currency. Fields which use the Money type can be converted to a symbolic representations by specifying a MoneyFormatInput on the formatted field.

Here is an example table showing different currencies which each have their own divisions of units represented. Japanese yen (JPY) don't have a decimal minor unit, and Bahraini dinars (BHD) use 3 minor unit decimal places. The formatted column uses the default values for a an en-US locale.

CurrencyUnitsFormatted
USD289.27$289.27
BHD28.92728.927 BD
JPY28927¥28927

Fields

units - Decimal! Decimal is a fixed-precision data type supporting exact representation of numeric values.
currency - CurrencyCode! ISO 4217 standard three-character code indicating the currency.
formatted - 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.

Organization

The organization associated with the auth context.

Organizations have many tenants, groups, and users.

Fields

id - UUID! Unique ID for the organization.
name - String! Name of the organization.
description - String! Description of the organization.
version - Int! The current version number of this organization.

PageInfo

Fields

hasPreviousPage - Boolean! True if there are nodes in the connection before the current page / start cursor.
hasNextPage - Boolean! True if there are nodes in the connection after the current page / end cursor.
startCursor - String Query cursor for the first node in the current page.
endCursor - String Query cursor for the last node in the current page.

ParamDefinition

Definition of a parameter that can be used when posting transactions using this tran code.

These definitions are used to validate the provided params in a TransactionInput to ensure that only the right data is applied to the entries created.

With CEL, you can access the post-time values of these parameters inside of values in transaction and entries.

Fields

name - String! Name for the parameter. This is how values passed are accessed. For example, a parameter with name fromAccount can be accessed in the accountId field of an TranCodeEntryInput with params.fromAccount.
type - ParamDataType! Data type for the parameter.
default - Expression Default value for the parameter. If not provided, the parameter is consider a 'required' parameter, and a value must be provided when posting a transaction.
description - String Describe the purpose of this parameter. Help an engineer out.

PartitionKey

A named expression defining a partition key.

Fields

alias - String! Identifier for this partition key.

value - Expression!

CEL expression which resolves to the value that is to be used for the partition key.

Within the expression, the document object represents the record.

Policy

Fields

effect - PolicyEffect! Whether this Policy is an ALLOW or DENY.
actions - [PolicyAction]! The set of actions to allow or deny."
resources - [String]! The resources to allow or deny.
assertions - ExpressionMap A map of expressions to evaluate this policy with.

PolicyAssertion

Fields

name - 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.
value - Expression! A literal CEL expression to be evaluated.

Tenant

A Tenant represents an environment within an organization, typically associated with a specific application, service, or set of resources. Tenants contain isolated ledgers, each deployed to a specific region.

Tenants are useful for isolating data and configurations between different environments. Each tenant is uniquely identified by an accountId, which in combination with an AWS region, is used to calculate the database tenant for data isolation purposes.

Fields

id - UUID! Unique ID for the tenant.
organizationId - UUID! ID of the tenant's parent organization.

accountId - String!

A globally unique identifier representing an environment within the organization.

This accountId, when combined with an AWS region, is used to calculate the database tenant.

name - String! A human-friendly name for the tenant, used for display purposes and easier identification.
description - String! A brief description of the tenant, providing additional context about its purpose or characteristics.
version - Int! The current version number of this tenant. Updates will increment the version.

TenantConnection

Connection to a list of Tenant nodes. Access Tenant nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [Tenant]!

A Tenant represents an environment within an organization, typically associated with a specific application, service, or set of resources. Tenants contain isolated ledgers, each deployed to a specific region.

Tenants are useful for isolating data and configurations between different environments. Each tenant is uniquely identified by an accountId, which in combination with an AWS region, is used to calculate the database tenant for data isolation purposes.

edges - [TenantConnectionEdge]! Edges represent links connecting a parent or query field to a list of Tenant nodes. They contain a reference to the Tenant node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

TenantConnectionEdge

Edges represent links connecting a parent or query field to a list of Tenant nodes. They contain a reference to the Tenant node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - Tenant Reference to the Tenant node at this edge.

TranCode

Transaction Codes (tran codes) are how financial engineers do double-entry accounting. They encode the basic patterns for a type of transaction as a predictable and repeatable formula.

You can think of tran codes as function signatures which define how a transaction acts upon the ledger.

Fields

id - ID! Globally unique identifier for a record to support Global Object Identification. Uses format tc:<key> where key is base64(json({ 1: tranCodeId })).
tranCodeId - UUID! Internal UUID for the transaction code record.

code - String!

The tran code represented as a unique string identifier.

The code itself is a shorthand for the behavior represented. For example, the code ACH_CREDIT may represent a transaction writing two entries: an ACH_DR entry and an ACH_CR entry.

description - String! Explanation of what this tran code represents and how it should be used. This provides documentation for the tran code.
params - [ParamDefinition] Defines the parameters that can be used when posting transactions using this tran code.
transaction - TranCodeTransaction! Definition of the transaction posted when this tran code is invoked.
entries - [TranCodeEntry!]! Definition of the entries written when transactions are posted with this tran code.
status - Status! Operational status of the tran code.
metadata - JSON Metadata attached to this tran code.
created - Timestamp! Date and time when the tran code was first created.
modified - Timestamp! Time of the last change. Especially useful when reviewing the history.
version - Int! The current version number of this account. Previous versions are tracked in history.
history - TranCodeConnection! History of changes to this TranCode record. Because ledgers are immutable and append-only, all changes are recorded as sequenced versions of the record, providing an unbroken lineage of the current state.

TranCodeConnection

Connection to a list of TranCode nodes. Access TranCode nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [TranCode]!

Transaction Codes (tran codes) are how financial engineers do double-entry accounting. They encode the basic patterns for a type of transaction as a predictable and repeatable formula.

You can think of tran codes as function signatures which define how a transaction acts upon the ledger.

edges - [TranCodeConnectionEdge]! Edges represent links connecting a parent or query field to a list of TranCode nodes. They contain a reference to the TranCode node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

TranCodeConnectionEdge

Edges represent links connecting a parent or query field to a list of TranCode nodes. They contain a reference to the TranCode node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - TranCode Reference to the TranCode node at this edge.

TranCodeEntry

Definition of an entry written when transactions are posted with this tran code.

Fields

entryType - Expression! Entry type for an entry written when this tran code is invoked.
accountId - Expression! Account ID for an entry written when this tran code is invoked.
layer - Expression! Layer for an entry written when this tran code is invoked.
direction - Expression! Direction for an entry written when this tran code is invoked.
units - Expression! Units of currency for an entry written when this tran code is invoked.
currency - Expression! Currency used for an entry written when this tran code is invoked.
description - Expression Description for an entry written when this tran code is invoked.

TranCodeTransaction

Definition of the transaction posted when this tran code is invoked.

Fields

effective - Expression! Effective date for transactions posted with this tran code.
journalId - Expression! Journal ID for transactions posted with this tran code.
correlationId - Expression Correlation ID for transactions posted with this tran code.
externalId - Expression External ID for transactions posted with this tran code.
description - Expression! Description for transactions posted with this tran code.
metadata - Expression! Metadata for transactions posted with this tran code.

Transaction

Transactions record all accounting events in the ledger. In Twisp, the only way to write to a ledger is through a transaction.

Every transaction writes two or more entries to the ledger in standard double-entry accounting practice.

Twisp expands upon the basic principle of an accounting transaction with additional features like transaction codes and correlations.

Fields

id - ID! Globally unique identifier for a record to support Global Object Identification. Uses format tx:<key> where key is base64(json({ 1: transactionId })).
transactionId - UUID! Unique identifier for the transaction.
tranCodeId - UUID! Unique identifier for the tran code used by this transaction.
journalId - UUID! Unique identifier for the journal this transaction applies to.

correlationId - String!

Allows related transactions to be grouped.

When a transaction is posted without a correlationId, it uses the transactionId as the correlationId. Then, future related transactions can be posted with the same correlationId to indicate their relationship to the original. This is very useful for events like holds, auths, auth reversals, etc.

For example, consider the following (simplified) list of transactions:

(ID: 1) Place card hold for $50 on account A (correlation ID: 1) (ID: 2) Place card hold for $20 on account B (correlation ID: 2) (ID: 3) Release card hold for $50 on account A (correlation ID: 1)

Because transaction (3) is related to transaction (1), it shares the same correlation ID. This way, we can easily observe the entire history of a multi-transaction event by querying the correlated transactions.

externalId - String! Allows specifying a unique external ID associated with this transaction.
effective - Date! The effective date records when the transaction is recorded as occurring for accounting purposes. Determines the accounting period within which the transaction is counted.
description - String! Description of the transaction.
metadata - JSON Arbitrary structured data about this transaction.
created - Timestamp! Date and time when the transaction was first posted.
modified - Timestamp! Time of the last change. Especially useful when reviewing the history.
version - Int! The current version number of this transaction. Previous versions are tracked in history.
correlated - TransactionConnection! List of all correlated transactions. These are transactions which share the same correlationId.
entries - EntryConnection! Ledger entries written by the transaction.
history - TransactionConnection! History of changes to this Transaction record. Because ledgers are immutable and append-only, all changes are recorded as sequenced versions of the record, providing an unbroken lineage of the current state.
journal - Journal! Reference to the journal this transaction applies to.
tranCode - TranCode! Reference to the tran code used by this transaction.

TransactionConnection

Connection to a list of Transaction nodes. Access Transaction nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [Transaction]!

Transactions record all accounting events in the ledger. In Twisp, the only way to write to a ledger is through a transaction.

Every transaction writes two or more entries to the ledger in standard double-entry accounting practice.

Twisp expands upon the basic principle of an accounting transaction with additional features like transaction codes and correlations.

edges - [TransactionConnectionEdge]! Edges represent links connecting a parent or query field to a list of Transaction nodes. They contain a reference to the Transaction node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

TransactionConnectionEdge

Edges represent links connecting a parent or query field to a list of Transaction nodes. They contain a reference to the Transaction node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - Transaction Reference to the Transaction node at this edge.

User

A human user within the organization.

Users can belong to multiple groups, which define their permissions within the organization based on the associated policies of each group.

The user's effective permissions are determined by the combined set of policies from all their groups.

A user is uniquely identified by their email address.

Fields

id - UUID! Unique ID for the user.
organizationId - UUID! ID of the user's parent organization.
groupIds - [UUID!]! A list of unique identifiers for the groups to which the user belongs. The user's permissions are determined by the combined policies of these groups.
email - String! The user's email address, which serves as a unique identifier and primary means of contact.
version - Int! The current version number of this user. Updates will increment the version.

UserConnection

Connection to a list of User nodes. Access User nodes directly through the nodes field, or access information about the connection edges with the edges field. Use pageInfo to paginate responses using the cursors provided.

Fields

nodes - [User]!

A human user within the organization.

Users can belong to multiple groups, which define their permissions within the organization based on the associated policies of each group.

The user's effective permissions are determined by the combined set of policies from all their groups.

A user is uniquely identified by their email address.

edges - [UserConnectionEdge]! Edges represent links connecting a parent or query field to a list of User nodes. They contain a reference to the User node and metadata like the cursor position for the edge.
pageInfo - PageInfo!

UserConnectionEdge

Edges represent links connecting a parent or query field to a list of User nodes. They contain a reference to the User node and metadata like the cursor position for the edge.

Fields

cursor - String! Cursor position at this edge.
node - User Reference to the User node at this edge.

Inputs

AccountConfigInput

Fields to create a system configuration for an account.

Input Fields

enableConcurrentPosting - Boolean When true, optimizes the account for a ridiculously high rate of entries written. Tradeoff is that read operations for balances become much more expensive and slow; use with caution. In updates you can enable, but not disable. Defaults to false.

AccountFilterInput

Filter conditions to apply to an account query. Filters are only applied if the field is used by the specified index.

Input Fields

accountId - FilterValue Filter on the accountId field. Required when using index AccountIndex.ACCOUNT_ID.
externalId - FilterValue Filter on the externalId field. Required when using index AccountIndex.EXTERNAL_ID.
name - FilterValue Filter on the name field. Only available when using index AccountIndex.NAME.
code - FilterValue Filter on the code field. Only available when using index AccountIndex.CODE.
status - FilterValue Filter on the status field. Only available when using index AccountIndex.STATUS.
custom - CustomIndexFilter Filter conditions for a custom index. Only available when using index AccountIndex.CUSTOM.

AccountIndexInput

Specify the pre-defined AccountIndex and sort order to use in a query.

Input Fields

name - AccountIndex! Indexes for querying Accounts. To optimize query performance and apply desired filters, choose the appropriate index.
sort - SortOrder ASC (ascending) or DESC (descending).

AccountInput

Fields to create a new account.

Input Fields

accountId - UUID! Unique identifier for the account.
externalId - String Allows specifying a unique external ID associated with this account.
code - String! Shorthand code for the account.
name - String! Account name.
normalBalanceType - DebitOrCredit! Determines whether account should use a debit- or credit-normal balance. Default: CREDIT
accountSetIds - [UUID] IDs of AccountSets to add this account to.
description - String Description of the account.
status - Status! Current status for the account. Default: ACTIVE
metadata - JSON Metadata attached to this account.
config - AccountConfigInput System config for the account.

AccountSetConfigInput

Fields to create a system configuration for an account set.

Input Fields

enableConcurrentPosting - Boolean When true, optimizes the account set for a ridiculously high rate of entries written. Tradeoff is that read operations for balances become much more expensive and slow; use with caution. In updates you can enable, but not disable. Defaults to false.

AccountSetFilterInput

Filter conditions to apply to an account set query. Filters are only applied if the field is used by the specified index.

Input Fields

accountSetId - FilterValue Filter on the accountSetId field. Required when using index AccountSetIndex.ACCOUNT_SET_ID.
journalId - FilterValue Specify the Journal to use with eq. Required for all indexes.
name - FilterValue Filter on the name field. Only available when using index AccountSetIndex.NAME.
custom - CustomIndexFilter Filter conditions for a custom index. Only available when using index AccountSetIndex.CUSTOM.

AccountSetIndexInput

Specify the pre-defined AccountSetIndex and sort order to use in a query.

Input Fields

name - AccountSetIndex! Indexes for querying AccountSets. To optimize query performance and apply desired filters, choose the appropriate index.
sort - SortOrder ASC (ascending) or DESC (descending).

AccountSetInput

Fields to create a new account set.

Input Fields

accountSetId - UUID! Unique identifier for the set.
journalId - UUID The journal for the set. If omitted, the default journal will be used.
name - String! Name for the set.
description - String Description of the account set.
normalBalanceType - DebitOrCredit! Determines whether the account set should use a debit- or credit-normal balance. Default: CREDIT
metadata - JSON Metadata attached to this account set.
config - AccountSetConfigInput System config for the account set.

AccountSetMemberInput

Input Fields

memberType - AccountSetMemberType Whether the member to add is an Account or AccountSet
memberId - UUID! Identifier for the member to add. When adding accounts, this is the accountId. When adding account sets, this is the accountSetId.

AccountSetMembersFilterInput

Filter conditions to apply when querying members of an account set.

Input Fields

accountSetId - FilterValue Filter on the accountSetId field.
memberId - FilterValue Filter on the memberId field: the UUID of a member Account or AccountSet.

AccountSetUpdateInput

AccountSet fields to update.

Input Fields

name - String Name for the set.
description - String Description of the account set.
normalBalanceType - DebitOrCredit Determines whether the account set should use a debit- or credit-normal balance.
metadata - JSON Metadata attached to this account set.
config - AccountSetConfigInput System config for the account set.

AccountUpdateInput

Account fields to update.

Input Fields

externalId - String Allows specifying a unique external ID associated with this account.
code - String Shorthand code for the account.
name - String Account name.
normalBalanceType - DebitOrCredit Determines whether account should use a debit- or credit-normal balance.
description - String Description of the account.
status - Status Current status for the account.
metadata - JSON Metadata attached to this account.
config - AccountConfigInput System config for the account.

BalanceFilterInput

Filter conditions to apply to a balance query. Filters are only applied if the field is used by the specified index.

Input Fields

journalId - FilterValue Specify the Journal to use with eq. If omitted, the default journal will be used.
accountId - FilterValue Filter on the accountId field. Required when using index BalanceIndex.ACCOUNT_ID.
currency - FilterValue Filter on the currency field.
custom - CustomIndexFilter Filter conditions for a custom index. Only available when using index BalanceIndex.CUSTOM.

BalanceIndexInput

Specify the pre-defined BalanceIndex and sort order to use in a query.

Input Fields

name - BalanceIndex! Indexes for querying Balances. To optimize query performance and apply desired filters, choose the appropriate index.
sort - SortOrder ASC (ascending) or DESC (descending).

CardInitializeInput

Input Fields

journalId - UUID The unique identifier for the journal that card transactions will post to by default. If omitted, the default journal will be used.
settlementAccountId - UUID A unique identifier to an existing settlement account that card transactions will post to by default. If not provided, a default card transaction account will be used as the settlement account.

CreateClientInput

Input Fields

principal - String! Principal that this client applies to. If you're supplying your own OIDC this will be the iss claim on your JWT. If using Twisp IAM/OIDC token exchange, this will be the IAM principal you signed with, typically a role ARN.
name - String! Unique name of the client.
policies - [PolicyInput]! The policies to evaluate.

CreateGroupInput

Input Fields

id - UUID! Unique ID for the group.
name - String! A human-friendly name for the group, such as 'Admins' or 'DataAnalysts'.
description - String! A brief description of the group's purpose, intended to provide additional context.

policy - String!

A set of policies to apply to this group, formatted as a JSON list that define the permissions granted to users within this group.

The structure of these policies matches the Policy type, but serialized as a JSON string.

Example:

policy: "[{\"actions\": [\"*\"],\"effect\": \"DENY\",\"resources\":[\"*\"],\"assertions\": {\"always false\": \"1 == 0\"}}]"

CreateIndexInput

Input Fields

name - String! Unique identifier of this index. Typically human readable.
on - IndexOnEnum! The type of record this index applies to.
unique - Boolean Indicates if this index is unique.
partition - [PartitionKeyInput]! The partition key used for this index.
sort - [IndexKeyInput]! The sort key to use for supporting range queries.

constraints - ExpressionMap

Map of named CEL expressions specifying the conditions for including a record in this index.

Records are only included in the index if all expressions evaluate to true, i.e. they are combined with a logical AND. Each expression must return a boolean value.

For example, a custom index on a metadata.category field might use the constraints { hasCategory: "has(document.metadata.category)" } to ensure that only records whose metadata document has a defined value for the category field are included.

CreateTenantInput

Input Fields

id - UUID! Unique ID for the tenant.

accountId - String!

A globally unique identifier representing an environment within the organization.

This accountId, when combined with an AWS region, is used to calculate the database tenant.

name - String! A human-friendly name for the tenant, used for display purposes and easier identification.
description - String! A brief description of the tenant, providing additional context about its purpose or characteristics.

CreateUserInput

Input Fields

id - UUID! Unique ID for the user.
groupIds - [UUID!]! A list of unique identifiers for the groups to which the user belongs. The user's permissions are determined by the combined policies of these groups.
email - String! The user's email address, which serves as a unique identifier and primary means of contact.

CustomIndexFilter

Query conditions for a custom index.

Input Fields

index - String! The name of the custom index to use.
partition - [CustomIndexFilterValue] Query conditions for specifying the index partition to use.
sort - [CustomIndexFilterValue] Query conditions for specifying sort order.

CustomIndexFilterValue

Filter conditionals for querying the partition or sort key of a custom index.

Input Fields

alias - String! Identifier for the key to apply the filter to.
value - FilterValue Conditions to apply at this key.

EntryFilterInput

Filter conditions to apply to an entry query. Filters are only applied if the field is used by the specified index.

Input Fields

entryId - FilterValue Filter on the entryId field. Required when using index EntryIndex.ENTRY_ID.

journalId - FilterValue

Conditional logic by which to apply a filter on a query.

Each FilterValue object must contain just one key/value pair.

Valid: { eq: "123" }
Invalid: { eq: "123", gt: "100" }

currency - FilterValue

Conditional logic by which to apply a filter on a query.

Each FilterValue object must contain just one key/value pair.

Valid: { eq: "123" }
Invalid: { eq: "123", gt: "100" }

layer - FilterValue

Conditional logic by which to apply a filter on a query.

Each FilterValue object must contain just one key/value pair.

Valid: { eq: "123" }
Invalid: { eq: "123", gt: "100" }

transactionId - FilterValue Filter on the transactionId field. Required when using index EntryIndex.TRANSACTION_ID.

EntryIndexInput

Specify the pre-defined EntryIndex and sort order to use in a query.

Input Fields

name - EntryIndex! Indexes for querying Entries. To optimize query performance and apply desired filters, choose the appropriate index.
sort - SortOrder ASC (ascending) or DESC (descending).

EntryUpdateInput

Entry fields to update.

Input Fields

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

FilterValue

Conditional logic by which to apply a filter on a query.

Each FilterValue object must contain just one key/value pair.

Valid: { eq: "123" }
Invalid: { eq: "123", gt: "100" }

Input Fields

eq - 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.
like - 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.
lt - 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.
lte - 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.
gt - 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.
gte - 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.
all - Boolean The Boolean scalar type represents true or false.

IndexKeyInput

Specify a named expression to sort the records within a custom index.

Used for sorting and for querying by range conditions.

Input Fields

alias - String! Identifier for this key. Should be a short, human-readable name.

value - Expression!

CEL expression which resolves to the value that is to be sorted.

Within the expression, the document object represents the record. To sort by a field on the record, use document.<field_name>.

sort - SortOrder! Whether the sort is in ascending or descending order.

JournalFilterInput

Filter conditions to apply to a journal query. Filters are only applied if the field is used by the specified index.

Input Fields

journalId - FilterValue Filter on the journalId field. Required when using index JournalIndex.JOURNAL_ID.
name - FilterValue Filter on the name field. Only available when using index JournalIndex.NAME.
status - FilterValue Filter on the status field. Only available when using index JournalIndex.STATUS.
code - FilterValue Filter on the code field. Only available when using index JournalIndex.CODE.

JournalIndexInput

Specify the pre-defined JournalIndex and sort order to use in a query.

Input Fields

name - JournalIndex! Indexes for querying Journals. To optimize query performance and apply desired filters, choose the appropriate index.
sort - SortOrder ASC (ascending) or DESC (descending).

JournalInput

Fields to create a new Journal.

Input Fields

journalId - UUID! Unique identifier for the journal.
name - String! Name for the journal.
description - String Description of the journal.
status - Status! Operational status of the journal. Default: ACTIVE
code - String Optional unique code for the journal.

JournalUpdateInput

Journal fields to update.

Input Fields

name - String Name for the journal.
description - String Description of the journal.
status - Status Operational status of the journal.

LithicTransactionInput

Input Fields

accountId - UUID! Unique identifier for the account this transaction will post to.
webhook - JSON! The Transaction webhook object from Lithic.
journalId - UUID Unique identifier for the journal this transaction applies to. If not provided, defaults to the default journal that card transaction codes are configured with.
settlementAccountId - UUID Unique identifier of the settlement account that transactions will settle from. If not provided, defaults to the default card settlement account.

MoneyFormatInput

Formatting options for money amounts.

Input Fields

locale - String! Locale represents a Unicode locale identifier. Examples: 'de-DE', 'hi-IN'
groupDigits - Boolean! When true, whole digits will be grouped according to locale. For example, with locale en-US the number 1234567.89 is formatted with grouped digits as 1,234,567.89. With other locales, these groupings may apply differently. Default: false
addPlusSign - Boolean! When true, prefix the number with plus + symbol when the number is positive. Negative numbers are always displayed with a minus - symbol. Default: false
roundingMode - RoundingMode! Defines the rounding behavior when the fractional units exceed the maxDigits. Default: HALF_UP
currencyDisplay - CurrencyDisplay! Defines how to render the currency indicator. Default: SYMBOL
minDigits - Int! Minimum number of fractional digits. When not specified, it will use the default fractional digits for the currency. For example, USD amounts default to 2 minimum digits. Default: 255
maxDigits - Int! Maximum number of fractional digits to show, which informs how rounding behavior is applied via the roundingMode. Defaults to 6. Default: 6

ParamDefinitionInput

Define a parameter that can be used when posting transactions using this tran code.

Input Fields

name - String! Name for the parameter. This is how values passed are accessed. For example, a parameter with name fromAccount can be accessed in the accountId field of an TranCodeEntryInput with params.fromAccount.
type - ParamDataType! Data type for the parameter. Default: STRING
default - Expression Default value for the parameter. If not provided, the parameter is consider a 'required' parameter, and a value must be provided when posting a transaction.
description - String Describe the purpose of this parameter. Help an engineer out.

PartitionKeyInput

Specify a named expression to define a partition key.

Input Fields

alias - String! Identifier for this partition key. Should be a short, human-readable name.

value - Expression!

CEL expression which resolves to the value that is to be used for the partition key.

Within the expression, the document object represents the record. To access a field on the document, use document.<field_name>.

PolicyInput

Input Fields

effect - PolicyEffect! Whether this Policy is an ALLOW or DENY.
actions - [PolicyAction]! The set of actions to allow or deny.

resources - [String]!

The resources to allow or deny. In the format <namespace>.<resource>

The following namespaces exist:

  • financial
  • tenancy
  • public
  • system

As do the following resources in the financial namespace:

  • Account
  • AccountSet
  • AccountSetMember
  • Transaction
  • Entry
  • Balance
  • TranCode
  • Journal

You can use * to wildcard as well.

assertions - ExpressionMap A map of expressions to evaluate this policy with.

TranCodeEntryInput

Defines the values for the entries written when transactions are posted with this tran code.

Input Fields

entryType - Expression! Entry type for an entry written when this tran code is invoked. Expression must resolve to a String type.
accountId - Expression! Account ID for an entry written when this tran code is invoked. Expression must resolve to a UUID type.
layer - Expression! Layer for an entry written when this tran code is invoked. Expression must resolve to a Layer enum type.
direction - Expression! Direction for an entry written when this tran code is invoked. Expression must resolve to a DebitOrCredit enum type.
units - Expression! Units of currency for an entry written when this tran code is invoked. Expression must resolve to a Decimal type.
currency - Expression! Currency used for an entry written when this tran code is invoked. Expression must resolve to a CurrencyCode type.
description - Expression Description for an entry written when this tran code is invoked." Expression must resolve to a String type.

TranCodeFilterInput

Filter conditions to apply to a tran code query. Filters are only applied if the field is used by the specified index.

Input Fields

tranCodeId - FilterValue Filter on the tranCodeId field. Required when using index TranCodeIndex.TRAN_CODE_ID.
code - FilterValue Filter on the code field. Only available when using index TranCodeIndex.CODE.
status - FilterValue Filter on the status field. Only available when using index TranCodeIndex.STATUS.
custom - CustomIndexFilter Filter conditions for a custom index. Only available when using index TranCodeIndex.CUSTOM.

TranCodeIndexInput

Specify the pre-defined TranCodeIndex and sort order to use in a query.

Input Fields

name - TranCodeIndex! Indexes for querying TranCodes. To optimize query performance and apply desired filters, choose the appropriate index.
sort - SortOrder ASC (ascending) or DESC (descending).

TranCodeInput

Fields to create a new TranCode.

Input Fields

tranCodeId - UUID! Internal UUID for the transaction code record.
code - String! The tran code represented as a unique string identifier. Example: 'ACH_CREDIT'
description - String Explanation of what this tran code represents and how it should be used. This provides documentation for the tran code.
params - [ParamDefinitionInput] Define the parameters that can be used when posting transactions using this tran code.
transaction - TranCodeTransactionInput! Define the values for the transaction posted when this tran code is invoked.
entries - [TranCodeEntryInput!]! Define the values of entries written when transactions are posted with this tran code.
metadata - JSON Metadata attached to this tran code.

TranCodeTransactionInput

Define the values for the transaction posted when this tran code is invoked.

Input Fields

effective - Expression! Effective date for the transaction posted with this tran code. Expression must be a valid ISO 8601 formatted date. @example("date('2022-12-23')")
journalId - Expression Journal ID for the transaction posted with this tran code. If omitted, the default journal will be used. Expression must resolve to a UUID type. @example("uuid('b28f5684-0834-4292-8016-d2f2fb0367a9')")
correlationId - Expression Correlation ID for the transaction posted with this tran code. Expression must resolve to a String type. Example: "'5a028997'"
externalId - Expression External ID for the transaction posted with this tran code. Expression must resolve to a String type. Example: "'45415819'"
description - Expression Description for the transaction posted with this tran code. Expression must resolve to a String type. @example("'TX for ' + string(params.amount)")
metadata - Expression Metadata for the transaction posted with this tran code. Expression must resolve to a JSON type. Example: "{ 'x': 1, 'y': { 'z': 2 }}"

TranCodeUpdateInput

TranCode fields to update.

Input Fields

description - String Explanation of what this tran code represents and how it should be used. This provides documentation for the tran code.
status - Status Operational status of the tran code.
metadata - JSON Metadata attached to this tran code.

TransactionFilterInput

Filter conditions to apply to a transaction query. Filters are only applied if the field is used by the specified index.

Input Fields

journalId - FilterValue Specify the Journal to use with eq. If omitted, the default journal will be used.
transactionId - FilterValue Filter on the transactionId field. Required when using index TransactionIndex.TRANSACTION_ID.
correlationId - FilterValue Filter on the correlationId field. Required when using index TransactionIndex.CORRELATION_ID.
externalId - FilterValue Filter on the externalId field. Required when using index TransactionIndex.EXTERNAL_ID.
custom - CustomIndexFilter Filter conditions for a custom index. Only available when using index TransactionIndex.CUSTOM.

TransactionIndexInput

Specify the pre-defined TransactionIndex and sort order to use in a query.

Input Fields

name - TransactionIndex! Indexes for querying Transactions. To optimize query performance and apply desired filters, choose the appropriate index.
sort - SortOrder ASC (ascending) or DESC (descending).

TransactionInput

Fields to post a new Transaction.

Input Fields

transactionId - UUID! The ID is required to ensure an idempotent transaction.
tranCode - String! String corresponding to the code of a TranCode to be used for this transaction.
params - JSON Params object specifying values for the params defined in the corresponding TranCode.

TransactionUpdateInput

Transaction fields to update.

Input Fields

externalId - String Allows specifying a unique external ID associated with this transaction.
description - String Description of the transaction.
metadata - JSON Arbitrary structured data about this transaction.

UpdateClientInput

Input Fields

policies - [PolicyInput]! Replaces the existing policies with this new set of policies.

UpdateGroupInput

Input Fields

name - String! A human-friendly name for the group, such as 'Admins' or 'DataAnalysts'.
description - String A brief description of the group's purpose, intended to provide additional context.

policy - String

A set of policies to apply to this group, formatted as a JSON list that define the permissions granted to users within this group.

The structure of these policies matches the Policy type, but serialized as a JSON string.

Example:

policy: "[{\"actions\": [\"*\"],\"effect\": \"DENY\",\"resources\":[\"*\"],\"assertions\": {\"always false\": \"1 == 0\"}}]"

UpdateTenantInput

Input Fields

accountId - String!

A globally unique identifier representing an environment within the organization.

This accountId, when combined with an AWS region, is used to calculate the database tenant.

name - String A human-friendly name for the tenant, used for display purposes and easier identification.
description - String A brief description of the tenant, providing additional context about its purpose or characteristics.

UpdateUserInput

Input Fields

groupIds - [UUID] A list of unique identifiers for the groups to which the user belongs. The user's permissions are determined by the combined policies of these groups.
email - String! The user's email address, which serves as a unique identifier and primary means of contact.

Enums

AccountIndex

Indexes for querying Accounts. To optimize query performance and apply desired filters, choose the appropriate index.

Values

ACCOUNT_IDIndex by accountId field. Must supply an accountId: { eq: <id> } filter to the where object.
NAMEIndex by name field. Use to apply query filters on the value of name.
CODEIndex by code field. Use to apply query filters on the value of code.
STATUSIndex by status field. Use to apply query filters on the value of status.
EXTERNAL_IDIndex by externalId field. Must supply an externalId: { eq: <id> } filter to the where object.
CUSTOMUse a custom-defined index. Must supply a custom filter to the where object.

AccountSetIndex

Indexes for querying AccountSets. To optimize query performance and apply desired filters, choose the appropriate index.

Values

ACCOUNT_SET_IDIndex by accountSetId field. Must supply an accountSetId: { eq: <id> } filter to the where object.
NAMEIndex by name field. Use to apply query filters on the value of name.
CUSTOMUse a custom-defined index. Must supply a custom filter to the where object.

AccountSetMemberType

Account set members can be of type Account or AccountSet.

Values

ACCOUNT
ACCOUNT_SET

AccountStatus

Account status determines whether the account is in active use or closed (locked). By default, all accounts are ACTIVE.

When account is LOCKED, it cannot be changed and any attempt to write a ledger entry to this account will raise an error.

Values

ACTIVEACTIVE = Account is open for posting.
LOCKEDLOCKED = Account is locked and will block posting.

BalanceIndex

Indexes for querying Balances. To optimize query performance and apply desired filters, choose the appropriate index.

Values

ACCOUNT_IDIndex by accountId field. Must supply an accountId: { eq: <id> } filter to the where object.
CUSTOMUse a custom-defined index. Must supply a custom filter to the where object.

CurrencyDisplay

Defines how to render the currency indicator.

Values

SYMBOLShow the symbol for the currency. @example('$1.23') @example('€1.23')
CODEShow the currency code. @example('USD') @example('EUR')
NONEDon't show the code or symbol for the currency.

DebitOrCredit

Debit or credit? Sometimes these are abbreviated to DR and CR.

Values

DEBIT
CREDIT

EntryIndex

Indexes for querying Entries. To optimize query performance and apply desired filters, choose the appropriate index.

Values

ENTRY_IDIndex by entryId field. Must supply an entryId: { eq: <id> } filter to the where object.
TRANSACTION_IDIndex by transactionId field. Must supply an transactionId: { eq: <id> } filter to the where object.

IndexOnEnum

Record types which support custom indexes.

Values

Account
AccountSet
Balance
Transaction
TranCode

JournalIndex

Indexes for querying Journals. To optimize query performance and apply desired filters, choose the appropriate index.

Values

JOURNAL_IDIndex by JOURNAL_ID field. Must supply a journalId: { eq: <id> } filter to the where object.
NAMEIndex by name field. Use to apply query filters on the value of name.
STATUSIndex by status field. Use to apply query filters on the value of status.
CODEIndex by code field. Use to apply query filters on the value of code.

Layer

The ledger can apply a entries to one of three layers: SETTLED, PENDING, and ENCUMBRANCE.

The SETTLED layer is what is actually fully settled.

The PENDING layer is what's settled but also includes holds and pending charges. This can be used to verify the account will have enough funds after the holds and pending transactions have cleared.

The ENCUMBRANCE layer allows us to add future transactions that are scheduled and also goals or budgeting tools to set money aside in the account.

Values

SETTLED
PENDING
ENCUMBRANCE

ParamDataType

Data type of a parameter.

Values

STRING
INTEGER
DECIMAL
BOOLEAN
UUID
DATE
TIMESTAMP
JSON

PolicyAction

Values

SELECT
INSERT
UPDATE
DELETE

PolicyEffect

Values

ALLOW
DENY

RoundingMode

Defines the rounding behavior when formatting units.

Values

HALF_DOWNRounds up if the next digit is > 5, otherwise rounds down.
HALF_UPRounds up if the next digit is >= 5, otherwise rounds down.
DOWNRounds towards 0, truncating extra digits.
UPRounds away from 0.

SortOrder

ASC (ascending) or DESC (descending).

Values

ASC
DESC

Status

Record status. All records are ACTIVE by default.

To avoid rewriting accounting history, most records are not deleted but simply marked LOCKED, indicating that they should not be used.

Values

ACTIVE
LOCKED

TranCodeIndex

Indexes for querying TranCodes. To optimize query performance and apply desired filters, choose the appropriate index.

Values

TRAN_CODE_IDIndex by tranCodeId field. Must supply a tranCodeId: { eq: <id> } filter to the where object.
CODEIndex by code field. Use to apply query filters on the value of code.
STATUSIndex by status field. Use to apply query filters on the value of status.
CUSTOMUse a custom-defined index. Must supply a custom filter to the where object.

TransactionIndex

Indexes for querying Transactions. To optimize query performance and apply desired filters, choose the appropriate index.

Values

TRANSACTION_IDIndex by TRANSACTION_ID field. Must supply a transactionId: { eq: <id> } filter to the where object.
CORRELATION_IDIndex by CORRELATION_ID field. Must supply a correlationId: { eq: <id> } filter to the where object.
EXTERNAL_IDIndex by EXTERNAL_ID field. Must supply an externalId: { eq: <id> } filter to the where object.
CUSTOMUse a custom-defined index. Must supply a custom filter to the where object.

Scalars

Boolean

The Boolean scalar type represents true or false.

CurrencyCode

ISO 4217 standard three-character code indicating the currency.

Examples:

  • 'USD'
  • 'CHF'

Date

Date in YYYY-MM-DD format.

Example: '2022-08-18'

Decimal

Decimal is a fixed-precision data type supporting exact representation of numeric values.

Example: 105.92851

EntryType

String value for an entry type.

Example: 'ACH_CR'

Expression

A literal CEL expression to be evaluated.

ExpressionMap

A map of literal Cel expressions to be evaluated in a shared context Ex: { "two": "this.one + 1", "one": "2 - 1", "sqrt2": "math.Sqrt(double(2))", "now": "time.Now()" }

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.

Int

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

InterpolatedExpression

Interpolated string expression. Values within {{}} are evaluated as a CEL expression.

Examples:

  • Current time: {{time.Now()}} => "Current time: 2022-04-27T10:50:00.000Z"
  • Raw String => "Raw String"
  • {{uuid.New()}} => "9dd984db-78d8-420f-9380-80e3cf36fe75"

JSON

JSON object.

Example: { "counts": 12, "name": "Metric A" }

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.

Timestamp

RFC3339-compliant UTC timestamp.

Example: '2022-04-27T10:50:00.000Z'

UUID

128-bit universally unique identifier (UUID). Used for most ID fields on records.

Example: '3ea12e45-7df2-4293-9434-feb792affc91'

Value

Value object. Similar to the JSON object with support for type coersion

Example: { "int": 12, "float": 1.732, "uuid": "D3DC5ED3-23D0-4924-BAE1-9AA026BACE09"}

Interfaces

Connection

Connection types must contain a pageInfo field as well as nodes and edges.

Fields

pageInfo - PageInfo!

Node

Fields

id - ID! Globally unique identifier for a record to support Global Object Identification. See: https://graphql.org/learn/global-object-identification/

Unions

AccountSetMember

Account set members can be of type Account or AccountSet.

Possible Types