billing
POST /v1/accounting/xero/sync
Push outstanding invoices to Xero now.
Упълномощаване
Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението billing.invoice.manage; ключ без него се отхвърля с 403, а не с 404.
Този ендпойнт не изисква идентификатор на организация. Вашият ключ вече идентифицира организацията, към която принадлежи, и отговорът е ограничен до нея.
Опитайте
Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.
curl -X POST https://api.zinndigital.com/v1/accounting/xero/sync \
-H "Authorization: Bearer zdk_live_…"Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата
Детайли
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`.
Отговор
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
pushed | integer | Да | — |
failed | integer | Да | — |
remaining | integer | Да | 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 | Не | An organization's link to its own Xero. ⛔ `needs_reconnect` is a distinct state from `not_connected` on purpose — see `getMyXeroConnection`. |
Грешки, които този крайpoint може да върне
401 · 403 · 404 · 409 · 429