Start connecting Xero
POST
/xero/connect
const url = 'https://example.com/xero/connect';const options = { method: 'POST', 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 POST \ --url https://example.com/xero/connect \ --cookie bottle.session_token=<bottle.session_token>Answers with the Xero page to send the browser to. Xero sends it back to /xero/callback, which finishes the connection and returns the browser to the accounting settings.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Where to go
Media typeapplication/json
object
url
required
string format: uri
Examplegenerated
{ "url": "https://example.com"}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" } ]}Xero is not configured on this installation
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}