EDistribution API

Download an invoice PDF#

GET/v1/invoices/{id}/pdf

The invoice as a GST-format PDF, group-scoped exactly like GET /v1/invoices/{id}.

A PDF that was never stored is rendered on demand rather than 404'd. An invoice is legally issued the moment it is numbered, so a render that failed at issue is logged and does not unissue it — which leaves a real state in which the document exists and its rendering does not. This endpoint renders it, stores it and serves it, so the next reader is served from storage. The document is a rendering of the invoice row and nothing else; regenerating it changes no figure on the invoice.

A DRAFT has no PDF and never will: it carries no invoice number, and a document that looks like a numbered tax invoice without being one can be forwarded, filed and paid against. That is a 409, not a 404 — the invoice exists, the document does not.

Request

cURL
curl -X GET 'https://partner-api.elivaas.com/v1/invoices/{id}/pdf' \
  -u "$ELIVAAS_API_KEY:" \
  -H 'Content-Type: application/json'

Path parameters#

idstring<uuid>required

The invoice id.

Responses#

StatusMeaning
200The PDF.
400Validation failure. The message names the offending parameter. Limits are rejected, never silently clamped: an over-length id list, a page size above 100 or a date window longer than 365 days all land here rather than coming back quietly truncated.
401Missing, malformed, revoked or unknown API key, or an agent group whose distribution access is disabled. Pass the key as the HTTP Basic username with an empty password.
404No such invoice for this agent group — identical for an unknown id and for another group's invoice.
409The invoice is still a DRAFT and has no document.
429Rate limit exhausted for this credential. Wait Retry-After seconds before retrying; the budget is per credential, not per IP.

See Errors for the error body shape and which statuses are worth retrying.