billing

POST /v1/accounting/xero/sync

Push outstanding invoices to Xero now.

Todos os endpoints de billing

Autenticação

Envie uma chave de API como um token de portador. A chave deve ter a permissão billing.invoice.manage; uma chave sem ela é recusada com 403, e não 404.

Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.

Experimente

Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.

curl -X POST https://api.zinndigital.com/v1/accounting/xero/sync \
  -H "Authorization: Bearer zdk_live_…"

Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API

Detalhes

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`.

Resposta

NomeTipoObrigatórioO que é
pushedintegerSim
failedintegerSim
remainingintegerSimStill outstanding after this batch. ⛔ Reported so a client never infers "finished" from a short batch — some rows may have failed rather than completed.
connectionXeroConnectionNãoAn organization's link to its own Xero. ⛔ `needs_reconnect` is a distinct state from `not_connected` on purpose — see `getMyXeroConnection`.

Erros que este endpoint pode retornar

401 · 403 · 404 · 409 · 429