Invoices

Configure PDF invoice branding and regenerate invoices

GET /admin/api/invoice-settings

Get the tenant's invoice branding and generation configuration.

Response 200

{
  "enabled": true,
  "logo_url": "https://cdn.zeroshop.io/tenants/abc/logo.png",
  "company_name": "Acme Coffee Co.",
  "company_address": "123 Roasters Lane\nPortland, OR 97201\nUSA",
  "tax_id": "US-12-3456789",
  "footer_text": "Payment due within 30 days. Thank you for your business.",
  "accent_color": "#059669",
  "number_prefix": "INV",
  "generate_on": "on_payment",
  "custom_template": null
}

Example

curl "https://yourshop.zeroshop.io/admin/api/invoice-settings" \
  -H "Authorization: Bearer zspat_..."
PATCH /admin/api/invoice-settings

Update invoice branding and generation settings. Omit a field to leave it unchanged. Set custom_template to null to clear a custom Tera template.

Request Body

{
  "enabled": true,
  "logo_url": "https://cdn.zeroshop.io/tenants/abc/logo.png",
  "company_name": "Acme Coffee Co.",
  "company_address": "123 Roasters Lane\nPortland, OR 97201",
  "tax_id": "US-12-3456789",
  "footer_text": "Payment due within 30 days.",
  "accent_color": "#059669",
  "number_prefix": "INV",
  "generate_on": "on_payment"
}

Response 204

Example

curl -X PATCH "https://yourshop.zeroshop.io/admin/api/invoice-settings" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{"enabled": true, "company_name": "Acme Coffee Co.", "accent_color": "#059669"}'
POST /admin/api/orders/{id}/invoice/regenerate

Regenerate the PDF invoice for an order. Re-renders the HTML template, converts to PDF, uploads to storage, and updates the order's invoice_url. Useful after editing company details or fixing a template.

Parameters

Name Type Required Description
id integer required Order ID

Response 200

{
  "invoice_url": "https://cdn.zeroshop.io/tenants/abc/invoices/INV-2026-000123.pdf"
}

Example

curl -X POST "https://yourshop.zeroshop.io/admin/api/orders/482/invoice/regenerate" \
  -H "Authorization: Bearer zspat_..."

We value your privacy

We use cookies for essential site functionality and, with your consent, analytics to understand how our platform is used. No personal data is shared with third parties. See our Privacy Policy for details.