Skip to content
PATCH /unified/accounting/invoices/{id}

Path Parameters

idstring
required·

The ID of the resource.

Example: 23423523

Query Parameters

Refer Specifying query parameters in Truto APIs

typestring

The type of the invoice

Possible values:
billinvoice
1 supported1 required
ERPNext
required
Show Truto-specific parameters
integrated_account_idstring · uuid
required·

The ID of the integrated account to use for the request.

Example: 62f44730-dd91-461e-bd6a-aedd9e0ad79d
truto_response_formatstring

The format of the response.

  • unified returns the response with unified mappings applied.
  • raw returns the unprocessed, raw response from the remote API.
  • normalized applies the unified mappings and returns the data in a normalized format.
  • stream returns the response as a stream, which is ideal for transmitting large datasets, files, or binary data. Using streaming mode helps to efficiently handle large payloads or real-time data flows without requiring the entire data to be buffered in memory.
  • debug returns the final unified result alongside raw remote fetch information. The response is an envelope containing result (identical to unified mode output) and debug (with requestUrl, requestOptions, data, responseHeaders, and for list operations: nextCursor, isLooping, isEmptyResult, resultCount). When the upstream body exceeds 1 MiB, data is replaced by { truto_truncated: true, truto_max_bytes, truto_excerpt }. debug is null for static responses or when truto_skip_api_call=true. An integrated account token that cannot read credentials (the kind the connect flow gives a browser) gets a 403 for debug.

Defaults to unified.

Example: unified
Possible values:
unifiedrawnormalizedstreamdebug
truto_ignore_remote_databoolean

Excludes the remote_data attribute from the response.

truto_enforce_write_schemaboolean

Validates the request body against this method's request_body_schema before the request is sent to the underlying integration. When a field marked required is missing, Truto responds 400 with the missing field names under truto_error_insight.missing_required_body_fields instead of forwarding the call. Only the fields documented in request_body_schema are checked. A body carrying a non-empty remote_data object is forwarded unchecked, because remote_data is merged into the provider request and may already carry the required values. A field the mapping always supplies through its default body is treated as present, and a field that is only conditionally required is reported under truto_error_insight.conditionally_required_body_fields rather than rejected. Some integrations declare fields required on update that the provider only requires on create; check meta/{method} for the resource before enabling this on update calls. If you sent an Idempotency-Key and the request was rejected, use a fresh key when you retry with a corrected body: the idempotency cache is keyed on the integrated account, path and key only — it ignores the query string and the body — so reusing the key replays the rejection. Defaults to false, which forwards the request as-is.

truto_exclude_fieldsstring[]

Array of fields to exclude from the response.

Example: truto_exclude_fields[]=id&truto_exclude_fields[]=name
remote_queryRecord<string, any>

Query parameters to pass to the underlying API without any transformations. Refer this guide to see how to structure the query parameters.

Example: remote_query[foo]=bar

Request Body

Refer Writing data using Unified APIs

idstring
required·

The unique identifier for invoices

14 supported
Bexio
supported
Campfire
supported
DualEntry
supported
ERPNext
supported
FreeAgent
supported
FreshBooks
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
Oracle Netsuite
supported
QuickBooks
supported
Rillet
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
ap_accountinteger

Payable account id. Bills only.

1 supported
Campfire
supported
ap_account_idinteger

Payable account. Bills only.

1 supported
DualEntry
supported
ar_accountinteger

Receivable account id. Invoices only.

1 supported
Campfire
supported
ar_account_idinteger

Receivable account. Invoices only.

1 supported
DualEntry
supported
balancenumber

The remaining balance of the invoice

9 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
bank_account_idstring

Bank account shown on the invoice. Invoices only, and REQUIRED on update.

1 supported
Rillet
supported
bill_typestring

Bills only. Defaults to BILL.

Possible values:
BILLPAYROLLREIMBURSEMENT
1 supported
Campfire
supported
BILLPAYROLLREIMBURSEMENT
companystring

The company the invoice belongs to

References: CompanyInfo → id
4 supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Zoho Books
supported
contactobject

