Mercury: Books schemas (part 1)
76 Mercury schemas with complete fields and constraints.
← Books operations · All schemas
Categorize or split transactions — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Request to categorize or split one or more transactions, all or nothing. Additional keys: not allowed |
items | array | Required within parent | The transactions to categorize, from 1 to 100, each at most once. Across all items, the splits may name at most 100 distinct ledgers. |
items[] | Model | Each item | Expand Categorize or split transactions — request body — body items item |
Referenced models: Categorize or split transactions — request body — body items item
Categorize or split transactions — request body — body items item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The new categorization of one transaction. Additional keys: not allowed |
journalEntryId | string | Required within parent | The `journalEntryId` of the transaction to categorize. Format: base58 (max length 22) |
splits | array | Required within parent | The new categorization: one split per category. The splits replace every current categorization line. Minimum items: 1 |
splits[] | Model | Each item | Expand Categorize or split transactions — request body — body items item splits item |
Referenced models: Categorize or split transactions — request body — body items item splits item
Categorize or split transactions — request body — body items item splits item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One category of a transaction and the part of its amount that goes to it. Additional keys: not allowed |
amount | JSON | Required within parent | |
amount (allOf 1) | number | All variants apply | A dollar amount Format: double |
amount (allOf 2) | JSON | All variants apply | The signed, nonzero part of the transaction's amount: a number of dollars with at most two decimal places, with the same sign convention as the transaction's `amount`. The splits of a transaction must add up to exactly its `amount`. A split with the opposite sign to the transaction, such as a refund netted against a purchase, posts on the other side. |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | The description of the categorization line. Omit to keep the description of the line it replaces, or for a new line, to use the transaction's description. Format: size < 4001 |
description (anyOf 2) | null | Alternative | |
ledgerId | string | Required within parent | The ledger (general ledger account) to categorize this part of the transaction to, such as an expense or revenue account. It must be editable, and must not be an uncategorized ledger or a source account's ledger. Format: base58 (max length 22) |
tagIds | JSON | Optional | |
tagIds (anyOf 1) | array | Alternative | The tags of the categorization line. Omit to keep the tags of the line it replaces; a new line then has no tags. |
tagIds (anyOf 1)[] | string | Each item | unique id for a tag; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
tagIds (anyOf 2) | null | Alternative |
Categorize or split transactions — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The categorized transactions, in request order. |
items | array | Required within parent | One per request item, in request order. |
items[] | Model | Each item | Expand Categorize or split transactions — response body — items item |
Referenced models: Categorize or split transactions — response body — items item
Categorize or split transactions — response body — items item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A transaction's categorization after the request. |
categorizationLines | array | Required within parent | The transaction's categorization lines, as the transaction's `categorizationLines` now list them. |
categorizationLines[] | Model | Each item | Expand Categorize or split transactions — response body — items item categorization Lines item |
journalEntryId | string | Required within parent | The `journalEntryId` of the transaction. Format: base58 (max length 22) |
Referenced models: Categorize or split transactions — response body — items item categorization Lines item
Categorize or split transactions — response body — items item categorization Lines item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A line of a transaction's journal entry other than its own line on the source account's ledger. Its ledger is the transaction's category; a split transaction has one line per category. |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The unsigned amount of the line, in dollars; `debitCredit` gives its direction. |
debitCredit | JSON | Required within parent | |
debitCredit (allOf 1) | string | All variants apply | Known values: debit, credit |
debitCredit (allOf 2) | JSON | All variants apply | Whether the amount is a debit or a credit to the ledger. |
ledgerId | string | Required within parent | The identifier of the ledger (general ledger account) the line posts to, i.e. the category. Format: base58 (max length 22) |
ledgerName | string | Required within parent | The display name of the ledger the line posts to. |
lineEntryId | string | Required within parent | The identifier of the categorization line entry. Format: base58 (max length 22) |
Referenced models: Create a product — response body — unit Price value
Create a bill (accounts payable) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A request to create a single bill (accounts payable). Additional keys: not allowed |
dueDate | JSON | Required within parent | |
dueDate (allOf 1) | string | All variants apply | Format: date |
dueDate (allOf 2) | JSON | All variants apply | Date the bill is due. |
effectiveDate | JSON | Required within parent | |
effectiveDate (allOf 1) | string | All variants apply | Format: date |
effectiveDate (allOf 2) | JSON | All variants apply | Effective date of the bill (e.g. the bill date). |
lines | array | Required within parent | Line items for the bill. At least one is required. Minimum items: 1 |
lines[] | Model | Each item | Expand Create a bill (accounts payable) — request body — body lines item |
notes | JSON | Optional | |
notes (anyOf 1) | string | Alternative | Optional notes or memo for the bill. |
notes (anyOf 2) | null | Alternative | |
referenceNumber | string | Optional | Human-readable reference number (e.g. the vendor's bill number). Optional; an omitted, null, empty, or whitespace-only value is treated as absent, and leading and trailing whitespace is stripped. Maximum length: 299 |
vendor | JSON | Required within parent | |
vendor (allOf 1) | Model | All variants apply | Expand Create a bill (accounts payable) — request body — body vendor value |
vendor (allOf 2) | JSON | All variants apply | The vendor the bill is owed to. |
Referenced models: Create a bill (accounts payable) — request body — body lines item, Create a bill (accounts payable) — request body — body vendor value
Create a bill (accounts payable) — request body — body lines item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A bill line item to create. Additional keys: not allowed |
amount | JSON | Required within parent | |
amount (allOf 1) | number | All variants apply | A dollar amount Format: double |
amount (allOf 2) | JSON | All variants apply | Amount for this line item. May be negative (e.g. a discount line). Zero-amount lines are ignored; at least one line must be non-zero, and the combined total of all lines must be greater than zero (enforced by Teal). |
description | string | Required within parent | Description of the line item. Required and non-empty; leading and trailing whitespace is stripped. Maximum length: 1024 Minimum length: 1 |
ledgerId | string | Required within parent | The ledger account (expense account) to book this line against. Format: base58 (max length 22) |
Create a bill (accounts payable) — request body — body vendor value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (oneOf 1) | object | Alternative | Additional keys: not allowed |
$ (oneOf 1).contents | string | Required within parent | ID for this books counterparty Format: uuid |
$ (oneOf 1).tag | string | Required within parent | One of: counterpartyId |
$ (oneOf 2) | object | Alternative | Additional keys: not allowed |
$ (oneOf 2).contents | string | Required within parent | ID for the recipient Format: uuid |
$ (oneOf 2).tag | string | Required within parent | One of: recipientId |
Create a categorization rule — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A categorization rule to create. There is no priority field: Books places the new rule among the existing ones by how specific its conditions are. Additional keys: not allowed |
conditions | array | Required within parent | The conditions a transaction must match, from 1 to 10. Every condition must match (logical AND); there is no OR, so an "any of" rule is written as separate rules. The organization may not already have a rule with the same conditions. Minimum items: 1 |
conditions[] | Model | Each item | Expand Create a categorization rule — request body — body conditions item |
outputs | array | Required within parent | What the rule applies to a matching transaction: at most one output of each kind, so today exactly one `setLedger`. Its ledger must be one the caller may edit in this Books instance. Minimum items: 1 |
outputs[] | Model | Each item | Expand Create a categorization rule — request body — body outputs item |
Referenced models: Create a categorization rule — request body — body conditions item, Create a categorization rule — request body — body outputs item
Create a categorization rule — request body — body / conditions / item / tag: amount contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions whose amount compares to a threshold (`tag`: `amount`). The amount is signed: money in (credits) is positive and money out (debits) is negative, and the threshold is compared against it as is, so `lessThan` `-50` matches outflows of more than $50. A range is two amount conditions on the same rule. Additional keys: not allowed |
amount | JSON | Required within parent | |
amount (allOf 1) | number | All variants apply | A dollar amount Format: double |
amount (allOf 2) | JSON | All variants apply | The threshold, in dollars. Signed like the transaction amount: positive for money in, negative for money out. |
operator | JSON | Required within parent | |
operator (allOf 1) | string | All variants apply | One of: lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, equalTo |
operator (allOf 2) | JSON | All variants apply | How to compare the transaction amount to `amount`. |
Create a categorization rule — request body — body / conditions / item / tag: counterparty contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions whose counterparty name is exactly a name (`tag`: `counterparty`). Only Mercury transactions carry a counterparty. Additional keys: not allowed |
name | string | Required within parent | The counterparty name the transaction must have, matched exactly. |
Create a categorization rule — request body — body / conditions / item / tag: credit Card contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions made with a Mercury credit card (`tag`: `creditCard`). Additional keys: not allowed |
creditCardId | JSON | Required within parent | |
creditCardId (allOf 1) | string | All variants apply | Format: uuid |
creditCardId (allOf 2) | JSON | All variants apply | The ID of the credit card. |
Create a categorization rule — request body — body / conditions / item / tag: custom Category contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions whose current Mercury custom (expense) category is a category (`tag`: `customCategory`). Additional keys: not allowed |
customCategoryId | JSON | Required within parent | |
customCategoryId (allOf 1) | string | All variants apply | ID for the category Format: uuid |
customCategoryId (allOf 2) | JSON | All variants apply | The ID of the custom category. |
Create a categorization rule — request body — body / conditions / item / tag: debit Card contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions made with a Mercury debit card (`tag`: `debitCard`). Additional keys: not allowed |
debitCardId | JSON | Required within parent | |
debitCardId (allOf 1) | string | All variants apply | Format: uuid |
debitCardId (allOf 2) | JSON | All variants apply | The ID of the debit card. |
Create a categorization rule — request body — body / conditions / item / tag: description contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions whose raw bank description contains a text, ignoring case (`tag`: `description`). Additional keys: not allowed |
contains | string | Required within parent | The text the bank description must contain, ignoring case. |
Create a categorization rule — request body — body / conditions / item / tag: user contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions made by a team member (`tag`: `user`). Additional keys: not allowed |
userId | JSON | Required within parent | |
userId (allOf 1) | string | All variants apply | ID for the user Format: uuid |
userId (allOf 2) | JSON | All variants apply | The ID of the user who made the transaction. |
Create a categorization rule — request body — body conditions item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | A condition a transaction must match for a categorization rule to apply. `tag` says which condition it is (`amount`, `description`, `counterparty`, `debitCard`, `creditCard`, `user`, or `customCategory`) and `contents` holds its fields. A rule's conditions must all match; there is no OR, so an "any of" rule is written as separate rules. |
$ (oneOf 1) | object | Alternative | Additional keys: not allowed |
$ (oneOf 1).contents | Model | Required within parent | Expand Create a categorization rule — request body — body / conditions / item / tag: amount contents |
$ (oneOf 1).tag | string | Required within parent | One of: amount |
$ (oneOf 2) | object | Alternative | Additional keys: not allowed |
$ (oneOf 2).contents | Model | Required within parent | Expand Create a categorization rule — request body — body / conditions / item / tag: description contents |
$ (oneOf 2).tag | string | Required within parent | One of: description |
$ (oneOf 3) | object | Alternative | Additional keys: not allowed |
$ (oneOf 3).contents | Model | Required within parent | Expand Create a categorization rule — request body — body / conditions / item / tag: counterparty contents |
$ (oneOf 3).tag | string | Required within parent | One of: counterparty |
$ (oneOf 4) | object | Alternative | Additional keys: not allowed |
$ (oneOf 4).contents | Model | Required within parent | Expand Create a categorization rule — request body — body / conditions / item / tag: debit Card contents |
$ (oneOf 4).tag | string | Required within parent | One of: debitCard |
$ (oneOf 5) | object | Alternative | Additional keys: not allowed |
$ (oneOf 5).contents | Model | Required within parent | Expand Create a categorization rule — request body — body / conditions / item / tag: credit Card contents |
$ (oneOf 5).tag | string | Required within parent | One of: creditCard |
$ (oneOf 6) | object | Alternative | Additional keys: not allowed |
$ (oneOf 6).contents | Model | Required within parent | Expand Create a categorization rule — request body — body / conditions / item / tag: user contents |
$ (oneOf 6).tag | string | Required within parent | One of: user |
$ (oneOf 7) | object | Alternative | Additional keys: not allowed |
$ (oneOf 7).contents | Model | Required within parent | Expand Create a categorization rule — request body — body / conditions / item / tag: custom Category contents |
$ (oneOf 7).tag | string | Required within parent | One of: customCategory |
Referenced models: Create a categorization rule — request body — body / conditions / item / tag: amount contents, Create a categorization rule — request body — body / conditions / item / tag: counterparty contents, Create a categorization rule — request body — body / conditions / item / tag: credit Card contents, Create a categorization rule — request body — body / conditions / item / tag: custom Category contents, Create a categorization rule — request body — body / conditions / item / tag: debit Card contents, Create a categorization rule — request body — body / conditions / item / tag: description contents, Create a categorization rule — request body — body / conditions / item / tag: user contents
Create a categorization rule — request body — body outputs item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | What a categorization rule does to a transaction it matches. `tag` says which output it is and `contents` holds its fields; today the only output is `setLedger`, which categorizes the transaction to the ledger `contents.ledgerId`. Additional keys: not allowed |
contents | Model | Required within parent | Expand Create a categorization rule — request body — body outputs item contents |
tag | string | Required within parent | One of: setLedger |
Referenced models: Create a categorization rule — request body — body outputs item contents
Create a categorization rule — request body — body outputs item contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Sets the transaction's categorization to a ledger, i.e. a general ledger (GL) account (`tag`: `setLedger`). Additional keys: not allowed |
ledgerId | string | Required within parent | The ID of the ledger matching transactions are categorized to. Format: base58 (max length 22) |
Create a categorization rule — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The created categorization rule. |
rule | JSON | Required within parent | |
rule (allOf 1) | Model | All variants apply | Expand List categorization rules — response body — rules item |
rule (allOf 2) | JSON | All variants apply | The created rule, as the list endpoint returns it. |
Referenced models: List categorization rules — response body — rules item
Create an invoice (accounts receivable) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A request to create a single invoice (accounts receivable). Additional keys: not allowed |
customer | JSON | Required within parent | |
customer (allOf 1) | string | All variants apply | The customer who will receive the invoice. Use the /api/v1/ar/customers endpoint to list your customers and find the corresponding id, or create a new customer first. Format: uuid |
customer (allOf 2) | JSON | All variants apply | The customer to bill (the Customer field of the form): a Mercury Invoicing customer ID of this organization, from the Mercury Invoicing customers API (`/ar/customers`). |
dueDate | JSON | Required within parent | |
dueDate (allOf 1) | string | All variants apply | Format: date |
dueDate (allOf 2) | JSON | All variants apply | The due date (the Due date field of the form), YYYY-MM-DD. |
effectiveDate | JSON | Required within parent | |
effectiveDate (allOf 1) | string | All variants apply | Format: date |
effectiveDate (allOf 2) | JSON | All variants apply | The invoice date (the Invoice date field of the form), YYYY-MM-DD. Books records the invoice on the earlier of this and `dueDate`. |
lines | array | Required within parent | The line items (the Line items table of the form). At least one is required. Minimum items: 1 |
lines[] | Model | Each item | Expand Create an invoice (accounts receivable) — request body — body lines item |
notes | JSON | Optional | |
notes (anyOf 1) | string | Alternative | An optional note (the Note field of the form). |
notes (anyOf 2) | null | Alternative | |
referenceNumber | string | Required within parent | The invoice number, as in the Invoice number field of the form (for example `INV-1042`): the number the business gives the invoice and its customer sees. Required, 1 to 299 characters; leading and trailing whitespace is stripped. With the Mercury Invoicing integration it becomes the Mercury Invoicing invoice number and must be unique among all of the organization's Mercury invoices, of any status. Without it, it is stored only in Books, which rejects a second invoice with the same invoice number for the same customer. Maximum length: 299 Minimum length: 1 |
Referenced models: Create an invoice (accounts receivable) — request body — body lines item
Create an invoice (accounts receivable) — request body — body lines item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A line item of the invoice to create. Additional keys: not allowed |
amount | JSON | Required within parent | |
amount (allOf 1) | number | All variants apply | A dollar amount Format: double |
amount (allOf 2) | JSON | All variants apply | The line item's amount, in dollars (the Amount column of the form). May be negative (e.g. a discount line). Zero-amount lines are ignored; at least one line must be non-zero, and the combined total of all lines must be greater than zero. |
description | string | Required within parent | The line item's description (the Description column of the form). Required and non-empty; leading and trailing whitespace is stripped. Maximum length: 1024 Minimum length: 1 |
ledgerId | string | Required within parent | The ledger account to book this line against, such as a revenue ledger (the Ledger account column of the form). Use an ID from getBooksLedgers; it must be in this Books instance and not a Mercury bank-feed ledger. Format: base58 (max length 22) |
Create an invoice (accounts receivable) — response body — customer, due Date, effective Date, gross Amount, message, reference Number, sync Status
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An invoice that was created in Mercury Invoicing but has not synced to Books yet, so it has no Books ID. Returned with HTTP 202. |
customer | JSON | Required within parent | |
customer (allOf 1) | Model | All variants apply | Expand Create an invoice (accounts receivable) — response body — customer, due Date, effective Date, gross Amount, message, reference Number, sync Status customer id, name |
customer (allOf 2) | JSON | All variants apply | The customer the invoice is billed to. |
dueDate | JSON | Required within parent | |
dueDate (allOf 1) | string | All variants apply | Format: date |
dueDate (allOf 2) | JSON | All variants apply | The due date. |
effectiveDate | JSON | Required within parent | |
effectiveDate (allOf 1) | string | All variants apply | Format: date |
effectiveDate (allOf 2) | JSON | All variants apply | The date Books records the invoice on: the earlier of the invoice date and the due date. |
grossAmount | JSON | Required within parent | |
grossAmount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
grossAmount (allOf 2) | JSON | All variants apply | The total of all line items, in dollars. |
message | string | Required within parent | What happened and how to find the invoice once it has synced. |
referenceNumber | string | Required within parent | The invoice number, unique among the organization's Mercury invoices. Once the invoice has synced, filter the invoice list by it to find the invoice. |
syncStatus | JSON | Required within parent | |
syncStatus (allOf 1) | string | All variants apply | Known values: pending |
syncStatus (allOf 2) | JSON | All variants apply | Always `pending`. A created invoice has an `id` instead. |
Referenced models: Create a product — response body — unit Price value, Create an invoice (accounts receivable) — response body — customer, due Date, effective Date, gross Amount, message, reference Number, sync Status customer id, name
Create an invoice (accounts receivable) — response body — customer, due Date, effective Date, gross Amount, message, reference Number, sync Status customer id, name
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The customer an invoice is billed to. The id is a Mercury Invoicing customer id, the one the Invoicing customers API (`/ar/customers`) returns; the name is inlined so a caller needs no second lookup. |
id | JSON | Required within parent | |
id (allOf 1) | string | All variants apply | The customer who will receive the invoice. Use the /api/v1/ar/customers endpoint to list your customers and find the corresponding id, or create a new customer first. Format: uuid |
id (allOf 2) | JSON | All variants apply | The Mercury Invoicing customer ID of the customer. |
name | string | Required within parent | The customer's current name in Mercury Invoicing, also for a customer that has since been deleted there. |
Create ledgers (general ledger accounts) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Request to create general ledgers. Additional keys: not allowed |
ledgers | array | Required within parent | The ledgers to create, from 1 to 100 ('maxBooksAPILedgerWrites'). Minimum items: 1 |
ledgers[] | Model | Each item | Expand Create ledgers (general ledger accounts) — request body — body ledgers item |
Referenced models: Create ledgers (general ledger accounts) — request body — body ledgers item
Create ledgers (general ledger accounts) — request body — body ledgers item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A general ledger to create. Additional keys: not allowed |
debitCredit | JSON | Required within parent | |
debitCredit (allOf 1) | string | All variants apply | One of: debit, credit |
debitCredit (allOf 2) | JSON | All variants apply | Whether the ledger has a debit or credit nature |
name | string | Required within parent | The ledger name Format: size < 256 |
parentId | JSON | Optional | |
parentId (anyOf 1) | string | Alternative | Optional parent ledger, to create this ledger as a child ledger Format: base58 (max length 22) |
parentId (anyOf 2) | null | Alternative | |
sortCode | string | Required within parent | Numeric sort code used to order the ledger in the chart of accounts Format: matches ^[0-9]+$, size < 21 |
subType | JSON | Required within parent | |
subType (allOf 1) | string | All variants apply | One of: currentAssets, nonCurrentAssets, transfersBetweenAccounts, uncategorizedAssets, currentLiabilities, nonCurrentLiabilities, equity, operatingRevenues, otherIncome, costOfGoodsSold, operatingExpenses, otherExpenses, retainedEarnings |
subType (allOf 2) | JSON | All variants apply | The ledger sub-type |
type | JSON | Required within parent | |
type (allOf 1) | string | All variants apply | One of: asset, liability, equity, revenue, expense |
type (allOf 2) | JSON | All variants apply | The ledger type |
Create ledgers (general ledger accounts) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One result per requested ledger, in request order. |
failedCount | JSON | Required within parent | |
failedCount (anyOf 1) | integer | Alternative | How many items in `results` failed, each with an `error`. Zero exactly when every item succeeded. `succeededCount` plus `failedCount` always equals the number of `results`. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
failedCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
results | array | Required within parent | One result per requested ledger, in request order. A failed item does not fail the others. |
results[] | Model | Each item | Expand Create ledgers (general ledger accounts) — response body — results item |
succeededCount | JSON | Required within parent | |
succeededCount (anyOf 1) | integer | Alternative | How many items in `results` succeeded. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
succeededCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Create ledgers (general ledger accounts) — response body — results item
Create ledgers (general ledger accounts) — response body — results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The outcome of creating one requested ledger: exactly one of `ledger` and `error` is set. |
error | JSON | Optional | |
error (anyOf 1) | JSON | Alternative | |
error (anyOf 1) (allOf 1) | Model | All variants apply | Expand Set or clear ledger opening balances — response body — results item error code, message code, message |
error (anyOf 1) (allOf 2) | JSON | All variants apply | Why the ledger was not created, when it wasn't. |
error (anyOf 2) | null | Alternative | |
ledger | JSON | Optional | |
ledger (anyOf 1) | JSON | Alternative | |
ledger (anyOf 1) (allOf 1) | Model | All variants apply | Expand List the live chart of accounts — response body — ledgers item |
ledger (anyOf 1) (allOf 2) | JSON | All variants apply | The created ledger, when it was created. |
ledger (anyOf 2) | null | Alternative |
Referenced models: List the live chart of accounts — response body — ledgers item, Set or clear ledger opening balances — response body — results item error code, message code, message
Create multiple journal entries — request body — body item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Request to create a single journal entry. Additional keys: not allowed |
datetime | JSON | Required within parent | |
datetime (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
datetime (allOf 2) | JSON | All variants apply | The date and time of the journal entry |
description | string | Required within parent | Description of the journal entry Format: size < 513 |
lineEntries | array | Required within parent | The line entries that compose this journal entry |
lineEntries[] | Model | Each item | Expand Create multiple journal entries — request body — body item line Entries item |
Referenced models: Create multiple journal entries — request body — body item line Entries item
Create multiple journal entries — request body — body item line Entries item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A line entry within a journal entry creation request. Additional keys: not allowed |
amount | JSON | Required within parent | |
amount (allOf 1) | number | All variants apply | A dollar amount Format: double |
amount (allOf 2) | JSON | All variants apply | The amount for this line entry |
debitCredit | JSON | Required within parent | |
debitCredit (allOf 1) | string | All variants apply | One of: debit, credit |
debitCredit (allOf 2) | JSON | All variants apply | Whether this line entry is a debit or credit |
description | string | Required within parent | Description of the line entry Format: size < 4001 |
ledgerId | string | Required within parent | The ledger this line entry is posted to Format: base58 (max length 22) |
tagIds | JSON | Optional | |
tagIds (anyOf 1) | array | Alternative | Optional tags to associate with this line entry |
tagIds (anyOf 1)[] | string | Each item | unique id for a tag; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
tagIds (anyOf 2) | null | Alternative |
Create multiple journal entries — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response for a bulk journal entry creation request. |
journalEntries | array | Required within parent | The created journal entries |
journalEntries[] | Model | Each item | Expand List journal entries — response body — journal Entries item |
Referenced models: List journal entries — response body — journal Entries item
Delete ledgers (general ledger accounts) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Request to delete general ledgers. Additional keys: not allowed |
ledgerIds | array | Required within parent | The IDs of the ledgers to delete, from 1 to 100 distinct IDs, processed in order. List a child ledger before its parent: a parent that still has children when it is reached is not deleted. A repeated ID is processed once, at its first position. |
ledgerIds[] | string | Each item | unique id for a ledger; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
Delete ledgers (general ledger accounts) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One result per distinct requested ledger ID, in request order. |
failedCount | JSON | Required within parent | |
failedCount (anyOf 1) | integer | Alternative | How many items in `results` failed, each with an `error`. Zero exactly when every item succeeded. `succeededCount` plus `failedCount` always equals the number of `results`. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
failedCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
results | array | Required within parent | One result per distinct requested ledger ID, in request order. A failed item does not fail the others. |
results[] | Model | Each item | Expand Delete ledgers (general ledger accounts) — response body — results item |
succeededCount | JSON | Required within parent | |
succeededCount (anyOf 1) | integer | Alternative | How many items in `results` succeeded. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
succeededCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Delete ledgers (general ledger accounts) — response body — results item
Delete ledgers (general ledger accounts) — response body — results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The outcome of deleting one requested ledger: `deleted` is true, or `error` says why the ledger was not deleted. |
deleted | boolean | Required within parent | Whether the ledger was deleted. |
error | JSON | Optional | |
error (anyOf 1) | JSON | Alternative | |
error (anyOf 1) (allOf 1) | Model | All variants apply | Expand Set or clear ledger opening balances — response body — results item error code, message code, message |
error (anyOf 1) (allOf 2) | JSON | All variants apply | Why the ledger was not deleted, when it wasn't. |
error (anyOf 2) | null | Alternative | |
ledgerId | string | Required within parent | The requested ledger ID. Format: base58 (max length 22) |
Referenced models: Set or clear ledger opening balances — response body — results item error code, message code, message
Delete multiple journal entries — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Request to delete journal entries. Additional keys: not allowed |
journalEntryIds | array | Required within parent | A list of journal entry ids to delete |
journalEntryIds[] | string | Each item | unique id for a journal entry; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
Edit a bill (accounts payable) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A request to edit a single bill (accounts payable). Every field is optional; an omitted field is left unchanged. Additional keys: not allowed |
dueDate | JSON | Optional | |
dueDate (anyOf 1) | JSON | Alternative | |
dueDate (anyOf 1) (allOf 1) | string | All variants apply | Format: date |
dueDate (anyOf 1) (allOf 2) | JSON | All variants apply | A new due date for the bill. |
dueDate (anyOf 2) | null | Alternative | |
effectiveDate | JSON | Optional | |
effectiveDate (anyOf 1) | JSON | Alternative | |
effectiveDate (anyOf 1) (allOf 1) | string | All variants apply | Format: date |
effectiveDate (anyOf 1) (allOf 2) | JSON | All variants apply | A new effective date for the bill (e.g. the bill date). |
effectiveDate (anyOf 2) | null | Alternative | |
lineChanges | JSON | Optional | |
lineChanges (anyOf 1) | JSON | Alternative | |
lineChanges (anyOf 1) (allOf 1) | Model | All variants apply | Expand Edit a bill (accounts payable) — request body — body line Changes Changes to the bill's line items create, delete, update |
lineChanges (anyOf 1) (allOf 2) | JSON | All variants apply | Changes to the bill's line items. |
lineChanges (anyOf 2) | null | Alternative | |
notes | JSON | Optional | |
notes (anyOf 1) | string | Alternative | New notes or memo for the bill. |
notes (anyOf 2) | null | Alternative | |
referenceNumber | JSON | Optional | |
referenceNumber (anyOf 1) | string | Alternative | A new reference number (e.g. the vendor's bill number). Non-empty; leading and trailing whitespace is stripped. Clearing the reference number is not supported. Maximum length: 299 Minimum length: 1 |
referenceNumber (anyOf 2) | null | Alternative | |
vendor | JSON | Optional | |
vendor (anyOf 1) | JSON | Alternative | |
vendor (anyOf 1) (allOf 1) | string | All variants apply | ID for this books counterparty Format: uuid |
vendor (anyOf 1) (allOf 2) | JSON | All variants apply | A new vendor for the bill, as a canonical Books counterparty ID. Unlike create, a recipient alias is not accepted on edit. |
vendor (anyOf 2) | null | Alternative |
Referenced models: Edit a bill (accounts payable) — request body — body line Changes Changes to the bill's line items create, delete, update
Edit a bill (accounts payable) — request body — body line Changes Changes to the bill's line items create, delete, update
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Changes to a bill's line items: new lines to create, existing lines to update, and existing line IDs to delete. Each list is optional. Additional keys: not allowed |
create | JSON | Optional | |
create (anyOf 1) | array | Alternative | New line items to add to the bill. |
create (anyOf 1)[] | Model | Each item | Expand Create a bill (accounts payable) — request body — body lines item |
create (anyOf 2) | null | Alternative | |
delete | JSON | Optional | |
delete (anyOf 1) | array | Alternative | IDs of existing line items to delete. |
delete (anyOf 1)[] | string | Each item | unique id for an accrual source line; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
delete (anyOf 2) | null | Alternative | |
update | JSON | Optional | |
update (anyOf 1) | array | Alternative | Existing line items to edit. |
update (anyOf 1)[] | Model | Each item | Expand Edit a bill (accounts payable) — request body — body line Changes Changes to the bill's line items create, delete, update update Existing line items to edit item |
update (anyOf 2) | null | Alternative |
Referenced models: Create a bill (accounts payable) — request body — body lines item, Edit a bill (accounts payable) — request body — body line Changes Changes to the bill's line items create, delete, update update Existing line items to edit item
Edit a bill (accounts payable) — request body — body line Changes Changes to the bill's line items create, delete, update update Existing line items to edit item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An edit to an existing bill line item. Every field but the @id@ is optional; an omitted field is left unchanged. Additional keys: not allowed |
amount | JSON | Optional | |
amount (anyOf 1) | JSON | Alternative | |
amount (anyOf 1) (allOf 1) | number | All variants apply | A dollar amount Format: double |
amount (anyOf 1) (allOf 2) | JSON | All variants apply | Amount for this line item. May be negative (e.g. a discount line) but must be non-zero; the combined total of all lines must be greater than zero (enforced by Teal). |
amount (anyOf 2) | null | Alternative | |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | Description of the line item. Non-empty; leading and trailing whitespace is stripped. Maximum length: 1024 Minimum length: 1 |
description (anyOf 2) | null | Alternative | |
id | string | Required within parent | The ID of the line item to update. Format: base58 (max length 22) |
ledgerId | JSON | Optional | |
ledgerId (anyOf 1) | string | Alternative | The ledger account (expense account) to book this line against. Format: base58 (max length 22) |
ledgerId (anyOf 2) | null | Alternative |
Edit a bill (accounts payable) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A bill (accounts payable) recorded in Books, with its lines and the payments applied to it. |
amountRemaining | JSON | Required within parent | |
amountRemaining (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amountRemaining (allOf 2) | JSON | All variants apply | The amount still owed after applied payments, in dollars. |
displayStatus | JSON | Required within parent | |
displayStatus (allOf 1) | string | All variants apply | Known values: open, paid, draft, cancelled, overdue, partiallyPaid, processing |
displayStatus (allOf 2) | JSON | All variants apply | The status as shown to users, derived from `status`, the due date, and payments: also `overdue` (open and past due) and `partiallyPaid` (open with some payment applied). |
dueDate | JSON | Optional | |
dueDate (anyOf 1) | JSON | Alternative | |
dueDate (anyOf 1) (allOf 1) | string | All variants apply | Format: date |
dueDate (anyOf 1) (allOf 2) | JSON | All variants apply | The due date. Omitted when none is set. |
dueDate (anyOf 2) | null | Alternative | |
effectiveDate | JSON | Required within parent | |
effectiveDate (allOf 1) | string | All variants apply | Format: date |
effectiveDate (allOf 2) | JSON | All variants apply | The bill date. |
grossAmount | JSON | Required within parent | |
grossAmount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
grossAmount (allOf 2) | JSON | All variants apply | The total of all lines, in dollars. |
id | string | Required within parent | The identifier of the bill. Format: base58 (max length 22) |
lines | array | Required within parent | The line items. |
lines[] | Model | Each item | Expand Edit a bill (accounts payable) — response body — lines item |
notes | JSON | Optional | |
notes (anyOf 1) | string | Alternative | The bill's notes or memo. Omitted when it has none. |
notes (anyOf 2) | null | Alternative | |
paymentApplications | array | Required within parent | The payments applied. Empty when none. |
paymentApplications[] | Model | Each item | Expand Edit a bill (accounts payable) — response body — payment Applications item |
referenceNumber | JSON | Optional | |
referenceNumber (anyOf 1) | string | Alternative | The bill number. Omitted when it has none. |
referenceNumber (anyOf 2) | null | Alternative | |
status | JSON | Required within parent | |
status (allOf 1) | string | All variants apply | Known values: open, paid, draft, cancelled, processing |
status (allOf 2) | JSON | All variants apply | The stored lifecycle status: `draft`, `open`, `processing`, `paid`, or `cancelled`. |
vendor | JSON | Optional | |
vendor (anyOf 1) | JSON | Alternative | |
vendor (anyOf 1) (allOf 1) | Model | All variants apply | Expand Edit a bill (accounts payable) — response body — vendor id, name id, name |
vendor (anyOf 1) (allOf 2) | JSON | All variants apply | The vendor the bill is owed to. Omitted when the bill has no vendor. |
vendor (anyOf 2) | null | Alternative |
Referenced models: Create a product — response body — unit Price value, Edit a bill (accounts payable) — response body — lines item, Edit a bill (accounts payable) — response body — payment Applications item, Edit a bill (accounts payable) — response body — vendor id, name id, name
Edit a bill (accounts payable) — response body — lines item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A line item of a bill. |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The line's amount, in dollars. |
description | string | Required within parent | The line's description. |
id | string | Required within parent | The identifier of the line. Format: base58 (max length 22) |
ledgerId | string | Required within parent | The identifier of the ledger (general ledger account) the line posts to, such as an expense ledger. Format: base58 (max length 22) |
Referenced models: Create a product — response body — unit Price value
Edit a bill (accounts payable) — response body — payment Applications item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A payment applied to a bill: part or all of a journal entry line entry, such as a bank transaction's, matched against it. |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The amount of the line entry applied to this bill, in dollars. |
lineEntryId | string | Required within parent | The identifier of the line entry applied as payment. Format: base58 (max length 22) |
Referenced models: Create a product — response body — unit Price value
Edit a bill (accounts payable) — response body — vendor id, name id, name
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The vendor a bill is owed to. The id is the Books counterparty id (never a Bill Pay recipient id); the name is inlined because there is no public counterparties endpoint yet, so a bare id would be unusable. |
id | JSON | Required within parent | |
id (allOf 1) | string | All variants apply | ID for this books counterparty Format: uuid |
id (allOf 2) | JSON | All variants apply | The Books counterparty ID of the vendor. This is not a recipient ID. |
name | string | Required within parent | The vendor's name. When the counterparty is linked to a Bill Pay recipient, this is the recipient's current name; otherwise it falls back to the name snapshotted on the Books counterparty. |
Edit an invoice (accounts receivable) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A request to edit a single invoice (accounts receivable). Every field is optional; an omitted field is left unchanged. Additional keys: not allowed |
customer | JSON | Optional | |
customer (anyOf 1) | JSON | Alternative | |
customer (anyOf 1) (allOf 1) | string | All variants apply | The customer who will receive the invoice. Use the /api/v1/ar/customers endpoint to list your customers and find the corresponding id, or create a new customer first. Format: uuid |
customer (anyOf 1) (allOf 2) | JSON | All variants apply | The customer to bill: a Mercury Invoicing customer ID of this organization, from the Mercury Invoicing customers API (`/ar/customers`). An invoice synced with Mercury Invoicing accepts only its current customer. |
customer (anyOf 2) | null | Alternative | |
dueDate | JSON | Optional | |
dueDate (anyOf 1) | JSON | Alternative | |
dueDate (anyOf 1) (allOf 1) | string | All variants apply | Format: date |
dueDate (anyOf 1) (allOf 2) | JSON | All variants apply | A new due date, YYYY-MM-DD. |
dueDate (anyOf 2) | null | Alternative | |
effectiveDate | JSON | Optional | |
effectiveDate (anyOf 1) | JSON | Alternative | |
effectiveDate (anyOf 1) (allOf 1) | string | All variants apply | Format: date |
effectiveDate (anyOf 1) (allOf 2) | JSON | All variants apply | A new invoice date, YYYY-MM-DD. |
effectiveDate (anyOf 2) | null | Alternative | |
lineChanges | JSON | Optional | |
lineChanges (anyOf 1) | JSON | Alternative | |
lineChanges (anyOf 1) (allOf 1) | Model | All variants apply | Expand Edit an invoice (accounts receivable) — request body — body line Changes Changes to the invoice's line items create, delete, update |
lineChanges (anyOf 1) (allOf 2) | JSON | All variants apply | Changes to the invoice's line items. |
lineChanges (anyOf 2) | null | Alternative | |
notes | JSON | Optional | |
notes (anyOf 1) | string | Alternative | A new note for the invoice. |
notes (anyOf 2) | null | Alternative | |
referenceNumber | JSON | Optional | |
referenceNumber (anyOf 1) | string | Alternative | A new invoice number, the number the customer sees (for example `INV-1042`). 1 to 299 characters; leading and trailing whitespace is stripped. Clearing it is not supported. Maximum length: 299 Minimum length: 1 |
referenceNumber (anyOf 2) | null | Alternative |
Referenced models: Edit an invoice (accounts receivable) — request body — body line Changes Changes to the invoice's line items create, delete, update
Edit an invoice (accounts receivable) — request body — body line Changes Changes to the invoice's line items create, delete, update
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Changes to an invoice's line items: new lines to create, existing lines to update, and existing line IDs to delete. Each list is optional. Additional keys: not allowed |
create | JSON | Optional | |
create (anyOf 1) | array | Alternative | New line items to add to the invoice. |
create (anyOf 1)[] | Model | Each item | Expand Create an invoice (accounts receivable) — request body — body lines item |
create (anyOf 2) | null | Alternative | |
delete | JSON | Optional | |
delete (anyOf 1) | array | Alternative | IDs of existing invoice line items to delete. |
delete (anyOf 1)[] | string | Each item | unique id for an accrual source line; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
delete (anyOf 2) | null | Alternative | |
update | JSON | Optional | |
update (anyOf 1) | array | Alternative | Existing invoice line items to edit. |
update (anyOf 1)[] | Model | Each item | Expand Edit an invoice (accounts receivable) — request body — body line Changes Changes to the invoice's line items create, delete, update update Existing invoice line items to edit item |
update (anyOf 2) | null | Alternative |
Referenced models: Create an invoice (accounts receivable) — request body — body lines item, Edit an invoice (accounts receivable) — request body — body line Changes Changes to the invoice's line items create, delete, update update Existing invoice line items to edit item
Edit an invoice (accounts receivable) — request body — body line Changes Changes to the invoice's line items create, delete, update update Existing invoice line items to edit item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An edit to an existing invoice line item. Every field but the `id` is optional; an omitted field is left unchanged. Additional keys: not allowed |
amount | JSON | Optional | |
amount (anyOf 1) | JSON | Alternative | |
amount (anyOf 1) (allOf 1) | number | All variants apply | A dollar amount Format: double |
amount (anyOf 1) (allOf 2) | JSON | All variants apply | The line item's amount, in dollars. May be negative (e.g. a discount line); the combined total of all lines must be greater than zero. |
amount (anyOf 2) | null | Alternative | |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | The line item's description. Non-empty; leading and trailing whitespace is stripped. Maximum length: 1024 Minimum length: 1 |
description (anyOf 2) | null | Alternative | |
id | string | Required within parent | The ID of the invoice line item to update. Format: base58 (max length 22) |
ledgerId | JSON | Optional | |
ledgerId (anyOf 1) | string | Alternative | The ledger account to book this line against, such as a revenue ledger. Use an ID from getBooksLedgers; it must be in this Books instance and not a Mercury bank-feed ledger. Format: base58 (max length 22) |
ledgerId (anyOf 2) | null | Alternative |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An invoice (accounts receivable) recorded in Books, with its lines and the payments applied to it. |
amountRemaining | JSON | Required within parent | |
amountRemaining (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amountRemaining (allOf 2) | JSON | All variants apply | The amount still owed after applied payments, in dollars. |
customer | JSON | Optional | |
customer (anyOf 1) | JSON | Alternative | |
customer (anyOf 1) (allOf 1) | Model | All variants apply | Expand Create an invoice (accounts receivable) — response body — customer, due Date, effective Date, gross Amount, message, reference Number, sync Status customer id, name |
customer (anyOf 1) (allOf 2) | JSON | All variants apply | The customer the invoice is billed to. Omitted when the invoice has no customer. |
customer (anyOf 2) | null | Alternative | |
displayStatus | JSON | Required within parent | |
displayStatus (allOf 1) | string | All variants apply | Known values: open, paid, draft, cancelled, overdue, partiallyPaid, processing |
displayStatus (allOf 2) | JSON | All variants apply | The status as shown to users, derived from `status`, the due date, and payments: also `overdue` (open and past due) and `partiallyPaid` (open with some payment applied). |
dueDate | JSON | Optional | |
dueDate (anyOf 1) | JSON | Alternative | |
dueDate (anyOf 1) (allOf 1) | string | All variants apply | Format: date |
dueDate (anyOf 1) (allOf 2) | JSON | All variants apply | The due date. Omitted when none is set. |
dueDate (anyOf 2) | null | Alternative | |
effectiveDate | JSON | Required within parent | |
effectiveDate (allOf 1) | string | All variants apply | Format: date |
effectiveDate (allOf 2) | JSON | All variants apply | The invoice date. |
grossAmount | JSON | Required within parent | |
grossAmount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
grossAmount (allOf 2) | JSON | All variants apply | The total of all lines, in dollars. |
id | string | Required within parent | The identifier of the invoice. Format: base58 (max length 22) |
lines | array | Required within parent | The line items. |
lines[] | Model | Each item | Expand Edit an invoice (accounts receivable) — response body — amount Remaining, customer, display Status, due Date, effective Date, gross Amount, id, lines, notes, payment Applications, reference Number, status lines item |
notes | JSON | Optional | |
notes (anyOf 1) | string | Alternative | The invoice's note, as shown in the Note field of the Books invoice in Mercury. Omitted when it has none. |
notes (anyOf 2) | null | Alternative | |
paymentApplications | array | Required within parent | The payments applied. Empty when none. |
paymentApplications[] | Model | Each item | Expand Edit an invoice (accounts receivable) — response body — amount Remaining, customer, display Status, due Date, effective Date, gross Amount, id, lines, notes, payment Applications, reference Number, status payment Applications item |
referenceNumber | JSON | Optional | |
referenceNumber (anyOf 1) | string | Alternative | The invoice number, as shown in the Invoice number field of the Books invoice in Mercury (for example `INV-1042`). Omitted when it has none. |
referenceNumber (anyOf 2) | null | Alternative | |
status | JSON | Required within parent | |
status (allOf 1) | string | All variants apply | Known values: open, paid, draft, cancelled, processing |
status (allOf 2) | JSON | All variants apply | The stored lifecycle status: `draft`, `open`, `processing`, `paid`, or `cancelled`. |
Referenced models: Create a product — response body — unit Price value, Create an invoice (accounts receivable) — response body — customer, due Date, effective Date, gross Amount, message, reference Number, sync Status customer id, name, 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 lines item, 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 payment Applications item
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 lines item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A line item of an invoice. |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The line's amount, in dollars. |
description | string | Required within parent | The line's description. |
id | string | Required within parent | The identifier of the line. Format: base58 (max length 22) |
ledgerId | string | Required within parent | The identifier of the ledger account (general ledger, or GL, account) the line posts to, such as a revenue ledger. Format: base58 (max length 22) |
Referenced models: Create a product — response body — unit Price value
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 payment Applications item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A payment applied to an invoice: part or all of a journal entry line entry, such as a bank transaction's, matched against it. |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The amount of the line entry applied to this invoice, in dollars. |
lineEntryId | string | Required within parent | The identifier of the line entry applied as payment. Format: base58 (max length 22) |
Referenced models: Create a product — response body — unit Price value
Edit an invoice (accounts receivable) — response body — id, message, sync Status
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An edit to an invoice synced with Mercury Invoicing that was saved there but has not synced to Books yet. Returned with HTTP 202. |
id | string | Required within parent | The ID of the edited invoice. Format: base58 (max length 22) |
message | string | Required within parent | What happened and when to read the invoice back. |
syncStatus | JSON | Required within parent | |
syncStatus (allOf 1) | string | All variants apply | Known values: pending |
syncStatus (allOf 2) | JSON | All variants apply | Always `pending`. An edit that has synced returns the updated invoice instead. |
List a source account's transactions — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One page of a source account's transactions. |
nextPageToken | JSON | Optional | |
nextPageToken (anyOf 1) | string | Alternative | Present when more transactions match the request. Pass it back as `pageToken`, with the same other parameters, to fetch the next page, and keep doing so until a response has no `nextPageToken`; only then have you seen every transaction in the range. |
nextPageToken (anyOf 2) | null | Alternative | |
prevPageToken | JSON | Optional | |
prevPageToken (anyOf 1) | string | Alternative | Present when there is an earlier page. Pass it back as `pageToken`, with the same other parameters, to fetch the previous page. |
prevPageToken (anyOf 2) | null | Alternative | |
transactions | array | Required within parent | The transactions on this page: at most one page, whose size Books decides, so not necessarily every transaction in the date range. |
transactions[] | Model | Each item | Expand List a source account's transactions — response body — transactions item |
Referenced models: List a source account's transactions — response body — transactions item
List a source account's transactions — response body — transactions item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A transaction imported into Books from a source account (a bank, card, or other feed). Once posted, it has a journal entry with one line on the source account's ledger (`lineEntryId`) and one or more `categorizationLines`. To recategorize it, pass its `journalEntryId` and its current `categorizationLines` IDs as the expected categorization. |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The signed amount, in dollars. A positive amount posts on the source account's `debitCredit` side, increasing its ledger balance; a negative amount posts on the opposite side. Positive is money in for a Mercury bank account and a charge for a Mercury credit card; other source accounts follow their `debitCredit` and the signs their transactions were imported with. |
attachments | JSON | Optional | |
attachments (anyOf 1) | array | Alternative | Files attached to the Mercury transaction, such as receipts. Only included with `enrich=true`. |
attachments (anyOf 1)[] | Model | Each item | Expand List a source account's transactions — response body — transactions item attachments array item |
attachments (anyOf 2) | null | Alternative | |
cardLastFourDigits | JSON | Optional | |
cardLastFourDigits (anyOf 1) | string | Alternative | The last four digits of the card used for the transaction. Only included with `enrich=true`. |
cardLastFourDigits (anyOf 2) | null | Alternative | |
categorizationLines | array | Required within parent | The line entries that categorize the transaction: every other line of its journal entry. Empty when the transaction has no journal entry. |
categorizationLines[] | Model | Each item | Expand Categorize or split transactions — response body — items item categorization Lines item |
categorizationMethod | JSON | Optional | |
categorizationMethod (anyOf 1) | JSON | Alternative | |
categorizationMethod (anyOf 1) (allOf 1) | string | All variants apply | Known values: ai, rules, similarity, transferBetweenAccounts, uncategorized, user |
categorizationMethod (anyOf 1) (allOf 2) | JSON | All variants apply | How the transaction got its current category: `uncategorized` when no categorizer matched it, `user` when a person categorized it, and otherwise the automatic categorizer. Omitted when the transaction has not been categorized. |
categorizationMethod (anyOf 2) | null | Alternative | |
counterpartyName | JSON | Optional | |
counterpartyName (anyOf 1) | string | Alternative | The name of the transaction's counterparty (who the money went to or came from). Only included with `enrich=true`. |
counterpartyName (anyOf 2) | null | Alternative | |
customCategoryId | JSON | Optional | |
customCategoryId (anyOf 1) | string | Alternative | The identifier of the Mercury custom category assigned to the transaction. Only included with `enrich=true`. |
customCategoryId (anyOf 2) | null | Alternative | |
customCategoryName | JSON | Optional | |
customCategoryName (anyOf 1) | string | Alternative | The name of the Mercury custom category assigned to the transaction. Only included with `enrich=true`. |
customCategoryName (anyOf 2) | null | Alternative | |
datetime | JSON | Required within parent | |
datetime (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
datetime (allOf 2) | JSON | All variants apply | When the transaction happened, in UTC. |
description | string | Required within parent | The transaction's description, as imported from its source. Format: size < 513 |
id | string | Required within parent | The unique identifier of the transaction. |
journalEntryId | JSON | Optional | |
journalEntryId (anyOf 1) | string | Alternative | The identifier of the transaction's journal entry. Omitted when the transaction has no journal entry, because it is not posted or its posting was deleted. Format: base58 (max length 22) |
journalEntryId (anyOf 2) | null | Alternative | |
ledgerId | JSON | Optional | |
ledgerId (anyOf 1) | string | Alternative | The identifier of the source account's ledger, which the transaction's own line entry posts to. Format: base58 (max length 22) |
ledgerId (anyOf 2) | null | Alternative | |
lineEntryId | JSON | Optional | |
lineEntryId (anyOf 1) | string | Alternative | The identifier of the transaction's own line entry, on the source account's ledger. Omitted when the transaction has no journal entry. Format: base58 (max length 22) |
lineEntryId (anyOf 2) | null | Alternative | |
merchantType | JSON | Optional | |
merchantType (anyOf 1) | string | Alternative | The display name of the merchant type (Mercury category) automatically assigned to the transaction, such as `Software`. Only included with `enrich=true`. |
merchantType (anyOf 2) | null | Alternative | |
note | JSON | Optional | |
note (anyOf 1) | string | Alternative | The note on the Mercury transaction. Only included with `enrich=true`. |
note (anyOf 2) | null | Alternative | |
personal | boolean | Required within parent | Whether the transaction is a personal (non-business) transaction. |
postedStatus | JSON | Required within parent | |
postedStatus (allOf 1) | string | All variants apply | Known values: notPosted, posted, deleted |
postedStatus (allOf 2) | JSON | All variants apply | Whether the transaction has been posted to the general ledger as a journal entry (`posted`), not yet (`notPosted`), or was posted and then deleted (`deleted`). |
reviewStatus | JSON | Required within parent | |
reviewStatus (allOf 1) | string | All variants apply | Known values: reviewed, unreviewed |
reviewStatus (allOf 2) | JSON | All variants apply | Whether the transaction's categorization has been reviewed. |
sourceAccountId | string | Required within parent | The identifier of the source account the transaction belongs to. Format: base58 (max length 22) |
teamMemberId | JSON | Optional | |
teamMemberId (anyOf 1) | string | Alternative | The identifier of the team member associated with the transaction, such as the cardholder. Only included with `enrich=true`. |
teamMemberId (anyOf 2) | null | Alternative | |
teamMemberName | JSON | Optional | |
teamMemberName (anyOf 1) | string | Alternative | The full name of the team member associated with the transaction. Only included with `enrich=true`. |
teamMemberName (anyOf 2) | null | Alternative | |
transactionMethodKind | JSON | Optional | |
transactionMethodKind (anyOf 1) | JSON | Alternative | |
transactionMethodKind (anyOf 1) (allOf 1) | Model | All variants apply | Expand List a source account's transactions — response body — transactions item transaction Method Kind string string |
transactionMethodKind (anyOf 1) (allOf 2) | JSON | All variants apply | The kind of Mercury transaction, such as a card payment or a wire. Only included with `enrich=true`. |
transactionMethodKind (anyOf 2) | null | Alternative |
Referenced models: Create a product — response body — unit Price value, List a source account's transactions — response body — transactions item transaction Method Kind string string, Categorize or split transactions — response body — items item categorization Lines item, List a source account's transactions — response body — transactions item attachments array item
List a source account's transactions — response body — transactions item attachments array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A file attached to the Mercury banking transaction behind a Books transaction. |
downloadUrl | string | Required within parent | A presigned URL for downloading the attachment, valid for 1 hour. |
fileName | string | Required within parent | The file name of the attachment. |
id | string | Required within parent | The unique identifier of the attachment. |
List a source account's transactions — response body — transactions item transaction Method Kind string string
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | string | Root | Known values: outgoingElectronicPayment, outgoingCheckPayment, endogenousOutgoingAchTransfer, endogenousIncomingAchTransfer, exogenousOutgoingAch, exogenousIncomingAch, incomingCredit, outgoingCredit, incomingDebit, outgoingDebit, internalTransfer, incomingCheck, outgoingInternationalWire, incomingInternationalWire, outgoingDomesticWire, incomingDomesticWire, wireFee, conversionFee, personalBankingSubscriptionFee, billingEngineSubscriptionFee, physicalCardUpgradeFee, exogenousOutgoingCheck, exogenousOutgoingWire, treasuryTransfer, investTransfer, currencyCloudReturn, internationalWirePartnerReturn, internalCreditAccountPayment, autoRoutingTransfer, ventureDebtFunding, ventureDebtRepayment, creditCashbackRewardsDeposit, externalCreditCashbackRewardsDeposit, interestPayment, outgoingProvisionalCredit, incomingProvisionalCredit, lineOfCreditFunding, lineOfCreditRepayment, lineOfCreditInterestRepayment, atmFeeReimbursement, atmFeeReimbursementReversal, expenseReimbursement, requestedPayment, exogenousWireDrawdown, incomingCreditAccountRepayment, cardIntlTransactionFee, cardIntlTransactionFeeRebate, cardIntlTransactionFeeReversal, cardIntlTransactionFeeRebateReversal, externalCreditAccountPayment, realtimePayment, outgoingRealTimePayment, balanceHold, linkedMercuryAccountTransfer |
List bills (accounts payable) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One page of a Books instance's bills. |
bills | array | Required within parent | The bills on this page. |
bills[] | Model | Each item | Expand Edit a bill (accounts payable) — response body |
nextPageToken | JSON | Optional | |
nextPageToken (anyOf 1) | string | Alternative | Present when more results match the request. Pass it back as `pageToken`, with the same other parameters, to fetch the next page, and keep doing so until a response has no `nextPageToken`. |
nextPageToken (anyOf 2) | null | Alternative | |
prevPageToken | JSON | Optional | |
prevPageToken (anyOf 1) | string | Alternative | Present when there is an earlier page. Pass it back as `pageToken`, with the same other parameters, to fetch the previous page. |
prevPageToken (anyOf 2) | null | Alternative |
Referenced models: Edit a bill (accounts payable) — response body
List categorization rules — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A page of a Books instance's categorization rules, in priority order. |
nextPageToken | JSON | Optional | |
nextPageToken (anyOf 1) | string | Alternative | Pass as `pageToken` to fetch the next page, or null on the last page. |
nextPageToken (anyOf 2) | null | Alternative | |
rules | array | Required within parent | The rules on this page, highest priority first. When several rules match a transaction, the first one applies. Rules Books can't represent are omitted. |
rules[] | Model | Each item | Expand List categorization rules — response body — rules item |
Referenced models: List categorization rules — response body — rules item
List categorization rules — response body — rules / item / conditions / item / tag: amount contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions whose amount compares to a threshold (`tag`: `amount`). The amount is signed: money in (credits) is positive and money out (debits) is negative, and the threshold is compared against it as is, so `lessThan` `-50` matches outflows of more than $50. A range is two amount conditions on the same rule. |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The threshold, in dollars. Signed like the transaction amount: positive for money in, negative for money out. |
operator | JSON | Required within parent | |
operator (allOf 1) | string | All variants apply | Known values: lessThan, lessThanOrEqualTo, greaterThan, greaterThanOrEqualTo, equalTo |
operator (allOf 2) | JSON | All variants apply | How to compare the transaction amount to `amount`. |
Referenced models: Create a product — response body — unit Price value
List categorization rules — response body — rules / item / conditions / item / tag: counterparty contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions whose counterparty name is exactly a name (`tag`: `counterparty`). Only Mercury transactions carry a counterparty. |
name | string | Required within parent | The counterparty name the transaction must have, matched exactly. |
List categorization rules — response body — rules / item / conditions / item / tag: credit Card contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions made with a Mercury credit card (`tag`: `creditCard`). |
creditCardId | JSON | Required within parent | |
creditCardId (allOf 1) | string | All variants apply | Format: uuid |
creditCardId (allOf 2) | JSON | All variants apply | The ID of the credit card. |
List categorization rules — response body — rules / item / conditions / item / tag: custom Category contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions whose current Mercury custom (expense) category is a category (`tag`: `customCategory`). |
customCategoryId | JSON | Required within parent | |
customCategoryId (allOf 1) | string | All variants apply | ID for the category Format: uuid |
customCategoryId (allOf 2) | JSON | All variants apply | The ID of the custom category. |
List categorization rules — response body — rules / item / conditions / item / tag: debit Card contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions made with a Mercury debit card (`tag`: `debitCard`). |
debitCardId | JSON | Required within parent | |
debitCardId (allOf 1) | string | All variants apply | Format: uuid |
debitCardId (allOf 2) | JSON | All variants apply | The ID of the debit card. |
List categorization rules — response body — rules / item / conditions / item / tag: description contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions whose raw bank description contains a text, ignoring case (`tag`: `description`). |
contains | string | Required within parent | The text the bank description must contain, ignoring case. |
List categorization rules — response body — rules / item / conditions / item / tag: user contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Matches transactions made by a team member (`tag`: `user`). |
userId | JSON | Required within parent | |
userId (allOf 1) | string | All variants apply | ID for the user Format: uuid |
userId (allOf 2) | JSON | All variants apply | The ID of the user who made the transaction. |
List categorization rules — response body — rules item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A categorization rule: when a transaction matches all its `conditions`, Books applies its `outputs`, such as categorizing the transaction to a ledger. Only rules that Books can represent are listed: a rule with a condition or output outside this vocabulary (for example, an accounting-integration rule that sets a Mercury custom category), or whose GL account no longer maps to a Books ledger, is omitted. |
conditions | array | Required within parent | The conditions a transaction must match. At least one; every condition must match (logical AND). There is no OR: an "any of" rule is written as separate rules. Minimum items: 1 |
conditions[] | Model | Each item | Expand List categorization rules — response body — rules item conditions item |
glCodeName | JSON | Optional | |
glCodeName (anyOf 1) | string | Alternative | The display name of the general ledger (GL) account the rule categorizes to. Absent when the rule sets none. |
glCodeName (anyOf 2) | null | Alternative | |
id | string | Required within parent | The rule's stable identifier. Format: uuid |
lastApplied | JSON | Optional | |
lastApplied (anyOf 1) | JSON | Alternative | |
lastApplied (anyOf 1) (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
lastApplied (anyOf 1) (allOf 2) | JSON | All variants apply | The last time the rule matched a transaction. Absent if it never has. |
lastApplied (anyOf 2) | null | Alternative | |
outputs | array | Required within parent | What the rule applies to a matching transaction. At least one. Minimum items: 1 |
outputs[] | Model | Each item | Expand List categorization rules — response body — rules item outputs item |
status | JSON | Required within parent | |
status (allOf 1) | string | All variants apply | Known values: active, inactive, invalid |
status (allOf 2) | JSON | All variants apply | Whether the rule currently categorizes transactions. |
Referenced models: List categorization rules — response body — rules item conditions item, List categorization rules — response body — rules item outputs item
List categorization rules — response body — rules item conditions item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | A condition a transaction must match for a categorization rule to apply. `tag` says which condition it is (`amount`, `description`, `counterparty`, `debitCard`, `creditCard`, `user`, or `customCategory`) and `contents` holds its fields. A rule's conditions must all match; there is no OR, so an "any of" rule is written as separate rules. |
$ (anyOf 1) | object | Alternative | |
$ (anyOf 1).contents | Model | Required within parent | Expand List categorization rules — response body — rules / item / conditions / item / tag: amount contents |
$ (anyOf 1).tag | string | Required within parent | Known values: amount |
$ (anyOf 2) | object | Alternative | |
$ (anyOf 2).contents | Model | Required within parent | Expand List categorization rules — response body — rules / item / conditions / item / tag: description contents |
$ (anyOf 2).tag | string | Required within parent | Known values: description |
$ (anyOf 3) | object | Alternative | |
$ (anyOf 3).contents | Model | Required within parent | Expand List categorization rules — response body — rules / item / conditions / item / tag: counterparty contents |
$ (anyOf 3).tag | string | Required within parent | Known values: counterparty |
$ (anyOf 4) | object | Alternative | |
$ (anyOf 4).contents | Model | Required within parent | Expand List categorization rules — response body — rules / item / conditions / item / tag: debit Card contents |
$ (anyOf 4).tag | string | Required within parent | Known values: debitCard |
$ (anyOf 5) | object | Alternative | |
$ (anyOf 5).contents | Model | Required within parent | Expand List categorization rules — response body — rules / item / conditions / item / tag: credit Card contents |
$ (anyOf 5).tag | string | Required within parent | Known values: creditCard |
$ (anyOf 6) | object | Alternative | |
$ (anyOf 6).contents | Model | Required within parent | Expand List categorization rules — response body — rules / item / conditions / item / tag: user contents |
$ (anyOf 6).tag | string | Required within parent | Known values: user |
$ (anyOf 7) | object | Alternative | |
$ (anyOf 7).contents | Model | Required within parent | Expand List categorization rules — response body — rules / item / conditions / item / tag: custom Category contents |
$ (anyOf 7).tag | string | Required within parent | Known values: customCategory |
Referenced models: List categorization rules — response body — rules / item / conditions / item / tag: amount contents, List categorization rules — response body — rules / item / conditions / item / tag: counterparty contents, List categorization rules — response body — rules / item / conditions / item / tag: credit Card contents, List categorization rules — response body — rules / item / conditions / item / tag: custom Category contents, List categorization rules — response body — rules / item / conditions / item / tag: debit Card contents, List categorization rules — response body — rules / item / conditions / item / tag: description contents, List categorization rules — response body — rules / item / conditions / item / tag: user contents
List categorization rules — response body — rules item outputs item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | What a categorization rule does to a transaction it matches. `tag` says which output it is and `contents` holds its fields; today the only output is `setLedger`, which categorizes the transaction to the ledger `contents.ledgerId`. |
contents | Model | Required within parent | Expand List categorization rules — response body — rules item outputs item contents |
tag | string | Required within parent | Known values: setLedger |
Referenced models: List categorization rules — response body — rules item outputs item contents
List categorization rules — response body — rules item outputs item contents
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Sets the transaction's categorization to a ledger, i.e. a general ledger (GL) account (`tag`: `setLedger`). |
ledgerId | string | Required within parent | The ID of the ledger matching transactions are categorized to. Format: base58 (max length 22) |
List invoices (accounts receivable) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One page of a Books instance's invoices. |
invoices | array | Required within parent | The invoices on this page. |
invoices[] | Model | Each item | Expand Edit an invoice (accounts receivable) — response body — amount Remaining, customer, display Status, due Date, effective Date, gross Amount, id, lines, notes, payment Applications, reference Number, status |
nextPageToken | JSON | Optional | |
nextPageToken (anyOf 1) | string | Alternative | Present when more results match the request. Pass it back as `pageToken`, with the same other parameters, to fetch the next page, and keep doing so until a response has no `nextPageToken`. |
nextPageToken (anyOf 2) | null | Alternative | |
prevPageToken | JSON | Optional | |
prevPageToken (anyOf 1) | string | Alternative | Present when there is an earlier page. Pass it back as `pageToken`, with the same other parameters, to fetch the previous page. |
prevPageToken (anyOf 2) | null | Alternative |
List journal entries — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response containing a paginated list of journal entries. |
journalEntries | array | Required within parent | The journal entries matching the query |
journalEntries[] | Model | Each item | Expand List journal entries — response body — journal Entries item |
nextPageToken | JSON | Optional | |
nextPageToken (anyOf 1) | string | Alternative | Token to fetch the next page of results |
nextPageToken (anyOf 2) | null | Alternative | |
prevPageToken | JSON | Optional | |
prevPageToken (anyOf 1) | string | Alternative | Token to fetch the previous page of results |
prevPageToken (anyOf 2) | null | Alternative |
Referenced models: List journal entries — response body — journal Entries item
List journal entries — response body — journal Entries item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
accrualSource | JSON | Optional | |
accrualSource (anyOf 1) | JSON | Alternative | |
accrualSource (anyOf 1) (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll |
accrualSource (anyOf 1) (allOf 2) | JSON | All variants apply | The accrual source for the journal entry, if applicable. Included in expanded responses. |
accrualSource (anyOf 2) | null | Alternative | |
autocatResult | JSON | Optional | |
autocatResult (anyOf 1) | JSON | Alternative | |
autocatResult (anyOf 1) (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journal Entries item autocat Result confidence, created At, id, ledger Id, method, rule Id confidence, created At, id, ledger Id, method, rule Id |
autocatResult (anyOf 1) (allOf 2) | JSON | All variants apply | How the transaction underlying this journal entry was auto-categorized (method, confidence, and rule), if any. Null for manual journal entries, entries not categorized by the autocat pipeline, and entries a user has since manually recategorized. Included in expanded responses. |
autocatResult (anyOf 2) | null | Alternative | |
categorizationStatus | JSON | Required within parent | |
categorizationStatus (allOf 1) | string | All variants apply | Known values: pending, delayed, completed, notAttempted |
categorizationStatus (allOf 2) | JSON | All variants apply | The categorization lifecycle status of the journal entry. - `pending`: Uncategorized JE posted at sync, auto-categorization not yet resolved. - `delayed`: Auto-categorization fell back to uncategorized; can still transition to `completed`. - `completed`: Categorization settled (a real category applied, an explicit uncategorized result, or a manually-created JE). - `notAttempted`: Auto-categorization is disabled for the instance, so the JE was booked uncategorized and settled at once; no result will ever arrive. |
creationDate | JSON | Required within parent | |
creationDate (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
creationDate (allOf 2) | JSON | All variants apply | The date and time the journal entry was created |
creationSource | JSON | Required within parent | |
creationSource (allOf 1) | string | All variants apply | Known values: manual, transaction, accrual, paymentApplication, legacy, scheduledAccrual |
creationSource (allOf 2) | JSON | All variants apply | The source that created a journal entry. - `manual`: Created manually by the user via the UI. - `transaction`: Created automatically from a transaction categorization (e.g., Plaid sync). - `accrual`: Created automatically as part of an accrual workflow. - `paymentApplication`: Created automatically as part of a payment application workflow. - `legacy`: Created automatically from the old AR/AP system (receivables/payables). |
datetime | JSON | Required within parent | |
datetime (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
datetime (allOf 2) | JSON | All variants apply | The datetime the Journal Entry was created in UTC time |
description | string | Required within parent | An arbitrary string on the object, useful for displaying to the user. Format: size < 513 |
id | string | Required within parent | The unique ID of the object. Format: base58 (max length 22) |
isOpeningBalance | boolean | Required within parent | Whether the Journal Entry represents an opening balance. |
lineEntries | JSON | Optional | |
lineEntries (anyOf 1) | array | Alternative | List of Line Entries. Included in expanded responses. |
lineEntries (anyOf 1)[] | Model | Each item | Expand List journal entries — response body — journal Entries item line Entries array item |
lineEntries (anyOf 2) | null | Alternative | |
lineEntryIds | JSON | Optional | |
lineEntryIds (anyOf 1) | array | Alternative | The ids of the Line Entries detailing the Journal Entry's movement of value. |
lineEntryIds (anyOf 1)[] | string | Each item | unique id for a line entry; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
lineEntryIds (anyOf 2) | null | Alternative | |
reviewStatus | JSON | Required within parent | |
reviewStatus (allOf 1) | string | All variants apply | Known values: unreviewed, reviewed |
reviewStatus (allOf 2) | JSON | All variants apply | Whether the user has reviewed the journal entry. New journal entries default to `unreviewed`. |
reviewStatusSetAt | JSON | Optional | |
reviewStatusSetAt (anyOf 1) | JSON | Alternative | |
reviewStatusSetAt (anyOf 1) (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
reviewStatusSetAt (anyOf 1) (allOf 2) | JSON | All variants apply | When the review status was last set. Null if the journal entry has never been reviewed. |
reviewStatusSetAt (anyOf 2) | null | Alternative | |
transfer | JSON | Optional | |
transfer (anyOf 1) | JSON | Alternative | |
transfer (anyOf 1) (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journal Entries item transfer from Entry, to Entry from Entry, to Entry |
transfer (anyOf 1) (allOf 2) | JSON | All variants apply | The transfer linking this journal entry to the journal entry on the other side of a transfer between accounts (e.g. Stripe Payouts), if any. Included in expanded responses. |
transfer (anyOf 2) | null | Alternative |
Referenced models: List journal entries — response body — journalEntries / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll, List journal entries — response body — journal Entries item autocat Result confidence, created At, id, ledger Id, method, rule Id confidence, created At, id, ledger Id, method, rule Id, List journal entries — response body — journal Entries item line Entries array item, List journal entries — response body — journal Entries item transfer from Entry, to Entry from Entry, to Entry
List journal entries — response body — journal Entries item autocat Result confidence, created At, id, ledger Id, method, rule Id confidence, created At, id, ledger Id, method, rule Id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The auto-categorization decision recorded for the transaction underlying a journal entry: how its category ledger was assigned. Mirrors AutocatResult from teal-api:teal_api/transaction/schemas.py. |
confidence | JSON | Required within parent | |
confidence (anyOf 1) | number | Alternative | The autocat model's confidence in the assignment, 0.0 to 1.0. Format: double |
confidence (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
createdAt | JSON | Required within parent | |
createdAt (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
createdAt (allOf 2) | JSON | All variants apply | When the autocat result was recorded, in UTC. |
id | string | Required within parent | The unique identifier of the autocat result. |
ledgerId | string | Required within parent | The category ledger autocat assigned to the transaction. Format: base58 (max length 22) |
method | JSON | Required within parent | |
method (allOf 1) | string | All variants apply | Known values: rule, transactionKindDefaults, similarity, embedding, llmClassifier, transfersBetweenAccounts |
method (allOf 2) | JSON | All variants apply | How the category was assigned (rule/transactionKindDefaults/similarity/embedding/llmClassifier/transfersBetweenAccounts). |
ruleId | JSON | Optional | |
ruleId (anyOf 1) | string | Alternative | If method is `rule`, the id of the rule that matched; otherwise null. An opaque identifier supplied by the external categorizer. |
ruleId (anyOf 2) | null | Alternative |
List journal entries — response body — journal Entries item line Entries array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
accrualSource | JSON | Optional | |
accrualSource (anyOf 1) | JSON | Alternative | |
accrualSource (anyOf 1) (allOf 1) | Model | All variants apply | Expand List journal entries — response body — journalEntries / item / lineEntries / array / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll |
accrualSource (anyOf 1) (allOf 2) | JSON | All variants apply | Expandable. The accrual source for the line entry, if any. |
accrualSource (anyOf 2) | null | Alternative | |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | The value of the line entry in decimal dollar cents. |
categorizationStatus | JSON | Required within parent | |
categorizationStatus (allOf 1) | string | All variants apply | Known values: pending, delayed, completed, notAttempted |
categorizationStatus (allOf 2) | JSON | All variants apply | Whether the associated journal entry is still awaiting an auto-categorization result: 'pending' (awaiting), 'delayed' (timed out, a late result may still resolve it), 'completed' (settled, whether by a result or by being manually created), or 'notAttempted' (auto-categorization is disabled for the instance, so no result was ever requested). Both line entries of a journal entry share this value. |
datetime | JSON | Required within parent | |
datetime (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
datetime (allOf 2) | JSON | All variants apply | The datetime the Line Entry was created in UTC time. |
debitCredit | JSON | Required within parent | |
debitCredit (allOf 1) | string | All variants apply | Known values: debit, credit |
debitCredit (allOf 2) | JSON | All variants apply | Indicates if the amount is a credit or debit. |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | An arbitrary string on the object, useful for displaying to the user or for categorization. Format: size < 4001 |
description (anyOf 2) | null | Alternative | |
editable | boolean | Required within parent | Indicates if the Line Entry can be manually added or removed from a Ledger, as dictated by the `editable` property on the Ledger. |
id | string | Required within parent | The unique ID of the object. Format: base58 (max length 22) |
journalEntryDescription | string | Required within parent | An arbitrary string on the object, useful for displaying to the user. Format: size < 513 |
journalEntryId | string | Required within parent | The ID of the associated Journal Entry. Format: base58 (max length 22) |
ledgerId | string | Required within parent | The ID of the Line Entry's Ledger. Format: base58 (max length 22) |
ledgerName | string | Required within parent | The name of the Line Entry's Ledger. |
opposingLedgerIds | JSON | Optional | |
opposingLedgerIds (anyOf 1) | array | Alternative | Expandable. IDs of the ledgers on the other side(s) of the line entry with opposite debit/credit. |
opposingLedgerIds (anyOf 1)[] | string | Each item | unique id for a ledger; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
opposingLedgerIds (anyOf 2) | null | Alternative | |
paymentApplications | JSON | Optional | |
paymentApplications (anyOf 1) | array | Alternative | Payments applied using the Line Entry — source-level (bill/invoice/closing adjustment) and line-level (payroll), tagged on `type`. Contains only the kinds that were expanded: request both `lineEntriesPaymentApplications` and `lineEntriesLinePaymentApplications` for the full set. |
paymentApplications (anyOf 1)[] | Model | Each item | Expand List journal entries — response body — journal Entries item line Entries array item payment Applications array item |
paymentApplications (anyOf 2) | null | Alternative | |
relatedLineEntryId | JSON | Optional | |
relatedLineEntryId (anyOf 1) | string | Alternative | If the Line Entry is identified as a transfer between accounts, the ID of the Line Entry in the opposing Ledger. Related guide: [Auto-categorization](https://docs.teal.dev/guides/platform/categorization/pipeline#transfers-between-accounts) Format: base58 (max length 22) |
relatedLineEntryId (anyOf 2) | null | Alternative | |
sortOrder | JSON | Optional | |
sortOrder (anyOf 1) | JSON | Alternative | |
sortOrder (anyOf 1) (anyOf 1) | integer | Alternative | The position of the line entry within its journal entry, used to determine display order. May be null for rows created before sort_order was introduced. Maximum: 9223372036854776000 Minimum: -9223372036854776000 |
sortOrder (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
sortOrder (anyOf 2) | null | Alternative | |
tags | JSON | Optional | |
tags (anyOf 1) | array | Alternative | The tags associated with the line entry, if any. |
tags (anyOf 1)[] | Model | Each item | Expand List line entries (general ledger activity) across ledgers — response body — line Entries item tags item |
tags (anyOf 2) | null | Alternative | |
transaction | JSON | Optional | |
transaction (anyOf 1) | JSON | Alternative | |
transaction (anyOf 1) (allOf 1) | Model | All variants apply | Expand 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 |
transaction (anyOf 1) (allOf 2) | JSON | All variants apply | Expandable. The associated Transaction object, if one exists. |
transaction (anyOf 2) | null | Alternative | |
transactionId | JSON | Optional | |
transactionId (anyOf 1) | string | Alternative | The ID of the associated Transaction, if one exists. |
transactionId (anyOf 2) | null | Alternative |
Referenced models: List journal entries — response body — journalEntries / item / lineEntries / array / item / accrualSource / type: invoice, bill, payroll type: invoice, bill, payroll, List journal entries — response body — journal Entries item line Entries array item payment Applications array item, List line entries (general ledger activity) across ledgers — response body — line Entries item tags item, 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, Create a product — response body — unit Price value
List journal entries — response body — journal Entries item line Entries array item payment Applications array item
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 — bulkcreatebooksjournalentries__Books Line Entry Line Payment Application, 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
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | JSON | Required within parent | |
amount (allOf 1) | Model | All variants apply | Expand Create a product — response body — unit Price value |
amount (allOf 2) | JSON | All variants apply | the value of the transaction in decimal dollar cents. |
attachments | JSON | Optional | |
attachments (anyOf 1) | array | Alternative | Attachments associated with the transaction from Mercury Banking, if any. Only included if enrichment is requested. |
attachments (anyOf 1)[] | Model | Each item | Expand 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 attachments array item |
attachments (anyOf 2) | null | Alternative | |
cardLastFourDigits | JSON | Optional | |
cardLastFourDigits (anyOf 1) | string | Alternative | The last four digits of the card used for the transaction, if applicable. Only included if enrichment is requested. |
cardLastFourDigits (anyOf 2) | null | Alternative | |
categorizationMethod | JSON | Optional | |
categorizationMethod (anyOf 1) | JSON | Alternative | |
categorizationMethod (anyOf 1) (allOf 1) | string | All variants apply | Known values: aI, rules, similarity, transferBetweenAccounts, uncategorized, user |
categorizationMethod (anyOf 1) (allOf 2) | JSON | All variants apply | how the transaction was assigned its category |
categorizationMethod (anyOf 2) | null | Alternative | |
counterpartyName | JSON | Optional | |
counterpartyName (anyOf 1) | string | Alternative | The name of the transaction counterparty (To/From), if available. Only included if enrichment is requested. |
counterpartyName (anyOf 2) | null | Alternative | |
customCategoryId | JSON | Optional | |
customCategoryId (anyOf 1) | string | Alternative | The unique id of the Banking custom category assigned to this transaction, if any. Only included if enrichment is requested. |
customCategoryId (anyOf 2) | null | Alternative | |
customCategoryName | JSON | Optional | |
customCategoryName (anyOf 1) | string | Alternative | The display name of the Banking custom category assigned to this transaction, if any. Only included if enrichment is requested. |
customCategoryName (anyOf 2) | null | Alternative | |
datetime | JSON | Required within parent | |
datetime (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
datetime (allOf 2) | JSON | All variants apply | the UTC datetime that the Transaction was created. |
description | string | Required within parent | an arbitrary string on the object, useful for displaying information to the user. Descriptions over 512 characters will be truncated. Format: size < 513 |
externalMetadataId | JSON | Optional | |
externalMetadataId (anyOf 1) | string | Alternative | the TransactionMetadataId banking identifier for this transaction |
externalMetadataId (anyOf 2) | null | Alternative | |
id | string | Required within parent | the unique identifier for this transaction |
journalEntryId | JSON | Optional | |
journalEntryId (anyOf 1) | string | Alternative | the ID of the journal entry that the transaction's line entry is associated with. Format: base58 (max length 22) |
journalEntryId (anyOf 2) | null | Alternative | |
ledgerId | JSON | Optional | |
ledgerId (anyOf 1) | string | Alternative | the ID of the financial account ledger associated with the transaction. Format: base58 (max length 22) |
ledgerId (anyOf 2) | null | Alternative | |
lineEntryId | JSON | Optional | |
lineEntryId (anyOf 1) | string | Alternative | the ID of the line entry associated with the transaction Format: base58 (max length 22) |
lineEntryId (anyOf 2) | null | Alternative | |
merchantType | JSON | Optional | |
merchantType (anyOf 1) | JSON | Alternative | |
merchantType (anyOf 1) (allOf 1) | Model | All variants apply | Expand 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 |
merchantType (anyOf 1) (allOf 2) | JSON | All variants apply | The merchant type (Mercury category) automatically assigned to the transaction, along with its display name and icon, if any. Only included if enrichment is requested. |
merchantType (anyOf 2) | null | Alternative | |
note | JSON | Optional | |
note (anyOf 1) | string | Alternative | A note on the transaction set in Mercury Banking, if any. Only included if enrichment is requested. |
note (anyOf 2) | null | Alternative | |
opposingLineEntryIds | JSON | Optional | |
opposingLineEntryIds (anyOf 1) | array | Alternative | a list of IDs of all the line entries objects in the journal entry with the opposite debit/credit status. For example if the transaction's line entry is a debit this opposing line entries will be credit line entries. |
opposingLineEntryIds (anyOf 1)[] | string | Each item | unique id for a line entry; emitted as base-58, but a base-16 UUID is also accepted Format: base58 (max length 22) |
opposingLineEntryIds (anyOf 2) | null | Alternative | |
personal | boolean | Required within parent | whether the transaction is a non-business personal transaction. |
postedStatus | JSON | Required within parent | |
postedStatus (allOf 1) | string | All variants apply | Known values: notPosted, posted, deleted |
postedStatus (allOf 2) | JSON | All variants apply | indicates if the corresponding journal entry and line entries for the transaction have been created. |
reviewStatus | JSON | Required within parent | |
reviewStatus (allOf 1) | string | All variants apply | Known values: reviewed, unreviewed |
reviewStatus (allOf 2) | JSON | All variants apply | indicates if the transaction has been reviewed. |
sourceAccountId | string | Required within parent | the ID of the source account where the transaction is stored. Format: base58 (max length 22) |
teamMemberId | JSON | Optional | |
teamMemberId (anyOf 1) | string | Alternative | The unique id of the team member associated with this transaction, if any. Only included if enrichment is requested. |
teamMemberId (anyOf 2) | null | Alternative | |
teamMemberName | JSON | Optional | |
teamMemberName (anyOf 1) | string | Alternative | The full name of the team member associated with this transaction, if any. Only included if enrichment is requested. |
teamMemberName (anyOf 2) | null | Alternative | |
transactionMethodKind | JSON | Optional | |
transactionMethodKind (anyOf 1) | JSON | Alternative | |
transactionMethodKind (anyOf 1) (allOf 1) | Model | All variants apply | Expand List a source account's transactions — response body — transactions item transaction Method Kind string string |
transactionMethodKind (anyOf 1) (allOf 2) | JSON | All variants apply | The kind of the Mercury Banking transaction, if available. Only included if enrichment is requested. |
transactionMethodKind (anyOf 2) | null | Alternative |
Referenced models: 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 attachments array item, Create a product — response body — unit Price value, 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, List a source account's transactions — response body — transactions item transaction Method Kind string string
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 attachments array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An attachment on a Mercury transaction, including its ID, filename, and a signed download URL. |
downloadUrl | string | Required within parent | A presigned URL for downloading the attachment (valid for 1 hour). |
fileName | string | Required within parent | The filename of the attachment. |
id | string | Required within parent | The unique identifier of the attachment. |
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
Referenced models: Get a card — response body — category Locks item, 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