Mercury: Books schemas (part 2)
67 Mercury schemas with complete fields and constraints.
← Books operations · All schemas
List journal entries — response body — journal Entries item line Entries array item transaction amount, attachments, card Last Four Digits, categorization Method, counterparty Name, custom Category Id, custom Category Name, datetime, description, external Metadata Id, id, journal Entry Id, ledger Id, line Entry Id, merchant Type, note, opposing Line Entry Ids, personal, posted Status, review Status, source Account Id, team Member Id, team Member Name, transaction Method Kind amount, attachments, card Last Four Digits, categorization Method, counterparty Name, custom Category Id, custom Category Name, datetime, description, external Metadata Id, id, journal Entry Id, ledger Id, line Entry Id, merchant Type, note, opposing Line Entry Ids, personal, posted Status, review Status, source Account Id, team Member Id, team Member Name, transaction Method Kind merchant Type category, display, icon category, display, icon icon string
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | string | Root | Known values: arrowsLeftRightIcon, arrowsRotateIcon, atomSimpleIcon, ballotCheckIcon, bankIcon, bellConciergeIcon, boltIcon, bookOpenCoverIcon, booksIcon, boxIcon, buildingIcon, burgerIcon, carIcon, cartShoppingFastIcon, carWrenchIcon, chartLineUpIcon, circleParkingIcon, computerIcon, creditCardIcon, crownIcon, envelopeOpenTextIcon, faucetIcon, fileInvoiceIcon, fileInvoiceDollarIcon, fingerprintIcon, gasPumpIcon, gavelIcon, gearIcon, giftIcon, globeIcon, graduationCapIcon, handHoldingDollarIcon, handshakeIcon, headSideMedicalIcon, heartIcon, homeIcon, idBadgeIcon, keyIcon, keynoteIcon, landmarkFlagIcon, laptopIcon, laptopMobileIcon, listCheckIcon, lockIcon, lockOpenIcon, martiniGlassIcon, masksTheaterIcon, messagesIcon, mobileIcon, moneyBillTransferIcon, moneyBillWaveIcon, moneyCheckIcon, mugSaucerIcon, planeIcon, planetRingedIcon, receiptIcon, rectanglesMixedIcon, seedlingIcon, shieldCheckIcon, shieldHavedIcon, shirtIcon, shopIcon, shoppingCartIcon, signInIcon, signOutIcon, slotMachineIcon, staplerIcon, starsIcon, sunBrightIcon, taxiBusIcon, taxiIcon, towerBroadcastIcon, trainIcon, tvIcon, userIcon, userPlusIcon, usersIcon, utensilsIcon, warningIcon, wifiIcon, wineGlassIcon, wrenchIcon |
List journal entries — response body — journal Entries item transfer from Entry, to Entry from Entry, to Entry
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Links a journal entry to the journal entry on the other side of a transfer between accounts (e.g. Stripe Payouts). Mercury automatically links these so the UI can surface the opposing journal entry. |
fromEntry | JSON | Required within parent | |
fromEntry (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journal Entries item transfer from Entry, to Entry from Entry, to Entry to Entry datetime, description, journal Entry Id, line Entries |
fromEntry (allOf 2) | JSON | All variants apply | The 'from' side of the transfer. |
toEntry | JSON | Required within parent | |
toEntry (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journal Entries item transfer from Entry, to Entry from Entry, to Entry to Entry datetime, description, journal Entry Id, line Entries |
toEntry (allOf 2) | JSON | All variants apply | The 'to' side of the transfer. |
List journal entries — response body — journal Entries item transfer from Entry, to Entry from Entry, to Entry to Entry datetime, description, journal Entry Id, line Entries
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One side of a transfer between accounts: a journal entry summary with its line entries, enough to render a linked-transfer row (amount, account, description, date) without a second request. |
datetime | JSON | Required within parent | |
datetime (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
datetime (allOf 2) | JSON | All variants apply | This side's Journal Entry datetime. |
description | string | Required within parent | This side's Journal Entry description. Format: size < 513 |
journalEntryId | string | Required within parent | The id of this side's Journal Entry. Format: base58 (max length 22) |
lineEntries | array | Required within parent | This side's Line Entries (used to derive the amount and source account). |
lineEntries[] | Model | Each item | Expand List journal entries — response body — journal Entries item line Entries array item |
Referenced models: List journal entries — response body — journal Entries item line Entries array item
List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An accrual source is a record of a financial transaction that has been recorded (e.g. invoice or bill) It used to generate journal entries in books and tracking payments against it. |
amountOutstanding | JSON | Required within parent | |
amountOutstanding (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amountOutstanding (allOf 2) | JSON | All variants apply | The amount outstanding |
amountPaid | JSON | Required within parent | |
amountPaid (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amountPaid (allOf 2) | JSON | All variants apply | The amount of payments made against the accrual source. |
billPayInvoiceAttachment | JSON | Optional | |
billPayInvoiceAttachment (anyOf 1) | JSON | Alternative | |
billPayInvoiceAttachment (anyOf 1) (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll bill Pay Invoice Attachment download Url, file Name, id download Url, file Name, id |
billPayInvoiceAttachment (anyOf 1) (allOf 2) | JSON | All variants apply | For bills synced from Bill Pay: the invoice file the bill was created from, served by MWB with a presigned download URL. Read-only in Books. Populated only on the GetBooksAccrualSources and UpdateBooksAccrualSource endpoint responses; other surfaces that embed accrual sources (journal entries, payment suggestions, create, Command tools) leave it null. |
billPayInvoiceAttachment (anyOf 2) | null | Alternative | |
displayStatus | JSON | Required within parent | |
displayStatus (allOf 1) | string | All variants apply | Known values: open, paid, draft, cancelled, overdue, partiallyPaid, processing |
displayStatus (allOf 2) | JSON | All variants apply | The display status of the accrual source |
dueDate | JSON | Optional | |
dueDate (anyOf 1) | JSON | Alternative | |
dueDate (anyOf 1) (allOf 1) | string | All variants apply | Format: date |
dueDate (anyOf 1) (allOf 2) | JSON | All variants apply | The due date of the accrual source (e.g invoice/bill due date) |
dueDate (anyOf 2) | null | Alternative | |
effectiveDate | JSON | Required within parent | |
effectiveDate (allOf 1) | string | All variants apply | Format: date |
effectiveDate (allOf 2) | JSON | All variants apply | The effective date of the accrual source (e.g invoice/bill date) |
externalId | JSON | Optional | |
externalId (anyOf 1) | string | Alternative | The external ID of the accrual source, if applicable |
externalId (anyOf 2) | null | Alternative | |
externalPartyId | JSON | Optional | |
externalPartyId (anyOf 1) | JSON | Alternative | |
externalPartyId (anyOf 1) (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll external Party Id The external party ID of the accrual source value |
externalPartyId (anyOf 1) (allOf 2) | JSON | All variants apply | The external party ID of the accrual source |
externalPartyId (anyOf 2) | null | Alternative | |
files | JSON | Optional | |
files (anyOf 1) | array | Alternative | The files associated with the accrual source, if any |
files (anyOf 1)[] | Model | Each item | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll files array item |
files (anyOf 2) | null | Alternative | |
grossAmount | JSON | Required within parent | |
grossAmount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
grossAmount (allOf 2) | JSON | All variants apply | The gross amount of the accrual source. Total of all lines. |
id | JSON | Optional | |
id (anyOf 1) | string | Alternative | The ID of the accrual source. Missing when the accrual source has not yet been created in Teal — i.e. when the synchronous Teal sync failed and was deferred to an async workflow. Signal that the accrual source is pending sync. Format: base58 (max length 22) |
id (anyOf 2) | null | Alternative | |
journalEntryIds | array | Required within parent | The journal entry IDs generated from the accrual source. |
journalEntryIds[] | string | Each item | unique id for a journal entry; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
lines | JSON | Optional | |
lines (anyOf 1) | array | Alternative | The lines that make up the accrual source. At least one line is required. |
lines (anyOf 1)[] | Model | Each item | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll lines array item |
lines (anyOf 2) | null | Alternative | |
needsActionReason | JSON | Optional | |
needsActionReason (anyOf 1) | JSON | Alternative | |
needsActionReason (anyOf 1) (allOf 1) | string | All variants apply | Known values: transactionNotInTeal, transactionAmountExceedsInvoiceBalance, transactionAmountDoesNotCoverInvoices, sourceAccountNotMapped, transactionPredatesBooksStartDate, transactionAppliedToOtherInvoices, cardChargeStripeNotConnected, cardChargeStripeSetupPending |
needsActionReason (anyOf 1) (allOf 2) | JSON | All variants apply | Present when the invoice is paid but the payment can't sync to Books without user intervention. Deprecated in favour of unappliedPayments, which reports a reason per payment along with how much each leaves unaccounted for, rather than one reason for the whole accrual source. Derived from that list, so the two cannot disagree: this is the lowest-ranked of its reasons. |
needsActionReason (anyOf 2) | null | Alternative | |
notes | JSON | Optional | |
notes (anyOf 1) | string | Alternative | Optional notes or memo for the accrual source |
notes (anyOf 2) | null | Alternative | |
paymentApplications | JSON | Optional | |
paymentApplications (anyOf 1) | array | Alternative | Payments applied to the accrual source |
paymentApplications (anyOf 1)[] | Model | Each item | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll payment Applications Payments applied to the accrual source item |
paymentApplications (anyOf 2) | null | Alternative | |
referenceNumber | JSON | Optional | |
referenceNumber (anyOf 1) | string | Alternative | The reference number of the accrual source |
referenceNumber (anyOf 2) | null | Alternative | |
status | JSON | Required within parent | |
status (allOf 1) | string | All variants apply | Known values: open, paid, draft, cancelled, processing |
status (allOf 2) | JSON | All variants apply | The status of the accrual source |
type | string | Required within parent | The type of the accrual source Known values: invoice, bill, payroll |
unappliedPayments | JSON | Optional | |
unappliedPayments (anyOf 1) | array | Alternative | Payments Mercury recorded against this accrual source that have not reached Books, each with the reason it hasn't. Minimum items: 1 |
unappliedPayments (anyOf 1)[] | Model | Each item | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll unapplied Payments array item |
unappliedPayments (anyOf 2) | null | Alternative |
Referenced models: List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll files array item, List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll lines array item, List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll payment Applications Payments applied to the accrual source item, List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll unapplied Payments array item, List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll bill Pay Invoice Attachment download Url, file Name, id download Url, file Name, id, List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll external Party Id The external party ID of the accrual source value, Create a product — response body — unit Price value
List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll bill Pay Invoice Attachment download Url, file Name, id download Url, file Name, id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The invoice file a Bill Pay bill was created from, for bills synced into Books. The file lives in MWB's S3 (uploaded or emailed to Bill Pay) rather than in Teal, so it is served with a presigned URL instead of an accrual source file id. |
downloadUrl | string | Required within parent | A presigned URL for downloading the attachment (valid for 1 hour). |
fileName | string | Required within parent | The filename of the attachment. |
id | string | Required within parent | Opaque display-only identifier (e.g. for React keys). Depending on the invoice's origin it comes from one of two different id namespaces, so it must not be fed back to any attachment endpoint. |
List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll external Party Id The external party ID of the accrual source value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | object | Alternative | |
$ (anyOf 1).contents | string | Required within parent | ID for this books counterparty Format: uuid |
$ (anyOf 1).tag | string | Required within parent | Known values: counterpartyId |
$ (anyOf 2) | object | Alternative | |
$ (anyOf 2).contents | string | Required within parent | The customer who will receive the invoice. Use the /api/v1/ar/customers endpoint to list your customers and find the corresponding id, or create a new customer first. Format: uuid |
$ (anyOf 2).tag | string | Required within parent | Known values: customerId |
List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll files array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A file associated with an accrual source |
fileName | string | Required within parent | The name of the file Maximum length: 299 Minimum length: 1 |
id | string | Required within parent | The ID of the accrual source file Format: base58 (max length 22) |
List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll lines array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A line item in an accrual source |
accountId | string | Required within parent | The ID of the ledger Format: base58 (max length 22) |
accrualSourceId | string | Required within parent | The ID of the accrual source Format: base58 (max length 22) |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The amount of the accrual source line |
description | string | Required within parent | The description of the accrual source line |
externalId | JSON | Optional | |
externalId (anyOf 1) | string | Alternative | The external ID of the accrual source line. This is the ID of the accrual source line in an external system. |
externalId (anyOf 2) | null | Alternative | |
id | string | Required within parent | The ID of the accrual source line Format: base58 (max length 22) |
lineNumber | JSON | Required within parent | |
lineNumber (anyOf 1) | integer | Alternative | The line number. Used for maintaining a consistent order of lines within an accrual source. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
lineNumber (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Create a product — response body — unit Price value
List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll payment Applications Payments applied to the accrual source item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Payment application for an accrual source |
adjustments | array | Required within parent | Applicable adjustments |
adjustments[] | Model | Each item | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll payment Applications Payments applied to the accrual source item adjustments item |
lineEntry | JSON | Required within parent | |
lineEntry (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll payment Applications Payments applied to the accrual source item line Entry journal Entry Description, journal Entry Id, line Entry Amount, line Entry Description, line Entry Id |
lineEntry (allOf 2) | JSON | All variants apply | Metadata for the line entry for this payment application |
matchedAmount | JSON | Required within parent | |
matchedAmount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
matchedAmount (allOf 2) | JSON | All variants apply | What amount of the line entry is applied as a payment to the accrual source |
paymentApplicationId | string | Required within parent | The ID of the payment application Format: base58 (max length 22) |
sourceType | string | Required within parent | The source type of the payment application Known values: bankTransaction, customerCredit, manual |
status | string | Required within parent | The status of the payment application Known values: proposed, confirmed, rejected |
Referenced models: List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll payment Applications Payments applied to the accrual source item line Entry journal Entry Description, journal Entry Id, line Entry Amount, line Entry Description, line Entry Id, List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll payment Applications Payments applied to the accrual source item adjustments item, Create a product — response body — unit Price value
List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll payment Applications Payments applied to the accrual source item adjustments item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Adjustment for an accrual source |
accrualAdjustmentId | string | Required within parent | ID of the adjustment Format: base58 (max length 22) |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | Value of the adjustment against the accrual source |
creditAccountId | string | Required within parent | ID of the applicable credit ledger Format: base58 (max length 22) |
debitAccountId | string | Required within parent | ID of the applicable debit ledger Format: base58 (max length 22) |
Referenced models: Create a product — response body — unit Price value
List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll payment Applications Payments applied to the accrual source item line Entry journal Entry Description, journal Entry Id, line Entry Amount, line Entry Description, line Entry Id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Line entry metadata for an accrual source payment application |
journalEntryDescription | string | Required within parent | The description of the journal entry |
journalEntryId | string | Required within parent | The ID of the line entry's journal entry Format: base58 (max length 22) |
lineEntryAmount | JSON | Required within parent | |
lineEntryAmount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
lineEntryAmount (allOf 2) | JSON | All variants apply | The amount of the line entry |
lineEntryDescription | string | Required within parent | The description of the line entry |
lineEntryId | string | Required within parent | The ID of the line entry Format: base58 (max length 22) |
Referenced models: Create a product — response body — unit Price value
List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll unapplied Payments array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A payment recorded against the accrual source in Mercury that has not reached Books, and what is standing in the way. |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The payment's amount as Mercury recorded it against this accrual source. Unlike amountPaid and amountOutstanding, which are Books' figures, this is Mercury's: money received that Books has not been able to record. It is this payment's share of its transaction, so a transaction split across several invoices reports only the share belonging to each. |
needsActionReason | JSON | Required within parent | |
needsActionReason (allOf 1) | string | All variants apply | Known values: transactionNotInTeal, transactionAmountExceedsInvoiceBalance, transactionAmountDoesNotCoverInvoices, sourceAccountNotMapped, transactionPredatesBooksStartDate, transactionAppliedToOtherInvoices, cardChargeStripeNotConnected, cardChargeStripeSetupPending |
needsActionReason (allOf 2) | JSON | All variants apply | Why the payment has not reached Books. Always present: an entry exists only because something is blocking it. |
Referenced models: Create a product — response body — unit Price value
List journal entries — response body — journalEntries / item / lineEntries / array / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An accrual source is a record of a financial transaction that has been recorded (e.g. invoice or bill) It used to generate journal entries in books and tracking payments against it. |
amountOutstanding | JSON | Required within parent | |
amountOutstanding (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amountOutstanding (allOf 2) | JSON | All variants apply | The amount outstanding |
amountPaid | JSON | Required within parent | |
amountPaid (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amountPaid (allOf 2) | JSON | All variants apply | The amount of payments made against the accrual source. |
displayStatus | JSON | Required within parent | |
displayStatus (allOf 1) | string | All variants apply | Known values: open, paid, draft, cancelled, overdue, partiallyPaid, processing |
displayStatus (allOf 2) | JSON | All variants apply | The display status of the accrual source |
dueDate | JSON | Optional | |
dueDate (anyOf 1) | JSON | Alternative | |
dueDate (anyOf 1) (allOf 1) | string | All variants apply | Format: date |
dueDate (anyOf 1) (allOf 2) | JSON | All variants apply | The due date of the accrual source (e.g invoice/bill due date) |
dueDate (anyOf 2) | null | Alternative | |
effectiveDate | JSON | Required within parent | |
effectiveDate (allOf 1) | string | All variants apply | Format: date |
effectiveDate (allOf 2) | JSON | All variants apply | The effective date of the accrual source (e.g invoice/bill date) |
externalId | JSON | Optional | |
externalId (anyOf 1) | string | Alternative | The external ID of the accrual source, if applicable |
externalId (anyOf 2) | null | Alternative | |
externalPartyId | JSON | Optional | |
externalPartyId (anyOf 1) | JSON | Alternative | |
externalPartyId (anyOf 1) (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll external Party Id The external party ID of the accrual source value |
externalPartyId (anyOf 1) (allOf 2) | JSON | All variants apply | The external party ID of the accrual source |
externalPartyId (anyOf 2) | null | Alternative | |
grossAmount | JSON | Required within parent | |
grossAmount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
grossAmount (allOf 2) | JSON | All variants apply | The gross amount of the accrual source. Total of all lines. |
id | string | Required within parent | The ID of the accrual source Format: base58 (max length 22) |
lines | JSON | Optional | |
lines (anyOf 1) | array | Alternative | The lines that make up the accrual source. At least one line is required. |
lines (anyOf 1)[] | Model | Each item | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll lines array item |
lines (anyOf 2) | null | Alternative | |
notes | JSON | Optional | |
notes (anyOf 1) | string | Alternative | Optional notes or memo for the accrual source |
notes (anyOf 2) | null | Alternative | |
referenceNumber | JSON | Optional | |
referenceNumber (anyOf 1) | string | Alternative | The reference number of the accrual source |
referenceNumber (anyOf 2) | null | Alternative | |
status | JSON | Required within parent | |
status (allOf 1) | string | All variants apply | Known values: open, paid, draft, cancelled, processing |
status (allOf 2) | JSON | All variants apply | The status of the accrual source |
type | string | Required within parent | The type of the accrual source Known values: invoice, bill, payroll |
Referenced models: List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll lines array item, List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll external Party Id The external party ID of the accrual source value, Create a product — response body — unit Price value
List journal entries — response body — journalEntries / item / lineEntries / array / item / paymentApplications / array / item / sourceType: bank Transaction, customer Credit, manual, status: proposed, confirmed, rejected accrual Source type: invoice, bill, payroll type: invoice, bill, payroll
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Accrual source metadata for a source-level payment application: an invoice, a bill, or a payroll run matched as a whole. |
accrualSourceId | string | Required within parent | The ID of the accrual source Format: base58 (max length 22) |
effectiveDate | JSON | Required within parent | |
effectiveDate (allOf 1) | string | All variants apply | Format: date |
effectiveDate (allOf 2) | JSON | All variants apply | The effective date of the accrual source |
externalId | JSON | Optional | |
externalId (anyOf 1) | string | Alternative | The external ID of the accrual source |
externalId (anyOf 2) | null | Alternative | |
externalPartyId | JSON | Optional | |
externalPartyId (anyOf 1) | JSON | Alternative | |
externalPartyId (anyOf 1) (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll external Party Id The external party ID of the accrual source value |
externalPartyId (anyOf 1) (allOf 2) | JSON | All variants apply | The external party ID of the accrual source |
externalPartyId (anyOf 2) | null | Alternative | |
grossAmount | JSON | Required within parent | |
grossAmount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
grossAmount (allOf 2) | JSON | All variants apply | The gross amount of the accrual source |
referenceNumber | JSON | Optional | |
referenceNumber (anyOf 1) | string | Alternative | The reference number of the accrual source |
referenceNumber (anyOf 2) | null | Alternative | |
type | string | Required within parent | The type of the accrual source Known values: invoice, bill, payroll |
Referenced models: List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll external Party Id The external party ID of the accrual source value, Create a product — response body — unit Price value
List journal entries — response body — journalEntries / item / lineEntries / array / item / paymentApplications / array / item / sourceType: bank Transaction, customer Credit, manual, status: proposed, confirmed, rejected accrual Source type: payroll
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Payroll accrual source for a line-level payment application: the run + its pay period. |
accrualSourceId | string | Required within parent | The ID of the accrual source (the payroll run) Format: base58 (max length 22) |
endDate | JSON | Required within parent | |
endDate (allOf 1) | string | All variants apply | Format: date |
endDate (allOf 2) | JSON | All variants apply | The end date of the pay period |
startDate | JSON | Required within parent | |
startDate (allOf 1) | string | All variants apply | Format: date |
startDate (allOf 2) | JSON | All variants apply | The start date of the pay period |
type | string | Required within parent | The type of the accrual source. Always `payroll` — line-level payment applications only exist for payroll runs. Known values: payroll |
List journal entries — response body — journalEntries / item / lineEntries / array / item / paymentApplications / array / item / sourceType: bank Transaction, customer Credit, manual, status: proposed, confirmed, rejected unapplied Payment line Entry Id line Entry Id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Marks a source-level payment application as the line entry's unapplied payment. Not 'BooksAccrualSourceUnappliedPayment', which is Mercury money Books hasn't recorded. |
lineEntryId | string | Required within parent | The line on the same journal entry that holds the unapplied amount, on the unapplied payments ledger Format: base58 (max length 22) |
List journal entries — response body — journalEntries / item / lineEntries / array / item / paymentApplications / array / item / sourceType: bank Transaction, customer Credit, manual, status: proposed, confirmed, rejected — bulkcreatebooksjournalentries__Books Line Entry Line Payment Application
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Line-level (payroll) payment application. The @paymentApplicationLine@ variant of 'BooksLineEntryPaymentApplication'. |
accrualSource | JSON | Required within parent | |
accrualSource (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journalEntries / item / lineEntries / array / item / paymentApplications / array / item / sourceType: bank Transaction, customer Credit, manual, status: proposed, confirmed, rejected accrual Source type: payroll |
accrualSource (allOf 2) | JSON | All variants apply | The payroll accrual source (run + pay period) of this payment application |
linePaymentApplicationId | string | Required within parent | The ID of the line-level payment application Format: base58 (max length 22) |
matchedAmount | JSON | Required within parent | |
matchedAmount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
matchedAmount (allOf 2) | JSON | All variants apply | What amount of the line entry is applied as a payment to the payroll line |
sourceType | string | Required within parent | The source type of the payment application Known values: bankTransaction, customerCredit, manual |
status | string | Required within parent | The status of the payment application Known values: proposed, confirmed, rejected |
Referenced models: List journal entries — response body — journalEntries / item / lineEntries / array / item / paymentApplications / array / item / sourceType: bank Transaction, customer Credit, manual, status: proposed, confirmed, rejected accrual Source type: payroll, Create a product — response body — unit Price value
List journal entries — response body — journalEntries / item / lineEntries / array / item / paymentApplications / array / item / sourceType: bank Transaction, customer Credit, manual, status: proposed, confirmed, rejected — bulkcreatebooksjournalentries__Books Line Entry Payment Application Source
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Source-level payment application (invoice, bill, or closing adjustment). The @paymentApplication@ variant of 'BooksLineEntryPaymentApplication'. |
accrualSource | JSON | Optional | |
accrualSource (anyOf 1) | JSON | Alternative | |
accrualSource (anyOf 1) (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journalEntries / item / lineEntries / array / item / paymentApplications / array / item / sourceType: bank Transaction, customer Credit, manual, status: proposed, confirmed, rejected accrual Source type: invoice, bill, payroll type: invoice, bill, payroll |
accrualSource (anyOf 1) (allOf 2) | JSON | All variants apply | Metadata for the accrual source for this payment application. Absent for a closing adjustment or the unapplied payment. |
accrualSource (anyOf 2) | null | Alternative | |
adjustments | array | Required within parent | Applicable adjustments |
adjustments[] | Model | Each item | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll payment Applications Payments applied to the accrual source item adjustments item |
matchedAmount | JSON | Required within parent | |
matchedAmount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
matchedAmount (allOf 2) | JSON | All variants apply | What amount of the line entry is applied as a payment to the accrual source |
paymentApplicationId | string | Required within parent | The ID of the payment application Format: base58 (max length 22) |
sourceType | string | Required within parent | The source type of the payment application Known values: bankTransaction, customerCredit, manual |
status | string | Required within parent | The status of the payment application Known values: proposed, confirmed, rejected |
unappliedPayment | JSON | Optional | |
unappliedPayment (anyOf 1) | JSON | Alternative | |
unappliedPayment (anyOf 1) (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journalEntries / item / lineEntries / array / item / paymentApplications / array / item / sourceType: bank Transaction, customer Credit, manual, status: proposed, confirmed, rejected unapplied Payment line Entry Id line Entry Id |
unappliedPayment (anyOf 1) (allOf 2) | JSON | All variants apply | Present when this row is the line entry's unapplied payment, the part of the deposit the match leaves unapplied; its amount is @matchedAmount@. Absent for an accrual source's payment or a closing adjustment. |
unappliedPayment (anyOf 2) | null | Alternative |
Referenced models: List journal entries — response body — journalEntries / item / lineEntries / array / item / paymentApplications / array / item / sourceType: bank Transaction, customer Credit, manual, status: proposed, confirmed, rejected accrual Source type: invoice, bill, payroll type: invoice, bill, payroll, List journal entries — response body — journalEntries / item / lineEntries / array / item / paymentApplications / array / item / sourceType: bank Transaction, customer Credit, manual, status: proposed, confirmed, rejected unapplied Payment line Entry Id line Entry Id, List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll payment Applications Payments applied to the accrual source item adjustments item, Create a product — response body — unit Price value
List line entries (general ledger activity) across ledgers — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response containing a paginated list of line entries. |
lineEntries | array | Required within parent | The line entries on this page |
lineEntries[] | Model | Each item | Expand List line entries (general ledger activity) across ledgers — response body — line Entries item |
nextPageToken | JSON | Optional | |
nextPageToken (anyOf 1) | string | Alternative | Token to fetch the next page of results |
nextPageToken (anyOf 2) | null | Alternative | |
prevPageToken | JSON | Optional | |
prevPageToken (anyOf 1) | string | Alternative | Token to fetch the previous page of results |
prevPageToken (anyOf 2) | null | Alternative |
Referenced models: List line entries (general ledger activity) across ledgers — response body — line Entries item
List line entries (general ledger activity) across ledgers — response body — line Entries item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A single line of general ledger (GL) activity: one debit or credit posted to one ledger by a journal entry. |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The unsigned amount of the line entry, in dollars. |
datetime | JSON | Required within parent | |
datetime (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
datetime (allOf 2) | JSON | All variants apply | When the line entry was posted, in UTC. |
debitCredit | JSON | Required within parent | |
debitCredit (allOf 1) | string | All variants apply | Known values: debit, credit |
debitCredit (allOf 2) | JSON | All variants apply | Whether the amount is a debit or a credit to the ledger. |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | The line entry's own description, if any. Format: size < 4001 |
description (anyOf 2) | null | Alternative | |
id | string | Required within parent | The unique identifier for the line entry. Format: base58 (max length 22) |
journalEntryDescription | string | Required within parent | The description of the journal entry the line entry belongs to. Format: size < 513 |
journalEntryId | string | Required within parent | The identifier of the journal entry the line entry belongs to. Format: base58 (max length 22) |
ledgerId | string | Required within parent | The identifier of the ledger (general ledger account) the line entry is posted to. Format: base58 (max length 22) |
ledgerName | string | Required within parent | The display name of the ledger the line entry is posted to. |
opposingLedgerIds | array | Required within parent | The identifiers of the ledgers on the other side of the journal entry, i.e. its lines with the opposite debit or credit. |
opposingLedgerIds[] | string | Each item | unique id for a ledger; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
tags | array | Required within parent | The tags applied to the line entry. |
tags[] | Model | Each item | Expand List line entries (general ledger activity) across ledgers — response body — line Entries item tags item |
Referenced models: List line entries (general ledger activity) across ledgers — response body — line Entries item tags item, Create a product — response body — unit Price value
List line entries (general ledger activity) across ledgers — response body — line Entries item tags item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A tag used for categorizing transactions in Books. |
id | string | Required within parent | Unique identifier for the tag. Format: base58 (max length 22) |
name | string | Required within parent | Display name of the tag. |
tagGroupId | string | Required within parent | unique id for a tag group; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
List source accounts (bank, card, and other transaction feeds) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response containing every source account of a Books instance. |
sourceAccounts | array | Required within parent | The Books instance's source accounts |
sourceAccounts[] | Model | Each item | Expand List source accounts (bank, card, and other transaction feeds) — response body — source Accounts item |
Referenced models: List source accounts (bank, card, and other transaction feeds) — response body — source Accounts item
List source accounts (bank, card, and other transaction feeds) — response body — source Accounts item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A source account: a bank account, card, or other feed whose transactions Books imports and posts to the source account's ledger. |
businessPersonal | JSON | Required within parent | |
businessPersonal (allOf 1) | string | All variants apply | Known values: business, personal |
businessPersonal (allOf 2) | JSON | All variants apply | Whether the source account holds business or personal transactions. |
debitCredit | JSON | Required within parent | |
debitCredit (allOf 1) | string | All variants apply | Known values: debit, credit |
debitCredit (allOf 2) | JSON | All variants apply | The source account's natural side: `debit` for an asset such as a bank account, `credit` for a liability such as a credit card. A positive transaction amount is posted on this side, increasing the source account's ledger balance. |
id | string | Required within parent | The unique identifier of the source account: the `sourceAccountId` to pass when listing or fetching its transactions. It is not a ledger ID. Format: base58 (max length 22) |
ledgerId | string | Required within parent | The identifier of the ledger (general ledger account) the source account's transactions post to. Format: base58 (max length 22) |
name | string | Required within parent | The display name of the source account. |
origin | JSON | Required within parent | |
origin (allOf 1) | string | All variants apply | Known values: mercury, plaid, rutterCommerce, manual |
origin (allOf 2) | JSON | All variants apply | How the source account came to exist in Books. |
List tag groups — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One page of the tag groups available to a Books instance, newest first. |
nextPageToken | JSON | Optional | |
nextPageToken (anyOf 1) | string | Alternative | Token to fetch the next page of results |
nextPageToken (anyOf 2) | null | Alternative | |
prevPageToken | JSON | Optional | |
prevPageToken (anyOf 1) | string | Alternative | Token to fetch the previous page of results |
prevPageToken (anyOf 2) | null | Alternative | |
tagGroups | array | Required within parent | The tag groups on this page. |
tagGroups[] | Model | Each item | Expand List tag groups — response body — tag Groups item |
Referenced models: List tag groups — response body — tag Groups item
List tag groups — response body — tag Groups item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A tag group: a named set of tags, such as "Clients" or "Contractors". A line entry can carry at most one tag from each group. |
createdAt | JSON | Required within parent | |
createdAt (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
createdAt (allOf 2) | JSON | All variants apply | When the tag group was created. |
id | string | Required within parent | The unique identifier of the tag group. Pass it as `tagGroupId` to getBooksTags to list the group's tags. Format: base58 (max length 22) |
name | string | Required within parent | The tag group's display name. |
ownership | JSON | Required within parent | |
ownership (allOf 1) | string | All variants apply | Known values: platform, instance |
ownership (allOf 2) | JSON | All variants apply | `platform` for a default group shared by every Books instance, which can't be renamed; `instance` for a group that belongs to this Books instance. |
List tags — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One page of a Books instance's tags, newest first. |
nextPageToken | JSON | Optional | |
nextPageToken (anyOf 1) | string | Alternative | Token to fetch the next page of results |
nextPageToken (anyOf 2) | null | Alternative | |
prevPageToken | JSON | Optional | |
prevPageToken (anyOf 1) | string | Alternative | Token to fetch the previous page of results |
prevPageToken (anyOf 2) | null | Alternative | |
tags | array | Required within parent | The tags on this page. |
tags[] | Model | Each item | Expand List tags — response body — tags item |
Referenced models: List tags — response body — tags item
List tags — response body — tags item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A tag: a label in a tag group, such as one client in a "Clients" group. Apply it to a line entry by passing its `id` in the line entry's `tagIds`; a line entry can carry at most one tag from each group. |
enabled | boolean | Required within parent | Whether the tag is enabled. Disabled tags are hidden from lists unless `includeDisabled` is true. |
id | string | Required within parent | The unique identifier of the tag, to pass in `tagIds`. Format: base58 (max length 22) |
name | string | Required within parent | The tag's display name. |
tagGroupId | string | Required within parent | The identifier of the tag group the tag belongs to. Format: base58 (max length 22) |
tagGroupName | string | Required within parent | The display name of the tag group the tag belongs to. |
List the Books instances you can act on — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response listing a page of the Books instances the token can act on. |
instances | array | Required within parent | The Books instances on this page, sorted by company name. |
instances[] | Model | Each item | Expand List the Books instances you can act on — response body — instances item |
nextPageToken | JSON | Optional | |
nextPageToken (anyOf 1) | string | Alternative | Pass as `pageToken` to fetch the next page, or null on the last page. |
nextPageToken (anyOf 2) | null | Alternative |
Referenced models: List the Books instances you can act on — response body — instances item
List the Books instances you can act on — response body — instances item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A Books instance, i.e. one organization's books, that the token can act on. |
booksId | JSON | Required within parent | |
booksId (allOf 1) | string | All variants apply | Format: uuid |
booksId (allOf 2) | JSON | All variants apply | The Books instance's ID. Pass it as `booksId` to the other Books operations to act on this instance. |
callsign | string | Required within parent | The callsign, a short unique handle, of the organization the Books instance belongs to. |
companyName | string | Required within parent | The name of the organization the Books instance belongs to. |
organizationId | JSON | Required within parent | |
organizationId (allOf 1) | string | All variants apply | Format: uuid |
organizationId (allOf 2) | JSON | All variants apply | The ID of the organization the Books instance belongs to. |
relationship | JSON | Required within parent | |
relationship (allOf 1) | string | All variants apply | Known values: self, client |
relationship (allOf 2) | JSON | All variants apply | Whether the instance belongs to the token's own organization (`self`) or to one of its clients (`client`). |
List the live chart of accounts — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response containing a paginated list of ledgers in the organization's live chart of accounts. |
ledgers | array | Required within parent | The ledgers on this page. Use each ledger's @parentId@ to reconstruct hierarchy. |
ledgers[] | Model | Each item | Expand List the live chart of accounts — response body — ledgers item |
nextPageToken | JSON | Optional | |
nextPageToken (anyOf 1) | string | Alternative | Token to fetch the next page of results |
nextPageToken (anyOf 2) | null | Alternative | |
prevPageToken | JSON | Optional | |
prevPageToken (anyOf 1) | string | Alternative | Token to fetch the previous page of results |
prevPageToken (anyOf 2) | null | Alternative |
Referenced models: List the live chart of accounts — response body — ledgers item
List the live chart of accounts — response body — ledgers item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A general ledger in an organization's live chart of accounts. |
debitCredit | JSON | Required within parent | |
debitCredit (allOf 1) | string | All variants apply | Known values: debit, credit |
debitCredit (allOf 2) | JSON | All variants apply | Whether the ledger has a natural debit or credit balance. |
deletable | boolean | Required within parent | Whether the ledger can be deleted now. A ledger can't be deleted if it is required, has line entries, is linked to a bank or card account, or has an integration (invoicing, commerce, or a linked Plaid account) mapped to it. `deleteBlockedReason` says which. |
deleteBlockedReason | JSON | Optional | |
deleteBlockedReason (anyOf 1) | JSON | Alternative | |
deleteBlockedReason (anyOf 1) (allOf 1) | string | All variants apply | Known values: required, hasActivity, linkedSource, integrationMapped |
deleteBlockedReason (anyOf 1) (allOf 2) | JSON | All variants apply | Why the ledger can't be deleted. Absent when `deletable` is true. When several reasons apply, only one is given: `required` first, then `linkedSource` for a ledger fed by a Mercury account, since neither can be fixed. Fixing any other reason may reveal another. |
deleteBlockedReason (anyOf 2) | null | Alternative | |
editable | boolean | Required within parent | Whether line entries can be manually added to or removed from the ledger, for example by categorizing a transaction to it. False for ledgers whose activity a system controls, such as Mercury bank and card account ledgers and the accounts receivable and accounts payable required ledgers. |
financialAccountType | JSON | Optional | |
financialAccountType (anyOf 1) | JSON | Alternative | |
financialAccountType (anyOf 1) (allOf 1) | string | All variants apply | Known values: bankAccount, creditCard, payments, payroll, loan, prepaidCard, accountsReceivable, accountsPayable, investment, treasury |
financialAccountType (anyOf 1) (allOf 2) | JSON | All variants apply | The real-world financial account represented by this ledger, if any. |
financialAccountType (anyOf 2) | null | Alternative | |
id | string | Required within parent | The stable identifier for the ledger. Format: base58 (max length 22) |
isRequired | boolean | Required within parent | Whether the ledger is a required ledger, which the accounting system needs to operate. Required ledgers can't be deleted, and only their `name`, `sortCode`, and `parentId` can be changed. |
name | string | Required within parent | The ledger's display name. Format: size < 256 |
openingBalance | JSON | Optional | |
openingBalance (anyOf 1) | JSON | Alternative | |
openingBalance (anyOf 1) (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
openingBalance (anyOf 1) (allOf 2) | JSON | All variants apply | The ledger's opening balance in its natural direction (`debitCredit`): positive is a balance on the ledger's natural side, negative on the opposite side. Absent when the ledger has no opening balance. Returned by getBooksLedgers and getBooksLedger only; absent from the ledgers in create and update results. Set or clear it with setBooksLedgerOpeningBalances. |
openingBalance (anyOf 2) | null | Alternative | |
parentId | JSON | Optional | |
parentId (anyOf 1) | string | Alternative | The identifier of the ledger's parent, if it is nested. Format: base58 (max length 22) |
parentId (anyOf 2) | null | Alternative | |
requiredLedgerPurpose | JSON | Optional | |
requiredLedgerPurpose (anyOf 1) | JSON | Alternative | |
requiredLedgerPurpose (anyOf 1) (allOf 1) | Model | All variants apply | Expand Retrieve ledger balances over a date range — response body — ledger Balances item special Type string string |
requiredLedgerPurpose (anyOf 1) (allOf 2) | JSON | All variants apply | The system function a required ledger fulfills, such as holding uncategorized inflows. Absent for ledgers that aren't required. |
requiredLedgerPurpose (anyOf 2) | null | Alternative | |
sortCode | string | Required within parent | The ledger/account number used for chart ordering and template mapping. Format: size < 21 |
subType | JSON | Required within parent | |
subType (allOf 1) | string | All variants apply | Known values: currentAssets, nonCurrentAssets, transfersBetweenAccounts, uncategorizedAssets, currentLiabilities, nonCurrentLiabilities, equity, operatingRevenues, otherIncome, costOfGoodsSold, operatingExpenses, otherExpenses, retainedEarnings |
subType (allOf 2) | JSON | All variants apply | The ledger's more specific accounting classification. It must belong to the ledger's `type`: `asset`: `currentAssets`, `nonCurrentAssets`, `transfersBetweenAccounts`, `uncategorizedAssets`; `liability`: `currentLiabilities`, `nonCurrentLiabilities`; `equity`: `equity`, `retainedEarnings`; `revenue`: `operatingRevenues`, `otherIncome`; `expense`: `costOfGoodsSold`, `operatingExpenses`, `otherExpenses`. A child ledger has the same type and sub-type as its parent. |
type | JSON | Required within parent | |
type (allOf 1) | string | All variants apply | Known values: asset, liability, equity, revenue, expense |
type (allOf 2) | JSON | All variants apply | The ledger's top-level accounting classification. A sub-ledger has the same type as the root of its hierarchy. |
Referenced models: Create a product — response body — unit Price value, Retrieve ledger balances over a date range — response body — ledger Balances item special Type string string
Match a transaction to bills or invoices — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Request to match a line entry to bills or to invoices. Additional keys: not allowed |
adjustments | JSON | Optional | |
adjustments (anyOf 1) | array | Alternative | Adjustments on the line entry itself rather than on a bill or invoice, such as closing out an overpayment, at most 100. |
adjustments (anyOf 1)[] | Model | Each item | Expand Match a transaction to bills or invoices — request body — body adjustments array item |
adjustments (anyOf 2) | null | Alternative | |
applications | array | Required within parent | The bills, or the invoices, the line entry pays, from 1 to 100, each at most once. Minimum items: 1 |
applications[] | Model | Each item | Expand Match a transaction to bills or invoices — request body — body applications item |
Referenced models: Match a transaction to bills or invoices — request body — body applications item, Match a transaction to bills or invoices — request body — body adjustments array item
Match a transaction to bills or invoices — request body — body adjustments array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An adjustment booked with a payment application, such as a bank fee or a discount that closes the rest of a bill or invoice, or an overpayment left on the line entry. Additional keys: not allowed |
amount | JSON | Required within parent | |
amount (allOf 1) | number | All variants apply | A dollar amount Format: double |
amount (allOf 2) | JSON | All variants apply | The positive amount of the adjustment: a number of dollars with at most two decimal places. |
ledgerId | string | Required within parent | The ledger (general ledger account) the adjustment posts to. It must be in the Books instance and editable. Format: base58 (max length 22) |
Match a transaction to bills or invoices — request body — body applications item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The part of the line entry's amount applied to one bill or invoice. Additional keys: not allowed |
adjustments | JSON | Optional | |
adjustments (anyOf 1) | array | Alternative | Adjustments booked against this bill or invoice, at most 100. |
adjustments (anyOf 1)[] | Model | Each item | Expand Match a transaction to bills or invoices — request body — body adjustments array item |
adjustments (anyOf 2) | null | Alternative | |
amount | JSON | Required within parent | |
amount (allOf 1) | number | All variants apply | A dollar amount Format: double |
amount (allOf 2) | JSON | All variants apply | The positive amount applied to the bill or invoice: a number of dollars with at most two decimal places. |
billId | JSON | Optional | |
billId (anyOf 1) | string | Alternative | The bill to pay. Give exactly one of `billId` and `invoiceId`, and the same one in every application. Format: base58 (max length 22) |
billId (anyOf 2) | null | Alternative | |
invoiceId | JSON | Optional | |
invoiceId (anyOf 1) | string | Alternative | The invoice paid. Give exactly one of `billId` and `invoiceId`, and the same one in every application. Format: base58 (max length 22) |
invoiceId (anyOf 2) | null | Alternative |
Referenced models: Match a transaction to bills or invoices — request body — body adjustments array item
Match a transaction to bills or invoices — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The result of matching a line entry to bills or invoices, or of unmatching it. Both operations return this shape. |
bills | array | Required within parent | The bills the request matched or unmatched. Empty when it matched or unmatched invoices. |
bills[] | Model | Each item | Expand Match a transaction to bills or invoices — response body — bills item |
invoices | array | Required within parent | The invoices the request matched or unmatched. Empty when it matched or unmatched bills. |
invoices[] | Model | Each item | Expand Match a transaction to bills or invoices — response body — bills item |
lineEntry | JSON | Required within parent | |
lineEntry (allOf 1) | Model | All variants apply | Expand Match a transaction to bills or invoices — response body — line Entry The line entry after the match or unmatch |
lineEntry (allOf 2) | JSON | All variants apply | The line entry. |
Referenced models: Match a transaction to bills or invoices — response body — bills item, Match a transaction to bills or invoices — response body — line Entry The line entry after the match or unmatch
Match a transaction to bills or invoices — response body — bills item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A bill or invoice after the match or unmatch. |
amountAdjusted | JSON | Required within parent | |
amountAdjusted (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amountAdjusted (allOf 2) | JSON | All variants apply | The total of the adjustments booked against it, in dollars. |
amountOutstanding | JSON | Required within parent | |
amountOutstanding (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amountOutstanding (allOf 2) | JSON | All variants apply | The amount still owed, in dollars. |
amountPaid | JSON | Required within parent | |
amountPaid (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amountPaid (allOf 2) | JSON | All variants apply | The total of the payments applied to it, in dollars. |
displayStatus | JSON | Required within parent | |
displayStatus (allOf 1) | string | All variants apply | Known values: open, paid, draft, cancelled, overdue, partiallyPaid, processing |
displayStatus (allOf 2) | JSON | All variants apply | The status shown in Mercury, which also tells overdue and partially paid ones apart. |
id | string | Required within parent | The ID of the bill or invoice. Format: base58 (max length 22) |
status | JSON | Required within parent | |
status (allOf 1) | string | All variants apply | Known values: open, paid, draft, cancelled, processing |
status (allOf 2) | JSON | All variants apply | The status of the bill or invoice. |
Referenced models: Create a product — response body — unit Price value
Match a transaction to bills or invoices — response body — line Entry The line entry after the match or unmatch
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The line entry after the match or unmatch. |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The unsigned amount of the line entry, in dollars. |
amountAdjusted | JSON | Required within parent | |
amountAdjusted (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amountAdjusted (allOf 2) | JSON | All variants apply | How much of the line entry is booked as line-level adjustments. 0 after an unmatch. |
amountApplied | JSON | Required within parent | |
amountApplied (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amountApplied (allOf 2) | JSON | All variants apply | How much of the line entry is applied to bills or invoices. 0 after an unmatch. |
id | string | Required within parent | The ID of the line entry, the one in the request path. Format: base58 (max length 22) |
journalEntryId | string | Required within parent | The ID of the line entry's journal entry. Format: base58 (max length 22) |
transactionId | JSON | Optional | |
transactionId (anyOf 1) | string | Alternative | The ID of the transaction the line entry belongs to, as `getBooksTransaction` takes it. Omitted when the line entry isn't a transaction's. |
transactionId (anyOf 2) | null | Alternative |
Referenced models: Create a product — response body — unit Price value
Retrieve a balance sheet — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An income statement or balance sheet broken down into columns. |
columns | array | Required within parent | The report's columns, in chronological order. |
columns[] | Model | Each item | Expand Retrieve a balance sheet — response body — columns item |
retainedEarnings | JSON | Optional | |
retainedEarnings (anyOf 1) | JSON | Alternative | |
retainedEarnings (anyOf 1) (allOf 1) | Model | All variants apply | Expand Retrieve a balance sheet — response body — retained Earnings calculated Current Year Earnings, calculated Retained Earnings calculated Current Year Earnings, calculated Retained Earnings |
retainedEarnings (anyOf 1) (allOf 2) | JSON | All variants apply | System-calculated equity amounts. Present on balance sheets; omitted on income statements. |
retainedEarnings (anyOf 2) | null | Alternative | |
rows | array | Required within parent | The report's top-level rows. |
rows[] | Model | Each item | Expand Retrieve a balance sheet — response body — rows item |
Referenced models: Retrieve a balance sheet — response body — columns item, Retrieve a balance sheet — response body — rows item, Retrieve a balance sheet — response body — retained Earnings calculated Current Year Earnings, calculated Retained Earnings calculated Current Year Earnings, calculated Retained Earnings
Retrieve a balance sheet — response body — columns item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A report column. The amount lists on each row are ordered to match the report's columns. |
endDate | JSON | Optional | |
endDate (anyOf 1) | JSON | Alternative | |
endDate (anyOf 1) (allOf 1) | string | All variants apply | Format: date |
endDate (anyOf 1) (allOf 2) | JSON | All variants apply | The last day (inclusive) of the column that falls between the Books entries start date and today. Omitted, along with @startDate@, when no day of the column falls in that window. |
endDate (anyOf 2) | null | Alternative | |
isPartial | boolean | Required within parent | Whether @startDate@ and @endDate@ cover fewer days than the column's label, because the label extends before the Books entries start date or after today. Always true when @startDate@ and @endDate@ are omitted. |
label | string | Required within parent | The column's name: @yyyy@ (yearly), @yyyy-Qn@ (quarterly), @yyyy-MM@ (monthly), @yyyy-MM-dd@ (daily), or @yyyy-MM-dd - yyyy-MM-dd@ when the report is not broken down by period. |
startDate | JSON | Optional | |
startDate (anyOf 1) | JSON | Alternative | |
startDate (anyOf 1) (allOf 1) | string | All variants apply | Format: date |
startDate (anyOf 1) (allOf 2) | JSON | All variants apply | The first day (inclusive) of the column that falls between the Books entries start date and today. Omitted, along with @endDate@, when no day of the column falls in that window. |
startDate (anyOf 2) | null | Alternative |
Retrieve a balance sheet — response body — retained Earnings calculated Current Year Earnings, calculated Retained Earnings calculated Current Year Earnings, calculated Retained Earnings
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | System-calculated equity amounts that are added to the Retained Earnings and Current Year Earnings ledger rows. |
calculatedCurrentYearEarnings | array | Required within parent | For each column, current-year revenues minus current-year expenses, before journal entries posted to the Current Year Earnings ledger. |
calculatedCurrentYearEarnings[] | Model | Each item | Expand Create a product — response body — unit Price value |
calculatedRetainedEarnings | array | Required within parent | For each column, prior-year revenues minus prior-year expenses, before journal entries posted to the Retained Earnings ledger. |
calculatedRetainedEarnings[] | Model | Each item | Expand Create a product — response body — unit Price value |
Referenced models: Create a product — response body — unit Price value
Retrieve a balance sheet — response body — rows item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A row in an income statement or balance sheet. |
amounts | array | Required within parent | The row's own amount for each column, excluding its children. |
amounts[] | Model | Each item | Expand Create a product — response body — unit Price value |
children | array | Required within parent | The rows nested under this row. |
children[] | Model | Each item | Expand Retrieve a balance sheet — response body — rows item |
debitCredit | JSON | Required within parent | |
debitCredit (allOf 1) | string | All variants apply | Known values: debit, credit |
debitCredit (allOf 2) | JSON | All variants apply | Whether the row's amounts have a natural debit or credit balance. |
ledgerId | JSON | Optional | |
ledgerId (anyOf 1) | string | Alternative | The ledger this row represents. Omitted unless @rowKind@ is @ledger@. Format: base58 (max length 22) |
ledgerId (anyOf 2) | null | Alternative | |
name | string | Required within parent | The ledger name, the summary heading, or the name of the calculated metric. |
parentId | JSON | Optional | |
parentId (anyOf 1) | string | Alternative | The parent ledger of this row's ledger, if it is nested. Format: base58 (max length 22) |
parentId (anyOf 2) | null | Alternative | |
rowKind | JSON | Required within parent | |
rowKind (allOf 1) | string | All variants apply | Known values: ledger, summary, computed |
rowKind (allOf 2) | JSON | All variants apply | What the row represents. |
sortCode | JSON | Optional | |
sortCode (anyOf 1) | string | Alternative | The ledger/account number used for chart ordering. Omitted unless @rowKind@ is @ledger@. |
sortCode (anyOf 2) | null | Alternative | |
subType | JSON | Optional | |
subType (anyOf 1) | JSON | Alternative | |
subType (anyOf 1) (allOf 1) | string | All variants apply | Known values: currentAssets, nonCurrentAssets, transfersBetweenAccounts, uncategorizedAssets, currentLiabilities, nonCurrentLiabilities, equity, operatingRevenues, otherIncome, costOfGoodsSold, operatingExpenses, otherExpenses, retainedEarnings |
subType (anyOf 1) (allOf 2) | JSON | All variants apply | The ledger's more specific accounting classification. Omitted unless @rowKind@ is @ledger@. |
subType (anyOf 2) | null | Alternative | |
totalAmounts | array | Required within parent | The row's amount for each column, including all of its children. |
totalAmounts[] | Model | Each item | Expand Create a product — response body — unit Price value |
type | JSON | Optional | |
type (anyOf 1) | JSON | Alternative | |
type (anyOf 1) (allOf 1) | string | All variants apply | Known values: asset, liability, equity, revenue, expense |
type (anyOf 1) (allOf 2) | JSON | All variants apply | The top-level accounting classification of the row's ledger or summary grouping. Omitted on @computed@ rows. |
type (anyOf 2) | null | Alternative |
Referenced models: Create a product — response body — unit Price value, Retrieve a balance sheet — response body — rows item
Retrieve a bill (accounts payable) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A single bill (accounts payable), as returned by the retrieve-one endpoint. The @bill@ is the same item shape as an element of @GET /bills@. |
bill | JSON | Required within parent | |
bill (allOf 1) | Model | All variants apply | Expand Edit a bill (accounts payable) — response body |
bill (allOf 2) | JSON | All variants apply | The requested bill. |
Referenced models: Edit a bill (accounts payable) — response body
Retrieve a cash flow report — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A cash flow report broken down into columns. |
columns | array | Required within parent | The report's columns, in chronological order. |
columns[] | Model | Each item | Expand Retrieve a balance sheet — response body — columns item |
endingBalances | array | Required within parent | The top-level cash ledgers' balances at the end of each column. |
endingBalances[] | Model | Each item | Expand Retrieve a cash flow report — response body — ending Balances item |
endingCashBalances | array | Required within parent | For each column, the total debit balance of all cash ledgers at the end of the column. |
endingCashBalances[] | Model | Each item | Expand Create a product — response body — unit Price value |
ledgers | array | Required within parent | The top-level ledgers that cash moved through. |
ledgers[] | Model | Each item | Expand Retrieve a cash flow report — response body — ledgers item |
startingBalances | array | Required within parent | The top-level cash ledgers' balances at the start of each column. |
startingBalances[] | Model | Each item | Expand Retrieve a cash flow report — response body — ending Balances item |
startingCashBalances | array | Required within parent | For each column, the total debit balance of all cash ledgers at the start of the column. |
startingCashBalances[] | Model | Each item | Expand Create a product — response body — unit Price value |
Referenced models: Create a product — response body — unit Price value, Retrieve a balance sheet — response body — columns item, Retrieve a cash flow report — response body — ending Balances item, Retrieve a cash flow report — response body — ledgers item
Retrieve a cash flow report — response body — ending Balances item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The cash balance of a cash ledger at the start or end of each column of a cash flow report. |
balances | array | Required within parent | For each column, the ledger's own debit balance, excluding its children. |
balances[] | Model | Each item | Expand Create a product — response body — unit Price value |
children | array | Required within parent | The ledgers nested under this ledger. |
children[] | Model | Each item | Expand Retrieve a cash flow report — response body — ending Balances item |
ledgerId | string | Required within parent | The cash ledger this row represents. Format: base58 (max length 22) |
name | string | Required within parent | The ledger's display name. |
parentId | JSON | Optional | |
parentId (anyOf 1) | string | Alternative | The parent ledger, if this ledger is nested. Format: base58 (max length 22) |
parentId (anyOf 2) | null | Alternative | |
sortCode | string | Required within parent | The ledger/account number used for chart ordering. |
totalBalances | array | Required within parent | For each column, the debit balance of the ledger and all of its children. |
totalBalances[] | Model | Each item | Expand Create a product — response body — unit Price value |
Referenced models: Create a product — response body — unit Price value, Retrieve a cash flow report — response body — ending Balances item
Retrieve a cash flow report — response body — ledgers item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Net cash movement through a ledger in each column of a cash flow report. |
children | array | Required within parent | The ledgers nested under this ledger. |
children[] | Model | Each item | Expand Retrieve a cash flow report — response body — ledgers item |
ledgerId | string | Required within parent | The ledger this row represents. Format: base58 (max length 22) |
name | string | Required within parent | The ledger's display name. |
netCashFlows | array | Required within parent | For each column, the sum of the ledger's own cash line entries, excluding its children. |
netCashFlows[] | Model | Each item | Expand Create a product — response body — unit Price value |
parentId | JSON | Optional | |
parentId (anyOf 1) | string | Alternative | The parent ledger, if this ledger is nested. Format: base58 (max length 22) |
parentId (anyOf 2) | null | Alternative | |
totalNetCashFlows | array | Required within parent | For each column, the sum of the cash line entries in the ledger and all of its children. |
totalNetCashFlows[] | Model | Each item | Expand Create a product — response body — unit Price value |
Referenced models: Create a product — response body — unit Price value, Retrieve a cash flow report — response body — ledgers item
Retrieve a journal entry — request body — query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
booksId | string | Optional | The Books instance to act on. Must be the token organization's own instance, which it defaults to. Format: uuid |
expand | string | Optional | Comma-separated list of expandable paths. One of: lineEntries, lineEntriesTransactions, lineEntriesLedger, lineEntriesOpposingLedgerIds, lineEntriesPaymentApplications, lineEntriesLinePaymentApplications, accrualSource, transfer, autocatResult |
Retrieve a journal entry — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response containing a single journal entry. |
journalEntry | JSON | Required within parent | |
journalEntry (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journal Entries item |
journalEntry (allOf 2) | JSON | All variants apply | The requested journal entry |
Referenced models: List journal entries — response body — journal Entries item
Retrieve a ledger (general ledger account) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response containing a single ledger. |
ledger | JSON | Required within parent | |
ledger (allOf 1) | Model | All variants apply | Expand List the live chart of accounts — response body — ledgers item |
ledger (allOf 2) | JSON | All variants apply | The requested ledger |
Referenced models: List the live chart of accounts — response body — ledgers item
Retrieve a transaction — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response containing a single transaction. |
transaction | JSON | Required within parent | |
transaction (allOf 1) | Model | All variants apply | Expand List a source account's transactions — response body — transactions item |
transaction (allOf 2) | JSON | All variants apply | The requested transaction |
Referenced models: List a source account's transactions — response body — transactions item
Retrieve an invoice (accounts receivable) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A single invoice (accounts receivable), as returned by the retrieve-one endpoint. The @invoice@ is the same item shape as an element of @GET /invoices@. |
invoice | JSON | Required within parent | |
invoice (allOf 1) | Model | All variants apply | Expand Edit an invoice (accounts receivable) — response body — amount Remaining, customer, display Status, due Date, effective Date, gross Amount, id, lines, notes, payment Applications, reference Number, status |
invoice (allOf 2) | JSON | All variants apply | The requested invoice. |
Retrieve ledger balances over a date range — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response containing the balances of the requested ledgers. |
ledgerBalances | array | Required within parent | One entry per distinct requested ledger, in the order the ledgers were requested. |
ledgerBalances[] | Model | Each item | Expand Retrieve ledger balances over a date range — response body — ledger Balances item |
Referenced models: Retrieve ledger balances over a date range — response body — ledger Balances item
Retrieve ledger balances over a date range — response body — ledger Balances item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One ledger's balances over the requested date range. Amounts are signed by the ledger's natural side: a positive amount is an increase on the side named by `debitCredit` (a debit ledger such as an asset grows with debits, a credit ledger such as a liability grows with credits), and a negative amount is a decrease. Balances are not flipped to a common debit-positive convention. Balances cover only the ledger's own line entries; they do not roll up the balances of its child ledgers. To get a parent's total, request its children as well and sum them, using `parentId` from the list ledgers endpoint. Opening-balance entries count. The Retained Earnings and Current Year Earnings system ledgers also include the calculated earnings, so their balances match the balance sheet. A ledger with no activity reports zeros. |
closingBalance | JSON | Required within parent | |
closingBalance (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
closingBalance (allOf 2) | JSON | All variants apply | The balance at the end of `endDate`. |
debitCredit | JSON | Required within parent | |
debitCredit (allOf 1) | string | All variants apply | Known values: debit, credit |
debitCredit (allOf 2) | JSON | All variants apply | Whether the ledger has a natural debit or credit balance, which is the side that positive amounts increase. |
ledgerId | string | Required within parent | The ledger these balances belong to. Format: base58 (max length 22) |
name | string | Required within parent | The ledger's display name. |
netActivity | JSON | Required within parent | |
netActivity (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
netActivity (allOf 2) | JSON | All variants apply | The net change over the range: all of the ledger's line entries from `startDate` through `endDate`. |
openingBalance | JSON | Required within parent | |
openingBalance (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
openingBalance (allOf 2) | JSON | All variants apply | The balance at the end of the day before `startDate`. |
specialType | JSON | Optional | |
specialType (anyOf 1) | JSON | Alternative | |
specialType (anyOf 1) (allOf 1) | Model | All variants apply | Expand Retrieve ledger balances over a date range — response body — ledger Balances item special Type string string |
specialType (anyOf 1) (allOf 2) | JSON | All variants apply | The system function of a required ledger, such as `retained_earnings`, if it has one. |
specialType (anyOf 2) | null | Alternative | |
subType | JSON | Required within parent | |
subType (allOf 1) | string | All variants apply | Known values: currentAssets, nonCurrentAssets, transfersBetweenAccounts, uncategorizedAssets, currentLiabilities, nonCurrentLiabilities, equity, operatingRevenues, otherIncome, costOfGoodsSold, operatingExpenses, otherExpenses, retainedEarnings |
subType (allOf 2) | JSON | All variants apply | The ledger's more specific accounting classification. |
type | JSON | Required within parent | |
type (allOf 1) | string | All variants apply | Known values: asset, liability, equity, revenue, expense |
type (allOf 2) | JSON | All variants apply | The ledger's top-level accounting classification. |
Referenced models: Create a product — response body — unit Price value, Retrieve ledger balances over a date range — response body — ledger Balances item special Type string string
Retrieve ledger balances over a date range — response body — ledger Balances item special Type string string
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | string | Root | Known values: uncatInflow, uncatOutflow, accountTransfers, openingBalances, accountsReceivable, accountsPayable, wagesExpense, bonusExpense, commissionsExpense, contractorExpense, employeeReimbursements, severanceExpense, payrollTaxExpense, employerBenefitsExpense, healthInsuranceExpense, wagesPayable, payrollTaxPayable, employeeBenefitLiabilities, payrollLiabilities, payrollAdjustmentsClearing, retainedEarnings, currentYearEarnings, benefitsExpense, donationsExpense, benefitsPayable, payrollTaxAccruals, stockExerciseClearing, payrollClearing |
Set or clear ledger opening balances — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Request to set or clear the opening balances of ledgers. Additional keys: not allowed |
openingBalances | array | Required within parent | The opening balances to set, from 1 to 100 ('maxBooksAPIBulkWriteItems'), processed in order. Each `ledgerId` may appear at most once. Minimum items: 1 |
openingBalances[] | Model | Each item | Expand Set or clear ledger opening balances — request body — body opening Balances item |
Referenced models: Set or clear ledger opening balances — request body — body opening Balances item
Set or clear ledger opening balances — request body — body opening Balances item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The opening balance to set on one ledger. Additional keys: not allowed |
balance | JSON | Required within parent | |
balance (allOf 1) | number | All variants apply | A dollar amount Format: double |
balance (allOf 2) | JSON | All variants apply | The ledger's opening balance in its natural direction: positive increases the ledger on its natural side (debit for debit-natural ledgers, credit for credit-natural ledgers), negative puts it on the opposite side. `0` clears the opening balance. |
ledgerId | string | Required within parent | The ID of the ledger whose opening balance to set. Format: base58 (max length 22) |
Set or clear ledger opening balances — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One result per requested opening balance, in request order. |
failedCount | JSON | Required within parent | |
failedCount (anyOf 1) | integer | Alternative | How many items in `results` failed, each with an `error`. Zero exactly when every item succeeded. `succeededCount` plus `failedCount` always equals the number of `results`. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
failedCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
results | array | Required within parent | One result per requested opening balance, in request order. A failed item does not fail the others. |
results[] | Model | Each item | Expand Set or clear ledger opening balances — response body — results item |
succeededCount | JSON | Required within parent | |
succeededCount (anyOf 1) | integer | Alternative | How many items in `results` succeeded. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
succeededCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Set or clear ledger opening balances — response body — results item
Set or clear ledger opening balances — response body — results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The outcome of setting one requested opening balance: `error` is set exactly when `success` is false. |
error | JSON | Optional | |
error (anyOf 1) | JSON | Alternative | |
error (anyOf 1) (allOf 1) | Model | All variants apply | Expand Set or clear ledger opening balances — response body — results item error code, message code, message |
error (anyOf 1) (allOf 2) | JSON | All variants apply | Why the opening balance was not set, when it wasn't. |
error (anyOf 2) | null | Alternative | |
ledgerId | string | Required within parent | The ledger the requested opening balance was for. Format: base58 (max length 22) |
success | boolean | Required within parent | Whether the opening balance was set (or cleared). |
Referenced models: Set or clear ledger opening balances — response body — results item error code, message code, message
Set or clear ledger opening balances — response body — results item error code, message code, message
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Why one ledger in a bulk create, update, or delete failed. A failed item never fails the whole request; the other items still succeed or fail on their own. |
code | JSON | Required within parent | |
code (allOf 1) | string | All variants apply | Known values: invalidLedger, missingParameters, duplicateName, duplicateSortCode, invalidLedgerType, invalidLedgerParent, invalidLedgerReportCashFlow, deletingRequiredLedger, deletingLedgerWithActivity, deletingLinkedLedger, deletingParentLedger, modifyingRequiredLedger, integrationMapped, invalidUnappliedPaymentsLedger, deletingMappedLedger, modifyingMappedLedger, mercuryAccountLedger, unknownError |
code (allOf 2) | JSON | All variants apply | Stable code for the failure. |
message | string | Required within parent | What went wrong and how to fix it, suitable to show to a user. |
Update ledgers (general ledger accounts) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Request to update general ledgers. Additional keys: not allowed |
ledgers | array | Required within parent | The ledger updates to apply, from 1 to 100 ('maxBooksAPILedgerWrites'), processed in order. Each `ledgerId` may appear at most once. |
ledgers[] | Model | Each item | Expand Update ledgers (general ledger accounts) — request body — body ledgers item |
Referenced models: Update ledgers (general ledger accounts) — request body — body ledgers item
Update ledgers (general ledger accounts) — request body — body ledgers item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Updates to apply to an existing general ledger. Omitted fields are left unchanged. Additional keys: not allowed |
clearFields | JSON | Optional | |
clearFields (anyOf 1) | array | Alternative | Fields to clear, such as the parent ledger |
clearFields (anyOf 1)[] | string | Each item | One of: parentId |
clearFields (anyOf 2) | null | Alternative | |
debitCredit | JSON | Optional | |
debitCredit (anyOf 1) | JSON | Alternative | |
debitCredit (anyOf 1) (allOf 1) | string | All variants apply | One of: debit, credit |
debitCredit (anyOf 1) (allOf 2) | JSON | All variants apply | Updated debit or credit nature |
debitCredit (anyOf 2) | null | Alternative | |
ledgerId | string | Required within parent | The ID of the ledger to update Format: base58 (max length 22) |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | Updated ledger name Format: size < 256 |
name (anyOf 2) | null | Alternative | |
parentId | JSON | Optional | |
parentId (anyOf 1) | string | Alternative | Updated parent ledger Format: base58 (max length 22) |
parentId (anyOf 2) | null | Alternative | |
sortCode | JSON | Optional | |
sortCode (anyOf 1) | string | Alternative | Updated numeric sort code Format: matches ^[0-9]+$, size < 21 |
sortCode (anyOf 2) | null | Alternative | |
subType | JSON | Optional | |
subType (anyOf 1) | JSON | Alternative | |
subType (anyOf 1) (allOf 1) | string | All variants apply | One of: currentAssets, nonCurrentAssets, transfersBetweenAccounts, uncategorizedAssets, currentLiabilities, nonCurrentLiabilities, equity, operatingRevenues, otherIncome, costOfGoodsSold, operatingExpenses, otherExpenses, retainedEarnings |
subType (anyOf 1) (allOf 2) | JSON | All variants apply | Updated ledger sub-type |
subType (anyOf 2) | null | Alternative | |
type | JSON | Optional | |
type (anyOf 1) | JSON | Alternative | |
type (anyOf 1) (allOf 1) | string | All variants apply | One of: asset, liability, equity, revenue, expense |
type (anyOf 1) (allOf 2) | JSON | All variants apply | Updated ledger type |
type (anyOf 2) | null | Alternative |
Update ledgers (general ledger accounts) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One result per requested ledger update, in request order. |
failedCount | JSON | Required within parent | |
failedCount (anyOf 1) | integer | Alternative | How many items in `results` failed, each with an `error`. Zero exactly when every item succeeded. `succeededCount` plus `failedCount` always equals the number of `results`. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
failedCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
results | array | Required within parent | One result per requested ledger update, in request order. A failed item does not fail the others. |
results[] | Model | Each item | Expand Update ledgers (general ledger accounts) — response body — results item |
succeededCount | JSON | Required within parent | |
succeededCount (anyOf 1) | integer | Alternative | How many items in `results` succeeded. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
succeededCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Update ledgers (general ledger accounts) — response body — results item
Update ledgers (general ledger accounts) — response body — results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The outcome of updating one requested ledger: exactly one of `ledger` and `error` is set. |
error | JSON | Optional | |
error (anyOf 1) | JSON | Alternative | |
error (anyOf 1) (allOf 1) | Model | All variants apply | Expand Set or clear ledger opening balances — response body — results item error code, message code, message |
error (anyOf 1) (allOf 2) | JSON | All variants apply | Why the ledger was not updated, when it wasn't. |
error (anyOf 2) | null | Alternative | |
ledger | JSON | Optional | |
ledger (anyOf 1) | JSON | Alternative | |
ledger (anyOf 1) (allOf 1) | Model | All variants apply | Expand List the live chart of accounts — response body — ledgers item |
ledger (anyOf 1) (allOf 2) | JSON | All variants apply | The updated ledger, when it was updated. |
ledger (anyOf 2) | null | Alternative |
Referenced models: List the live chart of accounts — response body — ledgers item, Set or clear ledger opening balances — response body — results item error code, message code, message
Update multiple journal entries — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Request to update multiple journal entries in a single call. Additional keys: not allowed |
updates | array | Required within parent | The individual journal entry updates |
updates[] | Model | Each item | Expand Update multiple journal entries — request body — body updates item |
Referenced models: Update multiple journal entries — request body — body updates item
Update multiple journal entries — request body — body updates item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Request to update a single journal entry. Additional keys: not allowed |
datetime | JSON | Optional | |
datetime (anyOf 1) | JSON | Alternative | |
datetime (anyOf 1) (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
datetime (anyOf 1) (allOf 2) | JSON | All variants apply | Updated date and time |
datetime (anyOf 2) | null | Alternative | |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | Updated description Format: size < 513 |
description (anyOf 2) | null | Alternative | |
journalEntryId | string | Required within parent | The ID of the journal entry to update Format: base58 (max length 22) |
lineEntryChanges | JSON | Optional | |
lineEntryChanges (anyOf 1) | JSON | Alternative | |
lineEntryChanges (anyOf 1) (allOf 1) | Model | All variants apply | Expand Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update |
lineEntryChanges (anyOf 1) (allOf 2) | JSON | All variants apply | Changes to apply to line entries |
lineEntryChanges (anyOf 2) | null | Alternative | |
reviewStatus | JSON | Optional | |
reviewStatus (anyOf 1) | JSON | Alternative | |
reviewStatus (anyOf 1) (allOf 1) | string | All variants apply | One of: unreviewed, reviewed |
reviewStatus (anyOf 1) (allOf 2) | JSON | All variants apply | New review status for the journal entry. Omit to leave the existing review status unchanged. |
reviewStatus (anyOf 2) | null | Alternative |
Referenced models: Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update
Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Line entry changes to apply to a journal entry: create, update, or delete. Additional keys: not allowed |
create | JSON | Optional | |
create (anyOf 1) | array | Alternative | New line entries to add |
create (anyOf 1)[] | Model | Each item | Expand Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update create New line entries to add item |
create (anyOf 2) | null | Alternative | |
delete | JSON | Optional | |
delete (anyOf 1) | array | Alternative | IDs of line entries to remove |
delete (anyOf 1)[] | string | Each item | unique id for a line entry; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
delete (anyOf 2) | null | Alternative | |
update | JSON | Optional | |
update (anyOf 1) | array | Alternative | Existing line entries to modify |
update (anyOf 1)[] | Model | Each item | Expand Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update update Existing line entries to modify item |
update (anyOf 2) | null | Alternative |
Referenced models: Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update create New line entries to add item, Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update update Existing line entries to modify item
Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update create New line entries to add item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A new line entry to create within an existing journal entry. Additional keys: not allowed |
amount | JSON | Required within parent | |
amount (allOf 1) | number | All variants apply | A dollar amount Format: double |
amount (allOf 2) | JSON | All variants apply | The amount for this line entry |
debitCredit | JSON | Required within parent | |
debitCredit (allOf 1) | string | All variants apply | One of: debit, credit |
debitCredit (allOf 2) | JSON | All variants apply | Whether this line entry is a debit or credit |
description | string | Required within parent | Description of the line entry Format: size < 4001 |
ledgerId | string | Required within parent | The ledger this line entry is posted to Format: base58 (max length 22) |
sortOrder | JSON | Optional | |
sortOrder (anyOf 1) | integer | Alternative | Optional position within the journal entry. Omit to append at MAX(sort_order) + 1. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
sortOrder (anyOf 2) | null | Alternative | |
tagIds | JSON | Optional | |
tagIds (anyOf 1) | array | Alternative | Optional tags to associate with this line entry |
tagIds (anyOf 1)[] | string | Each item | unique id for a tag; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
tagIds (anyOf 2) | null | Alternative |
Update multiple journal entries — request body — body updates item line Entry Changes Changes to apply to line entries create, delete, update update Existing line entries to modify item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Updates to apply to an existing line entry. Additional keys: not allowed |
amount | JSON | Optional | |
amount (anyOf 1) | JSON | Alternative | |
amount (anyOf 1) (allOf 1) | number | All variants apply | A dollar amount Format: double |
amount (anyOf 1) (allOf 2) | JSON | All variants apply | Updated amount |
amount (anyOf 2) | null | Alternative | |
debitCredit | JSON | Optional | |
debitCredit (anyOf 1) | JSON | Alternative | |
debitCredit (anyOf 1) (allOf 1) | string | All variants apply | One of: debit, credit |
debitCredit (anyOf 1) (allOf 2) | JSON | All variants apply | Updated debit/credit designation |
debitCredit (anyOf 2) | null | Alternative | |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | Updated description Format: size < 4001 |
description (anyOf 2) | null | Alternative | |
id | string | Required within parent | The ID of the line entry to update Format: base58 (max length 22) |
ledgerId | JSON | Optional | |
ledgerId (anyOf 1) | string | Alternative | Updated ledger Format: base58 (max length 22) |
ledgerId (anyOf 2) | null | Alternative | |
sortOrder | JSON | Optional | |
sortOrder (anyOf 1) | integer | Alternative | Updated position within the journal entry. Omit to leave unchanged. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
sortOrder (anyOf 2) | null | Alternative | |
tagIds | JSON | Optional | |
tagIds (anyOf 1) | array | Alternative | Updated tags |
tagIds (anyOf 1)[] | string | Each item | unique id for a tag; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
tagIds (anyOf 2) | null | Alternative |