Skip to main content

Endpoint reference

The complete, always-current endpoint reference is generated from the live API's OpenAPI specification:

Because it is generated straight from the running backend, it never drifts from the real API. All paths are relative to the base URL and require a Bearer token; amounts are in cents and field names are snake_case.

A typical integration flow​

  1. Create the recipient with POST /v1/entities (or reuse an existing one from GET /v1/entities).
  2. (Optional) Preview taxes with POST /v1/taxes/prefill: it answers with the lines as they would be stored and the total, VAT included once. Send origin: "imported" to preview an import instead of a new invoice. For a Spanish autónomo billing a Spanish business, it also adds the IRPF withholding at 15 %; send mode: "resolve" to add nothing and get the total of the lines exactly as sent.
  3. Create the draft with POST /v1/invoices.
  4. Issue it with POST /v1/invoices/{id}/issue: this assigns the invoice number and, for Spanish issuers, reports it to the AEAT.
  5. Download the PDF with GET /v1/invoices/{id}/pdf.
If you are established in Spain

Issuing is blocked until your Veri*Factu authorization is in effect: a signed authorization document that has passed our checks. Until then the invoice stays a draft and issue returns 403 with error: "verifactu_authorization_required". See the Veri*Factu guide.

AI-driven mutations are held for approval

A mutating request made with an API token that does not present a valid X-Human-Proof header is not executed: it is recorded for human review and returns 202 pending_approval. A human then approves (replays) or rejects it. See the AI Audit guide.