Skip to content

Change the accounting settings

PATCH
/xero
curl --request PATCH \
--url https://example.com/xero \
--header 'Content-Type: application/json' \
--cookie bottle.session_token=<bottle.session_token> \
--data '{ "salesAccountCode": "example", "cashAccountCode": "example", "cardAccountCode": "example", "transferAccountCode": "example", "pullCustomers": true, "pushCustomers": true, "pushInvoices": true, "invoicesFrom": "2026-04-15", "pushOutstanding": true, "pushEmails": true }'

Which account sales land in, which bank accounts payments of each kind went into, and which of the three jobs run.

Media typeapplication/json
object
salesAccountCode
string | null
<= 20 characters
cashAccountCode
string | null
<= 20 characters
cardAccountCode
string | null
<= 20 characters
transferAccountCode
string | null
<= 20 characters
pullCustomers
boolean
pushCustomers
boolean
pushInvoices
boolean
invoicesFrom
string | null format: date
pushOutstanding
boolean
pushEmails
boolean
Examplegenerated
{
"salesAccountCode": "example",
"cashAccountCode": "example",
"cardAccountCode": "example",
"transferAccountCode": "example",
"pullCustomers": true,
"pushCustomers": true,
"pushInvoices": true,
"invoicesFrom": "2026-04-15",
"pushOutstanding": true,
"pushEmails": true
}

As it now stands

Media typeapplication/json
object
status
required
string
Allowed values: off disconnected connected
orgName
required
string | null
connectedBy
required
string | null
salesAccountCode
required
string | null
cashAccountCode
required
string | null
cardAccountCode
required
string | null
transferAccountCode
required
string | null
pullCustomers
required
boolean
pushCustomers
required
boolean
pushInvoices
required
boolean
invoicesFrom
required
string | null format: date
pushOutstanding
required
boolean
pushEmails
required
boolean
xeroRemindersOn
required
boolean | null
ready
required
boolean
lastSyncAt
required
string | null format: date-time
lastError
required
string | null
linked
required
object
customers
required
integer
invoices
required
integer
Example
{
"status": "off"
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not a member, or without the permission this needs

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not connected

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}