Skip to content

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

FieldTypePresenceDescription and constraints
$stringRootKnown 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

FieldTypePresenceDescription and constraints
$objectRootLinks 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.
fromEntryJSONRequired within parent
fromEntry (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyThe 'from' side of the transfer.
toEntryJSONRequired within parent
toEntry (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyThe 'to' side of the transfer.

Referenced models: 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

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

FieldTypePresenceDescription and constraints
$objectRootOne 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.
datetimeJSONRequired within parent
datetime (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
datetime (allOf 2)JSONAll variants applyThis side's Journal Entry datetime.
descriptionstringRequired within parentThis side's Journal Entry description.
Format: size < 513
journalEntryIdstringRequired within parentThe id of this side's Journal Entry.
Format: base58 (max length 22)
lineEntriesarrayRequired within parentThis side's Line Entries (used to derive the amount and source account).
lineEntries[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootAn 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.
amountOutstandingJSONRequired within parent
amountOutstanding (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amountOutstanding (allOf 2)JSONAll variants applyThe amount outstanding
amountPaidJSONRequired within parent
amountPaid (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amountPaid (allOf 2)JSONAll variants applyThe amount of payments made against the accrual source.
billPayInvoiceAttachmentJSONOptional
billPayInvoiceAttachment (anyOf 1)JSONAlternative
billPayInvoiceAttachment (anyOf 1) (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyFor 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)nullAlternative
displayStatusJSONRequired within parent
displayStatus (allOf 1)stringAll variants applyKnown values: open, paid, draft, cancelled, overdue, partiallyPaid, processing
displayStatus (allOf 2)JSONAll variants applyThe display status of the accrual source
dueDateJSONOptional
dueDate (anyOf 1)JSONAlternative
dueDate (anyOf 1) (allOf 1)stringAll variants applyFormat: date
dueDate (anyOf 1) (allOf 2)JSONAll variants applyThe due date of the accrual source (e.g invoice/bill due date)
dueDate (anyOf 2)nullAlternative
effectiveDateJSONRequired within parent
effectiveDate (allOf 1)stringAll variants applyFormat: date
effectiveDate (allOf 2)JSONAll variants applyThe effective date of the accrual source (e.g invoice/bill date)
externalIdJSONOptional
externalId (anyOf 1)stringAlternativeThe external ID of the accrual source, if applicable
externalId (anyOf 2)nullAlternative
externalPartyIdJSONOptional
externalPartyId (anyOf 1)JSONAlternative
externalPartyId (anyOf 1) (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyThe external party ID of the accrual source
externalPartyId (anyOf 2)nullAlternative
filesJSONOptional
files (anyOf 1)arrayAlternativeThe files associated with the accrual source, if any
files (anyOf 1)[]ModelEach itemExpand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll files array item
files (anyOf 2)nullAlternative
grossAmountJSONRequired within parent
grossAmount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
grossAmount (allOf 2)JSONAll variants applyThe gross amount of the accrual source. Total of all lines.
idJSONOptional
id (anyOf 1)stringAlternativeThe 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)nullAlternative
journalEntryIdsarrayRequired within parentThe journal entry IDs generated from the accrual source.
journalEntryIds[]stringEach itemunique id for a journal entry; emitted as base-58, but a base-16 UUID is also accepted
Format: base58 (max length 22)
linesJSONOptional
lines (anyOf 1)arrayAlternativeThe lines that make up the accrual source. At least one line is required.
lines (anyOf 1)[]ModelEach itemExpand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll lines array item
lines (anyOf 2)nullAlternative
needsActionReasonJSONOptional
needsActionReason (anyOf 1)JSONAlternative
needsActionReason (anyOf 1) (allOf 1)stringAll variants applyKnown values: transactionNotInTeal, transactionAmountExceedsInvoiceBalance, transactionAmountDoesNotCoverInvoices, sourceAccountNotMapped, transactionPredatesBooksStartDate, transactionAppliedToOtherInvoices, cardChargeStripeNotConnected, cardChargeStripeSetupPending
needsActionReason (anyOf 1) (allOf 2)JSONAll variants applyPresent 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)nullAlternative
notesJSONOptional
notes (anyOf 1)stringAlternativeOptional notes or memo for the accrual source
notes (anyOf 2)nullAlternative
paymentApplicationsJSONOptional
paymentApplications (anyOf 1)arrayAlternativePayments applied to the accrual source
paymentApplications (anyOf 1)[]ModelEach itemExpand 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)nullAlternative
referenceNumberJSONOptional
referenceNumber (anyOf 1)stringAlternativeThe reference number of the accrual source
referenceNumber (anyOf 2)nullAlternative
statusJSONRequired within parent
status (allOf 1)stringAll variants applyKnown values: open, paid, draft, cancelled, processing
status (allOf 2)JSONAll variants applyThe status of the accrual source
typestringRequired within parentThe type of the accrual source
Known values: invoice, bill, payroll
unappliedPaymentsJSONOptional
unappliedPayments (anyOf 1)arrayAlternativePayments Mercury recorded against this accrual source that have not
reached Books, each with the reason it hasn't.
Minimum items: 1
unappliedPayments (anyOf 1)[]ModelEach itemExpand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll unapplied Payments array item
unappliedPayments (anyOf 2)nullAlternative

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

FieldTypePresenceDescription and constraints
$objectRootThe 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.
downloadUrlstringRequired within parentA presigned URL for downloading the attachment (valid for 1 hour).
fileNamestringRequired within parentThe filename of the attachment.
idstringRequired within parentOpaque 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

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternative
$ (anyOf 1).contentsstringRequired within parentID for this books counterparty
Format: uuid
$ (anyOf 1).tagstringRequired within parentKnown values: counterpartyId
$ (anyOf 2)objectAlternative
$ (anyOf 2).contentsstringRequired within parentThe 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).tagstringRequired within parentKnown values: customerId

List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll files array item

FieldTypePresenceDescription and constraints
$objectRootA file associated with an accrual source
fileNamestringRequired within parentThe name of the file
Maximum length: 299
Minimum length: 1
idstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootA line item in an accrual source
accountIdstringRequired within parentThe ID of the ledger
Format: base58 (max length 22)
accrualSourceIdstringRequired within parentThe ID of the accrual source
Format: base58 (max length 22)
amountJSONRequired within parent
amount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amount (allOf 2)JSONAll variants applyThe amount of the accrual source line
descriptionstringRequired within parentThe description of the accrual source line
externalIdJSONOptional
externalId (anyOf 1)stringAlternativeThe external ID of the accrual source line. This is the ID of the accrual source line in an external system.
externalId (anyOf 2)nullAlternative
idstringRequired within parentThe ID of the accrual source line
Format: base58 (max length 22)
lineNumberJSONRequired within parent
lineNumber (anyOf 1)integerAlternativeThe line number. Used for maintaining a consistent order of lines within an accrual source.
Maximum: 9223372036854776000
Minimum: -9223372036854776000
lineNumber (anyOf 2)stringAlternativePattern: ^-?[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

FieldTypePresenceDescription and constraints
$objectRootPayment application for an accrual source
adjustmentsarrayRequired within parentApplicable adjustments
adjustments[]ModelEach itemExpand 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
lineEntryJSONRequired within parent
lineEntry (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyMetadata for the line entry for this payment application
matchedAmountJSONRequired within parent
matchedAmount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
matchedAmount (allOf 2)JSONAll variants applyWhat amount of the line entry is applied as a payment to the accrual source
paymentApplicationIdstringRequired within parentThe ID of the payment application
Format: base58 (max length 22)
sourceTypestringRequired within parentThe source type of the payment application
Known values: bankTransaction, customerCredit, manual
statusstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootAdjustment for an accrual source
accrualAdjustmentIdstringRequired within parentID of the adjustment
Format: base58 (max length 22)
amountJSONRequired within parent
amount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amount (allOf 2)JSONAll variants applyValue of the adjustment against the accrual source
creditAccountIdstringRequired within parentID of the applicable credit ledger
Format: base58 (max length 22)
debitAccountIdstringRequired within parentID 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

FieldTypePresenceDescription and constraints
$objectRootLine entry metadata for an accrual source payment application
journalEntryDescriptionstringRequired within parentThe description of the journal entry
journalEntryIdstringRequired within parentThe ID of the line entry's journal entry
Format: base58 (max length 22)
lineEntryAmountJSONRequired within parent
lineEntryAmount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
lineEntryAmount (allOf 2)JSONAll variants applyThe amount of the line entry
lineEntryDescriptionstringRequired within parentThe description of the line entry
lineEntryIdstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootA payment recorded against the accrual source in Mercury that has not
reached Books, and what is standing in the way.
amountJSONRequired within parent
amount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amount (allOf 2)JSONAll variants applyThe 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.
needsActionReasonJSONRequired within parent
needsActionReason (allOf 1)stringAll variants applyKnown values: transactionNotInTeal, transactionAmountExceedsInvoiceBalance, transactionAmountDoesNotCoverInvoices, sourceAccountNotMapped, transactionPredatesBooksStartDate, transactionAppliedToOtherInvoices, cardChargeStripeNotConnected, cardChargeStripeSetupPending
needsActionReason (allOf 2)JSONAll variants applyWhy 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

FieldTypePresenceDescription and constraints
$objectRootAn 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.
amountOutstandingJSONRequired within parent
amountOutstanding (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amountOutstanding (allOf 2)JSONAll variants applyThe amount outstanding
amountPaidJSONRequired within parent
amountPaid (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amountPaid (allOf 2)JSONAll variants applyThe amount of payments made against the accrual source.
displayStatusJSONRequired within parent
displayStatus (allOf 1)stringAll variants applyKnown values: open, paid, draft, cancelled, overdue, partiallyPaid, processing
displayStatus (allOf 2)JSONAll variants applyThe display status of the accrual source
dueDateJSONOptional
dueDate (anyOf 1)JSONAlternative
dueDate (anyOf 1) (allOf 1)stringAll variants applyFormat: date
dueDate (anyOf 1) (allOf 2)JSONAll variants applyThe due date of the accrual source (e.g invoice/bill due date)
dueDate (anyOf 2)nullAlternative
effectiveDateJSONRequired within parent
effectiveDate (allOf 1)stringAll variants applyFormat: date
effectiveDate (allOf 2)JSONAll variants applyThe effective date of the accrual source (e.g invoice/bill date)
externalIdJSONOptional
externalId (anyOf 1)stringAlternativeThe external ID of the accrual source, if applicable
externalId (anyOf 2)nullAlternative
externalPartyIdJSONOptional
externalPartyId (anyOf 1)JSONAlternative
externalPartyId (anyOf 1) (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyThe external party ID of the accrual source
externalPartyId (anyOf 2)nullAlternative
grossAmountJSONRequired within parent
grossAmount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
grossAmount (allOf 2)JSONAll variants applyThe gross amount of the accrual source. Total of all lines.
idstringRequired within parentThe ID of the accrual source
Format: base58 (max length 22)
linesJSONOptional
lines (anyOf 1)arrayAlternativeThe lines that make up the accrual source. At least one line is required.
lines (anyOf 1)[]ModelEach itemExpand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll lines array item
lines (anyOf 2)nullAlternative
notesJSONOptional
notes (anyOf 1)stringAlternativeOptional notes or memo for the accrual source
notes (anyOf 2)nullAlternative
referenceNumberJSONOptional
referenceNumber (anyOf 1)stringAlternativeThe reference number of the accrual source
referenceNumber (anyOf 2)nullAlternative
statusJSONRequired within parent
status (allOf 1)stringAll variants applyKnown values: open, paid, draft, cancelled, processing
status (allOf 2)JSONAll variants applyThe status of the accrual source
typestringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootAccrual source metadata for a source-level payment application: an invoice,
a bill, or a payroll run matched as a whole.
accrualSourceIdstringRequired within parentThe ID of the accrual source
Format: base58 (max length 22)
effectiveDateJSONRequired within parent
effectiveDate (allOf 1)stringAll variants applyFormat: date
effectiveDate (allOf 2)JSONAll variants applyThe effective date of the accrual source
externalIdJSONOptional
externalId (anyOf 1)stringAlternativeThe external ID of the accrual source
externalId (anyOf 2)nullAlternative
externalPartyIdJSONOptional
externalPartyId (anyOf 1)JSONAlternative
externalPartyId (anyOf 1) (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyThe external party ID of the accrual source
externalPartyId (anyOf 2)nullAlternative
grossAmountJSONRequired within parent
grossAmount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
grossAmount (allOf 2)JSONAll variants applyThe gross amount of the accrual source
referenceNumberJSONOptional
referenceNumber (anyOf 1)stringAlternativeThe reference number of the accrual source
referenceNumber (anyOf 2)nullAlternative
typestringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootPayroll accrual source for a line-level payment application: the run + its
pay period.
accrualSourceIdstringRequired within parentThe ID of the accrual source (the payroll run)
Format: base58 (max length 22)
endDateJSONRequired within parent
endDate (allOf 1)stringAll variants applyFormat: date
endDate (allOf 2)JSONAll variants applyThe end date of the pay period
startDateJSONRequired within parent
startDate (allOf 1)stringAll variants applyFormat: date
startDate (allOf 2)JSONAll variants applyThe start date of the pay period
typestringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootMarks a source-level payment application as the line entry's unapplied
payment. Not 'BooksAccrualSourceUnappliedPayment', which is Mercury money
Books hasn't recorded.
lineEntryIdstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootLine-level (payroll) payment application. The @paymentApplicationLine@
variant of 'BooksLineEntryPaymentApplication'.
accrualSourceJSONRequired within parent
accrualSource (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyThe payroll accrual source (run + pay period) of this payment application
linePaymentApplicationIdstringRequired within parentThe ID of the line-level payment application
Format: base58 (max length 22)
matchedAmountJSONRequired within parent
matchedAmount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
matchedAmount (allOf 2)JSONAll variants applyWhat amount of the line entry is applied as a payment to the payroll line
sourceTypestringRequired within parentThe source type of the payment application
Known values: bankTransaction, customerCredit, manual
statusstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootSource-level payment application (invoice, bill, or closing adjustment).
The @paymentApplication@ variant of 'BooksLineEntryPaymentApplication'.
accrualSourceJSONOptional
accrualSource (anyOf 1)JSONAlternative
accrualSource (anyOf 1) (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyMetadata for the accrual source for this payment application. Absent
for a closing adjustment or the unapplied payment.
accrualSource (anyOf 2)nullAlternative
adjustmentsarrayRequired within parentApplicable adjustments
adjustments[]ModelEach itemExpand 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
matchedAmountJSONRequired within parent
matchedAmount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
matchedAmount (allOf 2)JSONAll variants applyWhat amount of the line entry is applied as a payment to the accrual source
paymentApplicationIdstringRequired within parentThe ID of the payment application
Format: base58 (max length 22)
sourceTypestringRequired within parentThe source type of the payment application
Known values: bankTransaction, customerCredit, manual
statusstringRequired within parentThe status of the payment application
Known values: proposed, confirmed, rejected
unappliedPaymentJSONOptional
unappliedPayment (anyOf 1)JSONAlternative
unappliedPayment (anyOf 1) (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyPresent 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)nullAlternative

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

FieldTypePresenceDescription and constraints
$objectRootResponse containing a paginated list of line entries.
lineEntriesarrayRequired within parentThe line entries on this page
lineEntries[]ModelEach itemExpand List line entries (general ledger activity) across ledgers — response body — line Entries item
nextPageTokenJSONOptional
nextPageToken (anyOf 1)stringAlternativeToken to fetch the next page of results
nextPageToken (anyOf 2)nullAlternative
prevPageTokenJSONOptional
prevPageToken (anyOf 1)stringAlternativeToken to fetch the previous page of results
prevPageToken (anyOf 2)nullAlternative

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

FieldTypePresenceDescription and constraints
$objectRootA single line of general ledger (GL) activity: one debit or credit posted
to one ledger by a journal entry.
amountJSONRequired within parent
amount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amount (allOf 2)JSONAll variants applyThe unsigned amount of the line entry, in dollars.
datetimeJSONRequired within parent
datetime (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
datetime (allOf 2)JSONAll variants applyWhen the line entry was posted, in UTC.
debitCreditJSONRequired within parent
debitCredit (allOf 1)stringAll variants applyKnown values: debit, credit
debitCredit (allOf 2)JSONAll variants applyWhether the amount is a debit or a credit to the ledger.
descriptionJSONOptional
description (anyOf 1)stringAlternativeThe line entry's own description, if any.
Format: size < 4001
description (anyOf 2)nullAlternative
idstringRequired within parentThe unique identifier for the line entry.
Format: base58 (max length 22)
journalEntryDescriptionstringRequired within parentThe description of the journal entry the line entry belongs to.
Format: size < 513
journalEntryIdstringRequired within parentThe identifier of the journal entry the line entry belongs to.
Format: base58 (max length 22)
ledgerIdstringRequired within parentThe identifier of the ledger (general ledger account) the line entry is posted to.
Format: base58 (max length 22)
ledgerNamestringRequired within parentThe display name of the ledger the line entry is posted to.
opposingLedgerIdsarrayRequired within parentThe identifiers of the ledgers on the other side of the journal entry, i.e. its lines with the opposite debit or credit.
opposingLedgerIds[]stringEach itemunique id for a ledger; emitted as base-58, but a base-16 UUID is also accepted
Format: base58 (max length 22)
tagsarrayRequired within parentThe tags applied to the line entry.
tags[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootA tag used for categorizing transactions in Books.
idstringRequired within parentUnique identifier for the tag.
Format: base58 (max length 22)
namestringRequired within parentDisplay name of the tag.
tagGroupIdstringRequired within parentunique 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

FieldTypePresenceDescription and constraints
$objectRootResponse containing every source account of a Books instance.
sourceAccountsarrayRequired within parentThe Books instance's source accounts
sourceAccounts[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootA source account: a bank account, card, or other feed whose transactions
Books imports and posts to the source account's ledger.
businessPersonalJSONRequired within parent
businessPersonal (allOf 1)stringAll variants applyKnown values: business, personal
businessPersonal (allOf 2)JSONAll variants applyWhether the source account holds business or personal transactions.
debitCreditJSONRequired within parent
debitCredit (allOf 1)stringAll variants applyKnown values: debit, credit
debitCredit (allOf 2)JSONAll variants applyThe 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.
idstringRequired within parentThe 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)
ledgerIdstringRequired within parentThe identifier of the ledger (general ledger account) the source account's transactions post to.
Format: base58 (max length 22)
namestringRequired within parentThe display name of the source account.
originJSONRequired within parent
origin (allOf 1)stringAll variants applyKnown values: mercury, plaid, rutterCommerce, manual
origin (allOf 2)JSONAll variants applyHow the source account came to exist in Books.

List tag groups — response body

FieldTypePresenceDescription and constraints
$objectRootOne page of the tag groups available to a Books instance, newest first.
nextPageTokenJSONOptional
nextPageToken (anyOf 1)stringAlternativeToken to fetch the next page of results
nextPageToken (anyOf 2)nullAlternative
prevPageTokenJSONOptional
prevPageToken (anyOf 1)stringAlternativeToken to fetch the previous page of results
prevPageToken (anyOf 2)nullAlternative
tagGroupsarrayRequired within parentThe tag groups on this page.
tagGroups[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootA tag group: a named set of tags, such as "Clients" or "Contractors". A line entry can carry at most one tag from each group.
createdAtJSONRequired within parent
createdAt (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
createdAt (allOf 2)JSONAll variants applyWhen the tag group was created.
idstringRequired within parentThe unique identifier of the tag group. Pass it as `tagGroupId` to getBooksTags to list the group's tags.
Format: base58 (max length 22)
namestringRequired within parentThe tag group's display name.
ownershipJSONRequired within parent
ownership (allOf 1)stringAll variants applyKnown values: platform, instance
ownership (allOf 2)JSONAll 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

FieldTypePresenceDescription and constraints
$objectRootOne page of a Books instance's tags, newest first.
nextPageTokenJSONOptional
nextPageToken (anyOf 1)stringAlternativeToken to fetch the next page of results
nextPageToken (anyOf 2)nullAlternative
prevPageTokenJSONOptional
prevPageToken (anyOf 1)stringAlternativeToken to fetch the previous page of results
prevPageToken (anyOf 2)nullAlternative
tagsarrayRequired within parentThe tags on this page.
tags[]ModelEach itemExpand List tags — response body — tags item

Referenced models: List tags — response body — tags item

List tags — response body — tags item

FieldTypePresenceDescription and constraints
$objectRootA 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.
enabledbooleanRequired within parentWhether the tag is enabled. Disabled tags are hidden from lists unless `includeDisabled` is true.
idstringRequired within parentThe unique identifier of the tag, to pass in `tagIds`.
Format: base58 (max length 22)
namestringRequired within parentThe tag's display name.
tagGroupIdstringRequired within parentThe identifier of the tag group the tag belongs to.
Format: base58 (max length 22)
tagGroupNamestringRequired within parentThe display name of the tag group the tag belongs to.

List the Books instances you can act on — response body

FieldTypePresenceDescription and constraints
$objectRootResponse listing a page of the Books instances the token can act on.
instancesarrayRequired within parentThe Books instances on this page, sorted by company name.
instances[]ModelEach itemExpand List the Books instances you can act on — response body — instances item
nextPageTokenJSONOptional
nextPageToken (anyOf 1)stringAlternativePass as `pageToken` to fetch the next page, or null on the last page.
nextPageToken (anyOf 2)nullAlternative

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

FieldTypePresenceDescription and constraints
$objectRootA Books instance, i.e. one organization's books, that the token can act on.
booksIdJSONRequired within parent
booksId (allOf 1)stringAll variants applyFormat: uuid
booksId (allOf 2)JSONAll variants applyThe Books instance's ID. Pass it as `booksId` to the other Books operations to act on this instance.
callsignstringRequired within parentThe callsign, a short unique handle, of the organization the Books instance belongs to.
companyNamestringRequired within parentThe name of the organization the Books instance belongs to.
organizationIdJSONRequired within parent
organizationId (allOf 1)stringAll variants applyFormat: uuid
organizationId (allOf 2)JSONAll variants applyThe ID of the organization the Books instance belongs to.
relationshipJSONRequired within parent
relationship (allOf 1)stringAll variants applyKnown values: self, client
relationship (allOf 2)JSONAll variants applyWhether 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

FieldTypePresenceDescription and constraints
$objectRootResponse containing a paginated list of ledgers in the organization's live chart of accounts.
ledgersarrayRequired within parentThe ledgers on this page. Use each ledger's @parentId@ to reconstruct hierarchy.
ledgers[]ModelEach itemExpand List the live chart of accounts — response body — ledgers item
nextPageTokenJSONOptional
nextPageToken (anyOf 1)stringAlternativeToken to fetch the next page of results
nextPageToken (anyOf 2)nullAlternative
prevPageTokenJSONOptional
prevPageToken (anyOf 1)stringAlternativeToken to fetch the previous page of results
prevPageToken (anyOf 2)nullAlternative

Referenced models: List the live chart of accounts — response body — ledgers item

List the live chart of accounts — response body — ledgers item

FieldTypePresenceDescription and constraints
$objectRootA general ledger in an organization's live chart of accounts.
debitCreditJSONRequired within parent
debitCredit (allOf 1)stringAll variants applyKnown values: debit, credit
debitCredit (allOf 2)JSONAll variants applyWhether the ledger has a natural debit or credit balance.
deletablebooleanRequired within parentWhether 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.
deleteBlockedReasonJSONOptional
deleteBlockedReason (anyOf 1)JSONAlternative
deleteBlockedReason (anyOf 1) (allOf 1)stringAll variants applyKnown values: required, hasActivity, linkedSource, integrationMapped
deleteBlockedReason (anyOf 1) (allOf 2)JSONAll variants applyWhy 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)nullAlternative
editablebooleanRequired within parentWhether 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.
financialAccountTypeJSONOptional
financialAccountType (anyOf 1)JSONAlternative
financialAccountType (anyOf 1) (allOf 1)stringAll variants applyKnown values: bankAccount, creditCard, payments, payroll, loan, prepaidCard, accountsReceivable, accountsPayable, investment, treasury
financialAccountType (anyOf 1) (allOf 2)JSONAll variants applyThe real-world financial account represented by this ledger, if any.
financialAccountType (anyOf 2)nullAlternative
idstringRequired within parentThe stable identifier for the ledger.
Format: base58 (max length 22)
isRequiredbooleanRequired within parentWhether 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.
namestringRequired within parentThe ledger's display name.
Format: size < 256
openingBalanceJSONOptional
openingBalance (anyOf 1)JSONAlternative
openingBalance (anyOf 1) (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
openingBalance (anyOf 1) (allOf 2)JSONAll variants applyThe 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)nullAlternative
parentIdJSONOptional
parentId (anyOf 1)stringAlternativeThe identifier of the ledger's parent, if it is nested.
Format: base58 (max length 22)
parentId (anyOf 2)nullAlternative
requiredLedgerPurposeJSONOptional
requiredLedgerPurpose (anyOf 1)JSONAlternative
requiredLedgerPurpose (anyOf 1) (allOf 1)ModelAll variants applyExpand Retrieve ledger balances over a date range — response body — ledger Balances item special Type string string
requiredLedgerPurpose (anyOf 1) (allOf 2)JSONAll variants applyThe system function a required ledger fulfills, such as holding uncategorized inflows. Absent for ledgers that aren't required.
requiredLedgerPurpose (anyOf 2)nullAlternative
sortCodestringRequired within parentThe ledger/account number used for chart ordering and template mapping.
Format: size < 21
subTypeJSONRequired within parent
subType (allOf 1)stringAll variants applyKnown values: currentAssets, nonCurrentAssets, transfersBetweenAccounts, uncategorizedAssets, currentLiabilities, nonCurrentLiabilities, equity, operatingRevenues, otherIncome, costOfGoodsSold, operatingExpenses, otherExpenses, retainedEarnings
subType (allOf 2)JSONAll variants applyThe 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.
typeJSONRequired within parent
type (allOf 1)stringAll variants applyKnown values: asset, liability, equity, revenue, expense
type (allOf 2)JSONAll variants applyThe 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

FieldTypePresenceDescription and constraints
$objectRootRequest to match a line entry to bills or to invoices.
Additional keys: not allowed
adjustmentsJSONOptional
adjustments (anyOf 1)arrayAlternativeAdjustments on the line entry itself rather than on a bill or invoice, such as closing out an overpayment, at most 100.
adjustments (anyOf 1)[]ModelEach itemExpand Match a transaction to bills or invoices — request body — body adjustments array item
adjustments (anyOf 2)nullAlternative
applicationsarrayRequired within parentThe bills, or the invoices, the line entry pays, from 1 to 100, each at most once.
Minimum items: 1
applications[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootAn 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
amountJSONRequired within parent
amount (allOf 1)numberAll variants applyA dollar amount
Format: double
amount (allOf 2)JSONAll variants applyThe positive amount of the adjustment: a number of dollars with at most two decimal places.
ledgerIdstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootThe part of the line entry's amount applied to one bill or invoice.
Additional keys: not allowed
adjustmentsJSONOptional
adjustments (anyOf 1)arrayAlternativeAdjustments booked against this bill or invoice, at most 100.
adjustments (anyOf 1)[]ModelEach itemExpand Match a transaction to bills or invoices — request body — body adjustments array item
adjustments (anyOf 2)nullAlternative
amountJSONRequired within parent
amount (allOf 1)numberAll variants applyA dollar amount
Format: double
amount (allOf 2)JSONAll variants applyThe positive amount applied to the bill or invoice: a number of dollars with at most two decimal places.
billIdJSONOptional
billId (anyOf 1)stringAlternativeThe 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)nullAlternative
invoiceIdJSONOptional
invoiceId (anyOf 1)stringAlternativeThe invoice paid. Give exactly one of `billId` and `invoiceId`, and the same one in every application.
Format: base58 (max length 22)
invoiceId (anyOf 2)nullAlternative

Referenced models: Match a transaction to bills or invoices — request body — body adjustments array item

Match a transaction to bills or invoices — response body

FieldTypePresenceDescription and constraints
$objectRootThe result of matching a line entry to bills or invoices, or of unmatching
it. Both operations return this shape.
billsarrayRequired within parentThe bills the request matched or unmatched. Empty when it matched or unmatched invoices.
bills[]ModelEach itemExpand Match a transaction to bills or invoices — response body — bills item
invoicesarrayRequired within parentThe invoices the request matched or unmatched. Empty when it matched or unmatched bills.
invoices[]ModelEach itemExpand Match a transaction to bills or invoices — response body — bills item
lineEntryJSONRequired within parent
lineEntry (allOf 1)ModelAll variants applyExpand Match a transaction to bills or invoices — response body — line Entry The line entry after the match or unmatch
lineEntry (allOf 2)JSONAll variants applyThe 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

FieldTypePresenceDescription and constraints
$objectRootA bill or invoice after the match or unmatch.
amountAdjustedJSONRequired within parent
amountAdjusted (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amountAdjusted (allOf 2)JSONAll variants applyThe total of the adjustments booked against it, in dollars.
amountOutstandingJSONRequired within parent
amountOutstanding (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amountOutstanding (allOf 2)JSONAll variants applyThe amount still owed, in dollars.
amountPaidJSONRequired within parent
amountPaid (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amountPaid (allOf 2)JSONAll variants applyThe total of the payments applied to it, in dollars.
displayStatusJSONRequired within parent
displayStatus (allOf 1)stringAll variants applyKnown values: open, paid, draft, cancelled, overdue, partiallyPaid, processing
displayStatus (allOf 2)JSONAll variants applyThe status shown in Mercury, which also tells overdue and partially paid ones apart.
idstringRequired within parentThe ID of the bill or invoice.
Format: base58 (max length 22)
statusJSONRequired within parent
status (allOf 1)stringAll variants applyKnown values: open, paid, draft, cancelled, processing
status (allOf 2)JSONAll variants applyThe 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

FieldTypePresenceDescription and constraints
$objectRootThe line entry after the match or unmatch.
amountJSONRequired within parent
amount (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amount (allOf 2)JSONAll variants applyThe unsigned amount of the line entry, in dollars.
amountAdjustedJSONRequired within parent
amountAdjusted (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amountAdjusted (allOf 2)JSONAll variants applyHow much of the line entry is booked as line-level adjustments. 0 after an unmatch.
amountAppliedJSONRequired within parent
amountApplied (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
amountApplied (allOf 2)JSONAll variants applyHow much of the line entry is applied to bills or invoices. 0 after an unmatch.
idstringRequired within parentThe ID of the line entry, the one in the request path.
Format: base58 (max length 22)
journalEntryIdstringRequired within parentThe ID of the line entry's journal entry.
Format: base58 (max length 22)
transactionIdJSONOptional
transactionId (anyOf 1)stringAlternativeThe 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)nullAlternative

Referenced models: Create a product — response body — unit Price value

Retrieve a balance sheet — response body

FieldTypePresenceDescription and constraints
$objectRootAn income statement or balance sheet broken down into columns.
columnsarrayRequired within parentThe report's columns, in chronological order.
columns[]ModelEach itemExpand Retrieve a balance sheet — response body — columns item
retainedEarningsJSONOptional
retainedEarnings (anyOf 1)JSONAlternative
retainedEarnings (anyOf 1) (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applySystem-calculated equity amounts. Present on balance sheets; omitted on income statements.
retainedEarnings (anyOf 2)nullAlternative
rowsarrayRequired within parentThe report's top-level rows.
rows[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootA report column. The amount lists on each row are ordered to match the report's columns.
endDateJSONOptional
endDate (anyOf 1)JSONAlternative
endDate (anyOf 1) (allOf 1)stringAll variants applyFormat: date
endDate (anyOf 1) (allOf 2)JSONAll variants applyThe 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)nullAlternative
isPartialbooleanRequired within parentWhether @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.
labelstringRequired within parentThe 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.
startDateJSONOptional
startDate (anyOf 1)JSONAlternative
startDate (anyOf 1) (allOf 1)stringAll variants applyFormat: date
startDate (anyOf 1) (allOf 2)JSONAll variants applyThe 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)nullAlternative

Retrieve a balance sheet — response body — retained Earnings calculated Current Year Earnings, calculated Retained Earnings calculated Current Year Earnings, calculated Retained Earnings

FieldTypePresenceDescription and constraints
$objectRootSystem-calculated equity amounts that are added to the Retained Earnings and Current Year Earnings ledger rows.
calculatedCurrentYearEarningsarrayRequired within parentFor each column, current-year revenues minus current-year expenses, before journal entries posted to the
Current Year Earnings ledger.
calculatedCurrentYearEarnings[]ModelEach itemExpand Create a product — response body — unit Price value
calculatedRetainedEarningsarrayRequired within parentFor each column, prior-year revenues minus prior-year expenses, before journal entries posted to the
Retained Earnings ledger.
calculatedRetainedEarnings[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootA row in an income statement or balance sheet.
amountsarrayRequired within parentThe row's own amount for each column, excluding its children.
amounts[]ModelEach itemExpand Create a product — response body — unit Price value
childrenarrayRequired within parentThe rows nested under this row.
children[]ModelEach itemExpand Retrieve a balance sheet — response body — rows item
debitCreditJSONRequired within parent
debitCredit (allOf 1)stringAll variants applyKnown values: debit, credit
debitCredit (allOf 2)JSONAll variants applyWhether the row's amounts have a natural debit or credit balance.
ledgerIdJSONOptional
ledgerId (anyOf 1)stringAlternativeThe ledger this row represents. Omitted unless @rowKind@ is @ledger@.
Format: base58 (max length 22)
ledgerId (anyOf 2)nullAlternative
namestringRequired within parentThe ledger name, the summary heading, or the name of the calculated metric.
parentIdJSONOptional
parentId (anyOf 1)stringAlternativeThe parent ledger of this row's ledger, if it is nested.
Format: base58 (max length 22)
parentId (anyOf 2)nullAlternative
rowKindJSONRequired within parent
rowKind (allOf 1)stringAll variants applyKnown values: ledger, summary, computed
rowKind (allOf 2)JSONAll variants applyWhat the row represents.
sortCodeJSONOptional
sortCode (anyOf 1)stringAlternativeThe ledger/account number used for chart ordering. Omitted unless @rowKind@ is @ledger@.
sortCode (anyOf 2)nullAlternative
subTypeJSONOptional
subType (anyOf 1)JSONAlternative
subType (anyOf 1) (allOf 1)stringAll variants applyKnown values: currentAssets, nonCurrentAssets, transfersBetweenAccounts, uncategorizedAssets, currentLiabilities, nonCurrentLiabilities, equity, operatingRevenues, otherIncome, costOfGoodsSold, operatingExpenses, otherExpenses, retainedEarnings
subType (anyOf 1) (allOf 2)JSONAll variants applyThe ledger's more specific accounting classification. Omitted unless @rowKind@ is @ledger@.
subType (anyOf 2)nullAlternative
totalAmountsarrayRequired within parentThe row's amount for each column, including all of its children.
totalAmounts[]ModelEach itemExpand Create a product — response body — unit Price value
typeJSONOptional
type (anyOf 1)JSONAlternative
type (anyOf 1) (allOf 1)stringAll variants applyKnown values: asset, liability, equity, revenue, expense
type (anyOf 1) (allOf 2)JSONAll variants applyThe top-level accounting classification of the row's ledger or summary grouping. Omitted on @computed@ rows.
type (anyOf 2)nullAlternative

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

FieldTypePresenceDescription and constraints
$objectRootA single bill (accounts payable), as returned by the retrieve-one endpoint.
The @bill@ is the same item shape as an element of @GET /bills@.
billJSONRequired within parent
bill (allOf 1)ModelAll variants applyExpand Edit a bill (accounts payable) — response body
bill (allOf 2)JSONAll variants applyThe requested bill.

Referenced models: Edit a bill (accounts payable) — response body

Retrieve a cash flow report — response body

FieldTypePresenceDescription and constraints
$objectRootA cash flow report broken down into columns.
columnsarrayRequired within parentThe report's columns, in chronological order.
columns[]ModelEach itemExpand Retrieve a balance sheet — response body — columns item
endingBalancesarrayRequired within parentThe top-level cash ledgers' balances at the end of each column.
endingBalances[]ModelEach itemExpand Retrieve a cash flow report — response body — ending Balances item
endingCashBalancesarrayRequired within parentFor each column, the total debit balance of all cash ledgers at the end of the column.
endingCashBalances[]ModelEach itemExpand Create a product — response body — unit Price value
ledgersarrayRequired within parentThe top-level ledgers that cash moved through.
ledgers[]ModelEach itemExpand Retrieve a cash flow report — response body — ledgers item
startingBalancesarrayRequired within parentThe top-level cash ledgers' balances at the start of each column.
startingBalances[]ModelEach itemExpand Retrieve a cash flow report — response body — ending Balances item
startingCashBalancesarrayRequired within parentFor each column, the total debit balance of all cash ledgers at the start of the column.
startingCashBalances[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootThe cash balance of a cash ledger at the start or end of each column of a cash flow report.
balancesarrayRequired within parentFor each column, the ledger's own debit balance, excluding its children.
balances[]ModelEach itemExpand Create a product — response body — unit Price value
childrenarrayRequired within parentThe ledgers nested under this ledger.
children[]ModelEach itemExpand Retrieve a cash flow report — response body — ending Balances item
ledgerIdstringRequired within parentThe cash ledger this row represents.
Format: base58 (max length 22)
namestringRequired within parentThe ledger's display name.
parentIdJSONOptional
parentId (anyOf 1)stringAlternativeThe parent ledger, if this ledger is nested.
Format: base58 (max length 22)
parentId (anyOf 2)nullAlternative
sortCodestringRequired within parentThe ledger/account number used for chart ordering.
totalBalancesarrayRequired within parentFor each column, the debit balance of the ledger and all of its children.
totalBalances[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootNet cash movement through a ledger in each column of a cash flow report.
childrenarrayRequired within parentThe ledgers nested under this ledger.
children[]ModelEach itemExpand Retrieve a cash flow report — response body — ledgers item
ledgerIdstringRequired within parentThe ledger this row represents.
Format: base58 (max length 22)
namestringRequired within parentThe ledger's display name.
netCashFlowsarrayRequired within parentFor each column, the sum of the ledger's own cash line entries, excluding its children.
netCashFlows[]ModelEach itemExpand Create a product — response body — unit Price value
parentIdJSONOptional
parentId (anyOf 1)stringAlternativeThe parent ledger, if this ledger is nested.
Format: base58 (max length 22)
parentId (anyOf 2)nullAlternative
totalNetCashFlowsarrayRequired within parentFor each column, the sum of the cash line entries in the ledger and all of its children.
totalNetCashFlows[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
booksIdstringOptionalThe Books instance to act on. Must be the token organization's own instance, which it defaults to.
Format: uuid
expandstringOptionalComma-separated list of expandable paths.
One of: lineEntries, lineEntriesTransactions, lineEntriesLedger, lineEntriesOpposingLedgerIds, lineEntriesPaymentApplications, lineEntriesLinePaymentApplications, accrualSource, transfer, autocatResult

Retrieve a journal entry — response body

FieldTypePresenceDescription and constraints
$objectRootResponse containing a single journal entry.
journalEntryJSONRequired within parent
journalEntry (allOf 1)ModelAll variants applyExpand List journal entries — response body — journal Entries item
journalEntry (allOf 2)JSONAll variants applyThe requested journal entry

Referenced models: List journal entries — response body — journal Entries item

Retrieve a ledger (general ledger account) — response body

FieldTypePresenceDescription and constraints
$objectRootResponse containing a single ledger.
ledgerJSONRequired within parent
ledger (allOf 1)ModelAll variants applyExpand List the live chart of accounts — response body — ledgers item
ledger (allOf 2)JSONAll variants applyThe requested ledger

Referenced models: List the live chart of accounts — response body — ledgers item

Retrieve a transaction — response body

FieldTypePresenceDescription and constraints
$objectRootResponse containing a single transaction.
transactionJSONRequired within parent
transaction (allOf 1)ModelAll variants applyExpand List a source account's transactions — response body — transactions item
transaction (allOf 2)JSONAll variants applyThe requested transaction

Referenced models: List a source account's transactions — response body — transactions item

Retrieve an invoice (accounts receivable) — response body

FieldTypePresenceDescription and constraints
$objectRootA single invoice (accounts receivable), as returned by the retrieve-one
endpoint. The @invoice@ is the same item shape as an element of @GET /invoices@.
invoiceJSONRequired within parent
invoice (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyThe requested invoice.

Referenced models: 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

Retrieve ledger balances over a date range — response body

FieldTypePresenceDescription and constraints
$objectRootResponse containing the balances of the requested ledgers.
ledgerBalancesarrayRequired within parentOne entry per distinct requested ledger, in the order the ledgers were requested.
ledgerBalances[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootOne 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.
closingBalanceJSONRequired within parent
closingBalance (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
closingBalance (allOf 2)JSONAll variants applyThe balance at the end of `endDate`.
debitCreditJSONRequired within parent
debitCredit (allOf 1)stringAll variants applyKnown values: debit, credit
debitCredit (allOf 2)JSONAll variants applyWhether the ledger has a natural debit or credit balance, which is the side that positive amounts increase.
ledgerIdstringRequired within parentThe ledger these balances belong to.
Format: base58 (max length 22)
namestringRequired within parentThe ledger's display name.
netActivityJSONRequired within parent
netActivity (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
netActivity (allOf 2)JSONAll variants applyThe net change over the range: all of the ledger's line entries from `startDate` through `endDate`.
openingBalanceJSONRequired within parent
openingBalance (allOf 1)ModelAll variants applyExpand Create a product — response body — unit Price value
openingBalance (allOf 2)JSONAll variants applyThe balance at the end of the day before `startDate`.
specialTypeJSONOptional
specialType (anyOf 1)JSONAlternative
specialType (anyOf 1) (allOf 1)ModelAll variants applyExpand Retrieve ledger balances over a date range — response body — ledger Balances item special Type string string
specialType (anyOf 1) (allOf 2)JSONAll variants applyThe system function of a required ledger, such as `retained_earnings`, if it has one.
specialType (anyOf 2)nullAlternative
subTypeJSONRequired within parent
subType (allOf 1)stringAll variants applyKnown values: currentAssets, nonCurrentAssets, transfersBetweenAccounts, uncategorizedAssets, currentLiabilities, nonCurrentLiabilities, equity, operatingRevenues, otherIncome, costOfGoodsSold, operatingExpenses, otherExpenses, retainedEarnings
subType (allOf 2)JSONAll variants applyThe ledger's more specific accounting classification.
typeJSONRequired within parent
type (allOf 1)stringAll variants applyKnown values: asset, liability, equity, revenue, expense
type (allOf 2)JSONAll variants applyThe 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

FieldTypePresenceDescription and constraints
$stringRootKnown 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

FieldTypePresenceDescription and constraints
$objectRootRequest to set or clear the opening balances of ledgers.
Additional keys: not allowed
openingBalancesarrayRequired within parentThe opening balances to set, from 1 to 100 ('maxBooksAPIBulkWriteItems'), processed in order. Each `ledgerId` may appear at most once.
Minimum items: 1
openingBalances[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootThe opening balance to set on one ledger.
Additional keys: not allowed
balanceJSONRequired within parent
balance (allOf 1)numberAll variants applyA dollar amount
Format: double
balance (allOf 2)JSONAll variants applyThe 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.
ledgerIdstringRequired within parentThe ID of the ledger whose opening balance to set.
Format: base58 (max length 22)

Set or clear ledger opening balances — response body

FieldTypePresenceDescription and constraints
$objectRootOne result per requested opening balance, in request order.
failedCountJSONRequired within parent
failedCount (anyOf 1)integerAlternativeHow 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)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
resultsarrayRequired within parentOne result per requested opening balance, in request order. A failed item does not fail the others.
results[]ModelEach itemExpand Set or clear ledger opening balances — response body — results item
succeededCountJSONRequired within parent
succeededCount (anyOf 1)integerAlternativeHow many items in `results` succeeded.
Maximum: 9223372036854776000
Minimum: -9223372036854776000
succeededCount (anyOf 2)stringAlternativePattern: ^-?[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

FieldTypePresenceDescription and constraints
$objectRootThe outcome of setting one requested opening balance: `error` is set exactly when `success` is false.
errorJSONOptional
error (anyOf 1)JSONAlternative
error (anyOf 1) (allOf 1)ModelAll variants applyExpand Set or clear ledger opening balances — response body — results item error code, message code, message
error (anyOf 1) (allOf 2)JSONAll variants applyWhy the opening balance was not set, when it wasn't.
error (anyOf 2)nullAlternative
ledgerIdstringRequired within parentThe ledger the requested opening balance was for.
Format: base58 (max length 22)
successbooleanRequired within parentWhether 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

FieldTypePresenceDescription and constraints
$objectRootWhy 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.
codeJSONRequired within parent
code (allOf 1)stringAll variants applyKnown values: invalidLedger, missingParameters, duplicateName, duplicateSortCode, invalidLedgerType, invalidLedgerParent, invalidLedgerReportCashFlow, deletingRequiredLedger, deletingLedgerWithActivity, deletingLinkedLedger, deletingParentLedger, modifyingRequiredLedger, integrationMapped, invalidUnappliedPaymentsLedger, deletingMappedLedger, modifyingMappedLedger, mercuryAccountLedger, unknownError
code (allOf 2)JSONAll variants applyStable code for the failure.
messagestringRequired within parentWhat went wrong and how to fix it, suitable to show to a user.

Update ledgers (general ledger accounts) — request body — body

FieldTypePresenceDescription and constraints
$objectRootRequest to update general ledgers.
Additional keys: not allowed
ledgersarrayRequired within parentThe ledger updates to apply, from 1 to 100 ('maxBooksAPILedgerWrites'), processed in order. Each `ledgerId` may appear at most once.
ledgers[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootUpdates to apply to an existing general ledger. Omitted fields are left unchanged.
Additional keys: not allowed
clearFieldsJSONOptional
clearFields (anyOf 1)arrayAlternativeFields to clear, such as the parent ledger
clearFields (anyOf 1)[]stringEach itemOne of: parentId
clearFields (anyOf 2)nullAlternative
debitCreditJSONOptional
debitCredit (anyOf 1)JSONAlternative
debitCredit (anyOf 1) (allOf 1)stringAll variants applyOne of: debit, credit
debitCredit (anyOf 1) (allOf 2)JSONAll variants applyUpdated debit or credit nature
debitCredit (anyOf 2)nullAlternative
ledgerIdstringRequired within parentThe ID of the ledger to update
Format: base58 (max length 22)
nameJSONOptional
name (anyOf 1)stringAlternativeUpdated ledger name
Format: size < 256
name (anyOf 2)nullAlternative
parentIdJSONOptional
parentId (anyOf 1)stringAlternativeUpdated parent ledger
Format: base58 (max length 22)
parentId (anyOf 2)nullAlternative
sortCodeJSONOptional
sortCode (anyOf 1)stringAlternativeUpdated numeric sort code
Format: matches ^[0-9]+$, size < 21
sortCode (anyOf 2)nullAlternative
subTypeJSONOptional
subType (anyOf 1)JSONAlternative
subType (anyOf 1) (allOf 1)stringAll variants applyOne of: currentAssets, nonCurrentAssets, transfersBetweenAccounts, uncategorizedAssets, currentLiabilities, nonCurrentLiabilities, equity, operatingRevenues, otherIncome, costOfGoodsSold, operatingExpenses, otherExpenses, retainedEarnings
subType (anyOf 1) (allOf 2)JSONAll variants applyUpdated ledger sub-type
subType (anyOf 2)nullAlternative
typeJSONOptional
type (anyOf 1)JSONAlternative
type (anyOf 1) (allOf 1)stringAll variants applyOne of: asset, liability, equity, revenue, expense
type (anyOf 1) (allOf 2)JSONAll variants applyUpdated ledger type
type (anyOf 2)nullAlternative

Update ledgers (general ledger accounts) — response body

FieldTypePresenceDescription and constraints
$objectRootOne result per requested ledger update, in request order.
failedCountJSONRequired within parent
failedCount (anyOf 1)integerAlternativeHow 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)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
resultsarrayRequired within parentOne result per requested ledger update, in request order. A failed item does not fail the others.
results[]ModelEach itemExpand Update ledgers (general ledger accounts) — response body — results item
succeededCountJSONRequired within parent
succeededCount (anyOf 1)integerAlternativeHow many items in `results` succeeded.
Maximum: 9223372036854776000
Minimum: -9223372036854776000
succeededCount (anyOf 2)stringAlternativePattern: ^-?[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

FieldTypePresenceDescription and constraints
$objectRootThe outcome of updating one requested ledger: exactly one of `ledger` and `error` is set.
errorJSONOptional
error (anyOf 1)JSONAlternative
error (anyOf 1) (allOf 1)ModelAll variants applyExpand Set or clear ledger opening balances — response body — results item error code, message code, message
error (anyOf 1) (allOf 2)JSONAll variants applyWhy the ledger was not updated, when it wasn't.
error (anyOf 2)nullAlternative
ledgerJSONOptional
ledger (anyOf 1)JSONAlternative
ledger (anyOf 1) (allOf 1)ModelAll variants applyExpand List the live chart of accounts — response body — ledgers item
ledger (anyOf 1) (allOf 2)JSONAll variants applyThe updated ledger, when it was updated.
ledger (anyOf 2)nullAlternative

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

FieldTypePresenceDescription and constraints
$objectRootRequest to update multiple journal entries in a single call.
Additional keys: not allowed
updatesarrayRequired within parentThe individual journal entry updates
updates[]ModelEach itemExpand 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

FieldTypePresenceDescription and constraints
$objectRootRequest to update a single journal entry.
Additional keys: not allowed
datetimeJSONOptional
datetime (anyOf 1)JSONAlternative
datetime (anyOf 1) (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
datetime (anyOf 1) (allOf 2)JSONAll variants applyUpdated date and time
datetime (anyOf 2)nullAlternative
descriptionJSONOptional
description (anyOf 1)stringAlternativeUpdated description
Format: size < 513
description (anyOf 2)nullAlternative
journalEntryIdstringRequired within parentThe ID of the journal entry to update
Format: base58 (max length 22)
lineEntryChangesJSONOptional
lineEntryChanges (anyOf 1)JSONAlternative
lineEntryChanges (anyOf 1) (allOf 1)ModelAll variants applyExpand 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)JSONAll variants applyChanges to apply to line entries
lineEntryChanges (anyOf 2)nullAlternative
reviewStatusJSONOptional
reviewStatus (anyOf 1)JSONAlternative
reviewStatus (anyOf 1) (allOf 1)stringAll variants applyOne of: unreviewed, reviewed
reviewStatus (anyOf 1) (allOf 2)JSONAll variants applyNew review status for the journal entry. Omit to leave the existing review status unchanged.
reviewStatus (anyOf 2)nullAlternative

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

FieldTypePresenceDescription and constraints
$objectRootLine entry changes to apply to a journal entry: create, update, or delete.
Additional keys: not allowed
createJSONOptional
create (anyOf 1)arrayAlternativeNew line entries to add
create (anyOf 1)[]ModelEach itemExpand 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)nullAlternative
deleteJSONOptional
delete (anyOf 1)arrayAlternativeIDs of line entries to remove
delete (anyOf 1)[]stringEach itemunique 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)nullAlternative
updateJSONOptional
update (anyOf 1)arrayAlternativeExisting line entries to modify
update (anyOf 1)[]ModelEach itemExpand 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)nullAlternative

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

FieldTypePresenceDescription and constraints
$objectRootA new line entry to create within an existing journal entry.
Additional keys: not allowed
amountJSONRequired within parent
amount (allOf 1)numberAll variants applyA dollar amount
Format: double
amount (allOf 2)JSONAll variants applyThe amount for this line entry
debitCreditJSONRequired within parent
debitCredit (allOf 1)stringAll variants applyOne of: debit, credit
debitCredit (allOf 2)JSONAll variants applyWhether this line entry is a debit or credit
descriptionstringRequired within parentDescription of the line entry
Format: size < 4001
ledgerIdstringRequired within parentThe ledger this line entry is posted to
Format: base58 (max length 22)
sortOrderJSONOptional
sortOrder (anyOf 1)integerAlternativeOptional position within the journal entry. Omit to append at MAX(sort_order) + 1.
Maximum: 9223372036854776000
Minimum: -9223372036854776000
sortOrder (anyOf 2)nullAlternative
tagIdsJSONOptional
tagIds (anyOf 1)arrayAlternativeOptional tags to associate with this line entry
tagIds (anyOf 1)[]stringEach itemunique id for a tag; emitted as base-58, but a base-16 UUID is also accepted
Format: base58 (max length 22)
tagIds (anyOf 2)nullAlternative

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

FieldTypePresenceDescription and constraints
$objectRootUpdates to apply to an existing line entry.
Additional keys: not allowed
amountJSONOptional
amount (anyOf 1)JSONAlternative
amount (anyOf 1) (allOf 1)numberAll variants applyA dollar amount
Format: double
amount (anyOf 1) (allOf 2)JSONAll variants applyUpdated amount
amount (anyOf 2)nullAlternative
debitCreditJSONOptional
debitCredit (anyOf 1)JSONAlternative
debitCredit (anyOf 1) (allOf 1)stringAll variants applyOne of: debit, credit
debitCredit (anyOf 1) (allOf 2)JSONAll variants applyUpdated debit/credit designation
debitCredit (anyOf 2)nullAlternative
descriptionJSONOptional
description (anyOf 1)stringAlternativeUpdated description
Format: size < 4001
description (anyOf 2)nullAlternative
idstringRequired within parentThe ID of the line entry to update
Format: base58 (max length 22)
ledgerIdJSONOptional
ledgerId (anyOf 1)stringAlternativeUpdated ledger
Format: base58 (max length 22)
ledgerId (anyOf 2)nullAlternative
sortOrderJSONOptional
sortOrder (anyOf 1)integerAlternativeUpdated position within the journal entry. Omit to leave unchanged.
Maximum: 9223372036854776000
Minimum: -9223372036854776000
sortOrder (anyOf 2)nullAlternative
tagIdsJSONOptional
tagIds (anyOf 1)arrayAlternativeUpdated tags
tagIds (anyOf 1)[]stringEach itemunique id for a tag; emitted as base-58, but a base-16 UUID is also accepted
Format: base58 (max length 22)
tagIds (anyOf 2)nullAlternative

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.