Configure PDF invoice branding and regenerate invoices
/admin/api/invoice-settings
Get the tenant's invoice branding and generation configuration.
/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.
/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.
/admin/api/invoice-settings
Get the tenant's invoice branding and generation configuration.
{
"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
}
curl "https://yourshop.zeroshop.io/admin/api/invoice-settings" \
-H "Authorization: Bearer zspat_..."
import requests
resp = requests.get(
"https://yourshop.zeroshop.io/admin/api/invoice-settings",
headers={"Authorization": "Bearer zspat_..."}
)
settings = resp.json()
const resp = await fetch(
"https://yourshop.zeroshop.io/admin/api/invoice-settings",
{ headers: { "Authorization": "Bearer zspat_..." } }
);
const settings = await resp.json();
require "net/http"
require "json"
uri = URI("https://yourshop.zeroshop.io/admin/api/invoice-settings")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer zspat_..."
resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
settings = JSON.parse(resp.body)
/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.
{
"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"
}
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"}'
import requests
resp = requests.patch(
"https://yourshop.zeroshop.io/admin/api/invoice-settings",
headers={"Authorization": "Bearer zspat_..."},
json={"enabled": True, "company_name": "Acme Coffee Co.", "accent_color": "#059669"}
)
# 204 No Content on success
const resp = await fetch(
"https://yourshop.zeroshop.io/admin/api/invoice-settings",
{
method: "PATCH",
headers: {
"Authorization": "Bearer zspat_...",
"Content-Type": "application/json"
},
body: JSON.stringify({ enabled: true, company_name: "Acme Coffee Co.", accent_color: "#059669" })
}
);
// 204 No Content on success
require "net/http"
require "json"
uri = URI("https://yourshop.zeroshop.io/admin/api/invoice-settings")
req = Net::HTTP::Patch.new(uri)
req["Authorization"] = "Bearer zspat_..."
req.content_type = "application/json"
req.body = { enabled: true, company_name: "Acme Coffee Co.", accent_color: "#059669" }.to_json
resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
# 204 No Content on success
/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.
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | required | Order ID |
{
"invoice_url": "https://cdn.zeroshop.io/tenants/abc/invoices/INV-2026-000123.pdf"
}
curl -X POST "https://yourshop.zeroshop.io/admin/api/orders/482/invoice/regenerate" \
-H "Authorization: Bearer zspat_..."
import requests
resp = requests.post(
"https://yourshop.zeroshop.io/admin/api/orders/482/invoice/regenerate",
headers={"Authorization": "Bearer zspat_..."}
)
invoice_url = resp.json()["invoice_url"]
const resp = await fetch(
"https://yourshop.zeroshop.io/admin/api/orders/482/invoice/regenerate",
{
method: "POST",
headers: { "Authorization": "Bearer zspat_..." }
}
);
const { invoice_url } = await resp.json();
require "net/http"
require "json"
uri = URI("https://yourshop.zeroshop.io/admin/api/orders/482/invoice/regenerate")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer zspat_..."
resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(resp.body)
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.