billing
POST /v1/accounting/xero/connect
Begin connecting this organization's Xero.
Authentication
Send an API key as a bearer token. The key must carry the billing.invoice.manage permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/accounting/xero/connect \
-H "Authorization: Bearer zdk_live_…"Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Returns the Xero authorization URL to send the customer to. The URL carries a signed, short-lived `state` that names the organization and the actor — the callback has no other authority, because Xero redirects a browser to it with no credential of ours. `409 ACCOUNTING_CONNECTION_REFUSED` means **our** Xero application has no free organization slot, not that the caller did anything wrong. `422 FEATURE_NOT_INCLUDED` means the plan does not include accounting sync and it has not been bought as an add-on. Requires `billing.invoice.manage`.
Response
| Name | Type | Required | What it is |
|---|---|---|---|
authorizeUrl | string | Yes | Send the customer here. Carries a signed, short-lived state; do not modify it. |
Errors this endpoint can return
401 · 403 · 409 · 422 · 429