Intacct customer; sent as customer.id.

References: Contacts → id
10 supported1 required
Rillet
required
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
idstring
required·

Wave customer id.

namestring

The name of the contact

typestring

The type of the contact - vendor or customer.

currencystring

Zoho currency_id, not the code

10 supported1 required
Rillet
required
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
custom_fieldsobject[]

DualEntry custom field values.

1 supported
DualEntry
supported
discount_typestring

How total_discount is read. Invoices only.

Possible values:
PERCENTAGEFIXED
1 supported
DualEntry
supported
PERCENTAGEFIXED
due_datestring · date

Intacct dueDate.

9 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
etagstring

The unique identifier for the specific version of the resource.

1 supported1 required
Microsoft Dynamics 365 Business Central
required
exchange_ratenumber

FreeAgent exchange_rate.

7 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
impact_datestring · date

General-ledger impact date. Bills only.

1 supported
Rillet
supported
issue_datestring · date

Intacct invoiceDate.

9 supported1 required
Rillet
required
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
line_itemsobject[]

Zoho line_items; omit to leave existing lines untouched on update

8 supported1 required
Rillet
required
Bexio
supported
ERPNext
supported
Moneybird
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
accountstring

Rillet account code. Required on every bill line.

currencystring

The currency of the line item

departmentinteger

Department id for the line.

descriptionstring

The description of the line item

discount_amountnumber

The discount amount for the line item

discount_ratenumber

The discount rate for the line item

exchange_ratenumber

The exchange rate of the currency for the line item

idstring

The unique identifier for line item

itemstring

Wave product id. Required on every line.

namestring

The name of the line item

quantitynumber

Invoices only.

tag_idsinteger[]

Tag ids for the line.

tax_amountnumber

The tax amount for the line item

tax_ratestring

The ID of the tax rate

total_amountnumber

Bills only. Sent as the line amount.

total_line_amountnumber

The total line amount of the line item.

tracking_categoriesobject[]

Tracking categories of the line item

3 properties
idstring

The ID of the tracking category

namestring

The name of the tracking category

optionstring

The option of the tracking category

typestring

The type of the line item

unit_pricenumber

Invoices only. Sent as amount_per_unit.

location_idinteger

Location id. Invoices only.

1 supported
DualEntry
supported
memostring

Intacct description.

6 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
QuickBooks
supported
Zoho Books
supported
numberstring

Intacct invoiceNumber and referenceNumber.

9 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
payment_terms_in_days

FreeAgent payment_terms_in_days, which it REQUIRES on create. Omitted, the mapping derives it from due_date minus issue_date, and falls back to 30 when neither is given.

1 supported
FreeAgent
supported
purchase_order_numberstring

Customer PO reference. Invoices only.

1 supported
Campfire
supported
ref_numberstring

Your own reference for the document.

1 supported
Campfire
supported
remote_dataRecord<string, any>

Any additional data that should be passed as part of the request body. This data is not transformed by Truto and is passed as is to the remote API.

statusstring

DRAFT or SAVED.

Possible values:
draftsubmitteddeletedauthorisedpaidvoideddraftpostedarchivedactivedeleted
8 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
subsidiary_idstring

Rillet subsidiary. Defaults to the organization's primary entity.

1 supported
Rillet
supported
tax_treatmentstring

inclusive = line prices already contain tax (mwst_type 0, mwst_is_net false); exclusive = tax added on top (mwst_type 0, mwst_is_net true), THE DEFAULT; exempt = no tax (mwst_type 2). Verified live: mwst_type 1 books ZERO tax, and omitting the field entirely makes bexio default to exempt and silently discard every tax_rate.

Possible values:
inclusiveexclusiveexempt
1 supported
Bexio
supported
inclusiveexclusiveexempt
term_idinteger

Payment term id.

1 supported
DualEntry
supported
total_amountnumber

Document total.

1 supported
Campfire
supported
total_discountnumber

Document-level discount, sent as discount_value. Invoices only.

5 supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
Zoho Books
supported
total_tax_amountnumber

