Where the business stands with Xero
GET
/xero
const url = 'https://example.com/xero';const options = { method: 'GET', headers: {cookie: 'bottle.session_token=<bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/xero \ --cookie bottle.session_token=<bottle.session_token>Whether Xero is on for this installation, whether this business has connected an organisation, the accounts chosen, which jobs run, and what the last sync said.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The connection
Media typeapplication/json
object
status
required
string
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"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}