billing
POST /v1/accounting/xero/sync
Push outstanding invoices to Xero now.
Autenticazione
Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione billing.invoice.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.
Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
curl -X POST https://api.zinndigital.com/v1/accounting/xero/sync \
-H "Authorization: Bearer zdk_live_…"Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
Runs a batch immediately instead of waiting for the hourly sweep. Idempotent: every invoice carries a deterministic reference and the engine searches Xero for it before creating anything, so pressing this twice cannot produce two invoices in the customer's books. `409` means the connection needs reconnecting. Nothing is lost in that state — outstanding invoices stay queued and are sent on reconnect. Requires `billing.invoice.manage`.
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
pushed | integer | Sì | — |
failed | integer | Sì | — |
remaining | integer | Sì | Still outstanding after this batch. ⛔ Reported so a client never infers "finished" from a short batch — some rows may have failed rather than completed. |
connection | XeroConnection | No | An organization's link to its own Xero. ⛔ `needs_reconnect` is a distinct state from `not_connected` on purpose — see `getMyXeroConnection`. |
Errori che questo endpoint può restituire
401 · 403 · 404 · 409 · 429