Skip to content

Confirm which Xero organisation to connect before syncing

POST
/xero/selection
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" }'
Media typeapplication/json
object
organisationId
required
string
>= 1 characters <= 100 characters

Example generated

{
"organisationId": "example"
}

The confirmed connection

Media typeapplication/json
object
status
required
string
Allowed values: off disconnected connected
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
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"
}
]
}

Xero is not configured

Media typeapplication/json
object
error
required
string
message
required
string

Example

{
"error": "not_found",
"message": "Customer not found"
}