The total tax amount of the invoice

8 supported
Bexio
supported
ERPNext
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
typestring

Routes to Zoho invoices or bills.

Possible values:
billinvoiceinvoicebillinvoicebillinvoicebillinvoicebillinvoicebill+ 10 more
15 supported11 required
Bexio
required
invoicebill
Campfire
required
invoicebill
DualEntry
required
invoicebill
FreshBooks
required
invoicebill
Moneybird
required
invoicebill
Microsoft Dynamics 365 Business Central
required
invoicebill
Oracle Netsuite
required
invoicebill
Odoo
required
invoicebill
QuickBooks
required
Rillet
required
invoicebill
Zoho Books
required
invoicebill
ERPNext
supported
FreeAgent
supported
Sage Intacct
supported
Xero
supported
user_idinteger

bexio user id to own the invoice.

1 supported
Bexio
supported

Response Body

idstring
required·

The unique identifier for invoices

14 supported
Bexio
supported
Campfire
supported
DualEntry
supported
ERPNext
supported
FreeAgent
supported
FreshBooks
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
Oracle Netsuite
supported
QuickBooks
supported
Rillet
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
balancenumber

The remaining balance of the invoice

9 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
companystring

The company the invoice belongs to

References: CompanyInfo → id
4 supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Zoho Books
supported
contactobject

The contact for whom the invoice is raised.

References: Contacts → id
9 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
idstring

The unique identifier for the contact

namestring

The name of the contact

typestring

The type of the contact - vendor or customer.

created_atstring · date-time

This represents the date when the invoice was created

8 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
currencystring

The currency of the invoice

9 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
due_datestring · date-time

The due date of the invoice

9 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
exchange_ratenumber

The exchange rate of the invoice

7 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
issue_datestring · date-time

The issue date of the invoice

8 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
line_itemsobject[]

The line items of the invoice

7 supported
Bexio
supported
ERPNext
supported
Moneybird
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
accountstring

The ID of the account

currencystring

The currency of the line item

descriptionstring

The description of the line item

exchange_ratenumber

The exchange rate of the currency for the line item

idstring

The unique identifier for line item

itemstring

The ID of the item

namestring

The name of the line item

quantitynumber

The quantity of the line item

tax_ratestring

The ID of the tax rate

total_line_amountnumber

The total line amount of the line item.

tracking_categoriesobject[]

Tracking categories of the line item

3 properties
idstring

The ID of the tracking category

namestring

The name of the tracking category

optionstring

The option of the tracking category

typestring

The type of the line item

unit_pricenumber

The unit price of the line item

memostring

The private note of the invoice

6 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
QuickBooks
supported
Zoho Books
supported
numberstring

The number of the invoice

9 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
paid_on_datestring · date-time

The paid on date of the invoice

2 supported
FreeAgent
supported
Moneybird
supported
paymentsstring[]

List of payment IDs associated with the invoice

References: Payments → id
3 supported
ERPNext
supported
Moneybird
supported
Xero
supported
remote_dataRecord<string, any>

Raw data returned from the remote API call.

statusstring

The status of the invoice

Possible values:
draftsubmitteddeletedauthorisedpaidvoided
8 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
sub_totalnumber

The sub total of the invoice

9 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
total_discountnumber

The total discount of the invoice

5 supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
Zoho Books
supported
total_tax_amountnumber

The total tax amount of the invoice

8 supported
Bexio
supported
ERPNext
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
tracking_categoriesobject[]

Tracking categories of the invoices

2 supported
Moneybird
supported
Xero
supported
idstring

The ID of the tracking category

namestring

The name of the tracking category

optionstring

The option of the tracking category

typestring

The type of the invoice

Possible values:
billinvoice
9 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Oracle Netsuite
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
updated_atstring · date-time

This represents the date when the invoice was updated

9 supported
Bexio
supported
ERPNext
supported
FreeAgent
supported
Moneybird
supported
Microsoft Dynamics 365 Business Central
supported
QuickBooks
supported
Sage Intacct
supported
Xero
supported
Zoho Books
supported
urlsobject[]

