Skip to main content
PATCH

Authorizations

Authorization
string
header
required

Enter your API key with the Bearer prefix — e.g. Bearer sk_live_xxx (production) or Bearer sk_test_xxx (sandbox)

Headers

X-End-User-Id
string
required

Identifier of the end user whose connected provider should be queried. This is the same endUserId you supplied when creating the connect token. Required on every CRM and accounting call.

Example:

"user-001"

Path Parameters

resource
enum<string>
required

Canonical accounting resource type to patch. Must be one of the values in the enum below. RouteMCP maps this to the equivalent provider-native object (e.g. invoice → QuickBooks Online Invoice/Bill, Xero Invoice, Zoho Books Invoice). Read-only resources — reports, bank feeds, general_ledger_transaction, address, phone_number, and transaction — cannot be patched.

Available options:
invoice,
contact,
account,
payment,
tax_rate,
journal_entry,
expense,
purchase_order,
sales_order,
credit_note,
vendor_credit,
company_info,
item,
tracking_category,
accounting_period,
payment_method,
payment_term,
address,
attachment,
balance_sheet,
bank_feed_account,
bank_feed_transaction,
cash_flow_statement,
employee,
expense_report,
general_ledger_transaction,
income_statement,
item_fulfillment,
phone_number,
project,
transaction
id
string
required

Provider-native record id. This is the id as it appears in the source system (e.g. a HubSpot contact id, a Pipedrive deal id, a QuickBooks invoice id). Use the remote_id field returned by the list endpoint.

Example:

"12345"

Query Parameters

provider
string
required

Provider slug identifying which connected provider to target (e.g. hubspot, pipedrive, zoho-crm, quickbooks-online, xero, zoho-books). Required — single-record operations always target a specific provider.

Example:

"hubspot"

Body

application/json

Partial update (PATCH) — every field is optional. Only fields present in the body are written; everything else is left untouched on the record.

type
enum<string>

AR invoice or AP bill (no separate Bill resource exists).

Available options:
ACCOUNTS_RECEIVABLE,
ACCOUNTS_PAYABLE
Example:

"ACCOUNTS_RECEIVABLE"

contact
string

UUID of the associated contact (customer for AR, vendor for AP).

Example:

"019d04a5-contact-uuid-here"

number
string

Provider-native document number (invoice number, PO number, expense number, etc.).

Example:

"INV-2026-0001"

issue_date
string

Date the document was issued (ISO 8601 date).

Example:

"2026-05-01"

due_date
string

Date payment is due (ISO 8601 date).

Example:

"2026-05-31"

paid_on_date
string

Date the document was paid in full (ISO 8601 date). null until paid.

Example:

"2026-05-25"

memo
string

Free-text memo / private note. May not be visible to the counterparty depending on the provider.

Example:

"Net 30 — Q2 services"

company
string

UUID of the company this record belongs to (used by multi-entity providers).

Example:

"019d04a5-2012-7119-bc07-75c081250434"

employee
string

UUID of the associated employee.

Example:

"019d04a5-employee-uuid"

currency
string

ISO 4217 currency code (e.g. USD, EUR, GBP).

Example:

"USD"

exchange_rate
string

Stringified decimal exchange rate from currency to the company's base currency. 1.0 when they match.

Example:

"1.0"

payment_term
string

UUID of the associated payment term.

Example:

"019d04a5-term-uuid"

total_discount
number

Total discount applied to the document, in currency.

Example:

0

sub_total
number

Document subtotal before tax and discount, in currency.

Example:

1500

status
enum<string>

Lifecycle status. One of DRAFT, OPEN, SUBMITTED, PARTIALLY_PAID, PAID, VOID. Mapped to the closest provider-native value.

Available options:
PAID,
DRAFT,
SUBMITTED,
PARTIALLY_PAID,
OPEN,
VOID
Example:

"PAID"

total_tax_amount
number

Total tax amount on the document, in currency.

Example:

120

total_amount
number

Document grand total (subtotal + tax − discount), in currency.

Example:

1620

balance
number

Outstanding balance on the document, in currency. 0 when fully paid.

Example:

0

tracking_categories
string[]

UUIDs of tracking categories (classes / locations / departments) attached to this record.

Example:
accounting_period
string

UUID of the accounting period this record belongs to.

Example:

"019d04a5-period-uuid"

purchase_orders
string[]

UUIDs of associated purchase orders.

Example:
sales_orders
string[]

UUIDs of associated sales orders.

Example:
line_items
Invoice Line Item · object[]

Line items that make up the document.

inclusive_of_tax
boolean

true when total_amount (and unit_price on line items) already include tax. false when tax is added on top.

Example:

false

integration_params
object

Provider-specific passthrough fields.

Example:

Response

Resource partially updated

Standard envelope returned by PUT /accounting/{resource}/{id} and PATCH /accounting/{resource}/{id}. Contains the record as it exists after the write. The shape of data depends on the {resource} path parameter — see the tabs to switch between resource variants.

success
boolean
required

Always true for successful (2xx) responses.

Example:

true

statusCode
integer
required

HTTP status code mirrored inside the envelope.

Example:

200

message
string
required
Example:

"OK"

data
Invoice · object
required

Fields present on every accounting resource returned by RouteMCP.