Confirm which Xero organisation to connect before syncing
POST
/xero/selection
const url = 'https://example.com/xero/selection';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"organisationId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/xero/selection \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "organisationId": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
organisationId
required
string
Example generated
{ "organisationId": "example"}Responses
Section titled “Responses”The confirmed connection
Media typeapplication/json
object
status
required
string
orgName
required
string | null
connectedBy
required
string | null
salesAccountCode
required
string | null
rentAccountCode
required
string | null
depositAccountCode
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
retryAt
required
string | null format: date-time
lastError
required
string | null
linked
required
object
customers
required
integer
invoices
required
integer
Example
{ "status": "off"}Sign in first
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}An owner or admin session is required
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}The selection expired, is invalid, or another organisation is connected
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Choose an organisation
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" } ]}Xero is not configured
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}