The invoice URLs

1 supported
Xero
supported
typestring

Type of invoice URL

urlstring

The invoice URL

truto unified accounting invoices '<resource_id>' \
  -m update \
  -a '<integrated_account_id>' \
  -b '{
  "type": "bill",
  "memo": "your_memo",
  "contact": {},
  "issue_date": "your_issue_date",
  "due_date": "your_due_date",
  "user_id": 0,
  "tax_treatment": "inclusive",
  "company": "your_company",
  "number": "your_number",
  "currency": "your_currency",
  "exchange_rate": 0,
  "total_amount": 0,
  "total_discount": 0,
  "purchase_order_number": "your_purchase_order_number",
  "bill_type": "BILL",
  "ar_account": 0,
  "ap_account": 0,
  "ref_number": "your_ref_number",
  "line_items": [],
  "status": "draft",
  "discount_type": "PERCENTAGE",
  "term_id": 0,
  "ar_account_id": 0,
  "ap_account_id": 0,
  "location_id": 0,
  "custom_fields": [],
  "etag": "your_etag",
  "id": "your_id",
  "total_tax_amount": 0,
  "balance": 0,
  "subsidiary_id": "your_subsidiary_id",
  "impact_date": "your_impact_date",
  "bank_account_id": "your_bank_account_id",
  "remote_data": {}
}' \
  -o json
import Truto from '@truto/truto-ts-sdk';

const truto = new Truto({
  token: '<your_api_token>',
});

const result = await truto.unifiedApi.update(
  'accounting',
  'invoices',
  '<resource_id>',
  {
  "type": "bill",
  "memo": "your_memo",
  "contact": {},
  "issue_date": "your_issue_date",
  "due_date": "your_due_date",
  "user_id": 0,
  "tax_treatment": "inclusive",
  "company": "your_company",
  "number": "your_number",
  "currency": "your_currency",
  "exchange_rate": 0,
  "total_amount": 0,
  "total_discount": 0,
  "purchase_order_number": "your_purchase_order_number",
  "bill_type": "BILL",
  "ar_account": 0,
  "ap_account": 0,
  "ref_number": "your_ref_number",
  "line_items": [],
  "status": "draft",
  "discount_type": "PERCENTAGE",
  "term_id": 0,
  "ar_account_id": 0,
  "ap_account_id": 0,
  "location_id": 0,
  "custom_fields": [],
  "etag": "your_etag",
  "id": "your_id",
  "total_tax_amount": 0,
  "balance": 0,
  "subsidiary_id": "your_subsidiary_id",
  "impact_date": "your_impact_date",
  "bank_account_id": "your_bank_account_id",
  "remote_data": {}
},
  { integrated_account_id: '<integrated_account_id>' }
);

console.log(result);
import asyncio
from truto_python_sdk import TrutoApi

truto_api = TrutoApi(token="<your_api_token>")

async def main():
    result = await truto_api.unified_api.update(
        "accounting",
        "invoices",
        "<resource_id>",
        {
        "type": "bill",
        "memo": "your_memo",
        "contact": {},
        "issue_date": "your_issue_date",
        "due_date": "your_due_date",
        "user_id": 0,
        "tax_treatment": "inclusive",
        "company": "your_company",
        "number": "your_number",
        "currency": "your_currency",
        "exchange_rate": 0,
        "total_amount": 0,
        "total_discount": 0,
        "purchase_order_number": "your_purchase_order_number",
        "bill_type": "BILL",
        "ar_account": 0,
        "ap_account": 0,
        "ref_number": "your_ref_number",
        "line_items": [],
        "status": "draft",
        "discount_type": "PERCENTAGE",
        "term_id": 0,
        "ar_account_id": 0,
        "ap_account_id": 0,
        "location_id": 0,
        "custom_fields": [],
        "etag": "your_etag",
        "id": "your_id",
        "total_tax_amount": 0,
        "balance": 0,
        "subsidiary_id": "your_subsidiary_id",
        "impact_date": "your_impact_date",
        "bank_account_id": "your_bank_account_id",
        "remote_data": {}
},
        {"integrated_account_id": "<integrated_account_id>"}
    )
    print(result)

