billing
POST /v1/accounting/xero/sync
Push outstanding invoices to Xero now.
Аутентификация
Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение billing.invoice.manage; ключ без него отклоняется с кодом 403, а не 404.
Этот эндпоинт не принимает идентификатор организации. Ваш ключ уже определяет организацию, к которой он принадлежит, и ответ ограничивается ее рамками.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X POST https://api.zinndigital.com/v1/accounting/xero/sync \
-H "Authorization: Bearer zdk_live_…"Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в 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. |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 409 · 429