Skip to content

The REST API

Generate, send and fetch invoices and templates from your own systems with a per-store API key.

Enterprise PlusUpdated 2026-11-12

Authentication

Create a key under Settings → API Keys and send it as X-Api-Key or Authorization: Bearer. Keys are scoped to one store. Requests are limited to 120 a minute per key and bodies to 64 KB (a larger body answers 413). An address that tries 20 different invalid keys in a minute gets a 429 until the minute ends; a key the app has already accepted is not affected.

Endpoints

POST /api/v1/invoices/generate       generate (or reuse) a PDF → document_id + 15-minute download URL
POST /api/v1/invoices/send           generate (or reuse) and email; optional additional_recipients (≤5)
GET  /api/v1/invoices/:order_id      current document: number, template, version_count, URL
GET  /api/v1/templates               custom templates + the active template per document type
GET  /api/v1/templates/:id           one template with its files, CSS, blocks and settings
GET  /api/v1/documents/:id/download  302 to a signed URL (?redirect=false for JSON)

Request Shape

POST /api/v1/invoices/send
X-Api-Key: sk_live_…
Content-Type: application/json

{ "order_id": 7183970107474, "document_type": "invoice", "additional_recipients": ["accounts@example.com"] }

order_id accepts a numeric id or a full GID; document_type is invoice or estimate (estimates take a draft order id). Every response is an envelope: { ok: true, … } or { ok: false, error: { code, message } }. Plan-limit failures answer 429 with a Retry-After header (the seconds until your billing period renews), render or send failures 422, a deleted order 404, a path that does not exist a JSON 404 (not_found), and a document that is already being processed 409 (try again in a minute). Generate answers archived: "existing" when the new render is identical to the saved PDF: nothing new is stored and it is not counted toward your monthly limit.

Reference

The full contract is published as an OpenAPI 3 document at /openapi.yaml; open it in Swagger Editor, Redoc or Postman to browse every endpoint, parameter and response. The API Keys page's Using the API card shows a quick-start curl example; paste in the key you copied when you created it (a key is shown only once).

Was this guide missing something? Tell us and we will fix it.

Contact Us