Skip to main content

Claim invoices for integration

POST 

/v1/invoices/claim

ERP posting: list or claim the invoices waiting for integration, read each one (GET /invoices/{token}), post it in the ERP, then acknowledge and report the result. Or subscribe to the invoice.ready_for_integration webhook instead of polling.

A claim leases the invoices (60 to 1,800 seconds). Every later call for a claimed invoice (status 92 or 93) carries the claim's lease_token: without it 409 lease_token_required; with another one 409 lease_mismatch. A lease that ran out still works until someone else claims the invoice; such an invoice is claimable again (re-offer), so a crashed worker never strands an invoice. Release gives an invoice back.

Takes free invoices only. With an idempotency_key the same API user gets its live leases for that key back first (extended), so a retry after a network error is safe; the Idempotency-Key header replays the whole answer.

Request​

Responses​

The leases (possibly empty)