List invoices by integration state
GET/v1/invoices
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.
Keyset paging on (updated_at, id): follow next_cursor. pendingIntegration lists what a claim can take (90/91 and 92 whose lease ran out). external_id_1..3 finds invoices by what an acknowledgement or result stored (any state unless state narrows it). An invoice you claimed or acknowledged carries its lease_token, so a later run can post its result. A key limited to organizations sees only its organizations' invoices.
Request
Responses
- 200
- 400
A page of invoices
Missing or invalid state, bad cursor or limit