asyncio.run(main())
curl -X PATCH 'https://api.truto.one/unified/accounting/invoices/{id}?integrated_account_id=<integrated_account_id>' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "bill",
  "memo": "your_memo",
  "contact": {},
  "issue_date": "your_issue_date",
  "due_date": "your_due_date",
  "user_id": 0,
  "tax_treatment": "inclusive",
  "company": "your_company",
  "number": "your_number",
  "currency": "your_currency",
  "exchange_rate": 0,
  "total_amount": 0,
  "total_discount": 0,
  "purchase_order_number": "your_purchase_order_number",
  "bill_type": "BILL",
  "ar_account": 0,
  "ap_account": 0,
  "ref_number": "your_ref_number",
  "line_items": [],
  "status": "draft",
  "discount_type": "PERCENTAGE",
  "term_id": 0,
  "ar_account_id": 0,
  "ap_account_id": 0,
  "location_id": 0,
  "custom_fields": [],
  "etag": "your_etag",
  "id": "your_id",
  "total_tax_amount": 0,
  "balance": 0,
  "subsidiary_id": "your_subsidiary_id",
  "impact_date": "your_impact_date",
  "bank_account_id": "your_bank_account_id",
  "remote_data": {}
}'
const integratedAccountId = '<integrated_account_id>';

const body = {
  "type": "bill",
  "memo": "your_memo",
  "contact": {},
  "issue_date": "your_issue_date",
  "due_date": "your_due_date",
  "user_id": 0,
  "tax_treatment": "inclusive",
  "company": "your_company",
  "number": "your_number",
  "currency": "your_currency",
  "exchange_rate": 0,
  "total_amount": 0,
  "total_discount": 0,
  "purchase_order_number": "your_purchase_order_number",
  "bill_type": "BILL",
  "ar_account": 0,
  "ap_account": 0,
  "ref_number": "your_ref_number",
  "line_items": [],
  "status": "draft",
  "discount_type": "PERCENTAGE",
  "term_id": 0,
  "ar_account_id": 0,
  "ap_account_id": 0,
  "location_id": 0,
  "custom_fields": [],
  "etag": "your_etag",
  "id": "your_id",
  "total_tax_amount": 0,
  "balance": 0,
  "subsidiary_id": "your_subsidiary_id",
  "impact_date": "your_impact_date",
  "bank_account_id": "your_bank_account_id",
  "remote_data": {}
};

const response = await fetch(`https://api.truto.one/unified/accounting/invoices/{id}?integrated_account_id=${integratedAccountId}`, {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.truto.one/unified/accounting/invoices/{id}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
    "integrated_account_id": "<integrated_account_id>"
}
payload = {
    "type": "bill",
    "memo": "your_memo",
    "contact": {},
    "issue_date": "your_issue_date",
    "due_date": "your_due_date",
    "user_id": 0,
    "tax_treatment": "inclusive",
    "company": "your_company",
    "number": "your_number",
    "currency": "your_currency",
    "exchange_rate": 0,
    "total_amount": 0,
    "total_discount": 0,
    "purchase_order_number": "your_purchase_order_number",
    "bill_type": "BILL",
    "ar_account": 0,
    "ap_account": 0,
    "ref_number": "your_ref_number",
    "line_items": [],
    "status": "draft",
    "discount_type": "PERCENTAGE",
    "term_id": 0,
    "ar_account_id": 0,
    "ap_account_id": 0,
    "location_id": 0,
    "custom_fields": [],
    "etag": "your_etag",
    "id": "your_id",
    "total_tax_amount": 0,
    "balance": 0,
    "subsidiary_id": "your_subsidiary_id",
    "impact_date": "your_impact_date",
    "bank_account_id": "your_bank_account_id",
    "remote_data": {}
}

response = requests.patch(url, headers=headers, params=params, json=payload)
print(response.json())