Skip to main content

Templates API

Create and manage reusable invoice presentation and default document settings.

Templates control invoice presentation, branding, default currency, invoice number prefix, payment terms, notes, and terms and conditions.

/v1/receivables/templates

Endpoints and Schemas

MethodPathRequest schemaSuccess response
GET/query: limit, offsetTemplatesResponse
POST/CreateTemplateRequestTemplateResponse
GET/defaultnoneTemplateResponse
GET/{id}noneTemplateResponse
PATCH/{id}UpdateTemplateRequestTemplateResponse
DELETE/{id}noneDeleteTemplateResponse
POST/{id}/set-defaultnoneTemplateResponse
POST/{id}/duplicatenoneTemplateResponse

Create Request

FieldTypeNeededDefault or constraint
namestringyes1–255 characters.
templateTypeenumnodefault, modern, classic, minimal, or professional; default default.
baseColorstringnoHex brand color; default #3B82F6.
modeenumnolight or dark; default light.
currencystringnoISO 4217 code; default USD.
prefixstringnoDefault invoice number prefix; default INV-.
paymentTermsstringnoDefault Net 30.
notesstring or nullnoDefault invoice footer notes.
termsstring or nullnoDefault terms and conditions.
isDefaultbooleannoDefault false; setting true unsets the previous default.
{
  "name": "Northwind Standard",
  "templateType": "professional",
  "baseColor": "#1D4ED8",
  "mode": "light",
  "currency": "USD",
  "prefix": "NW-",
  "paymentTerms": "Net 30",
  "notes": "Thank you for your business.",
  "isDefault": true
}

Response Contract

TemplateResponse.data includes the saved fields plus id, userId, createdAt, and updatedAt. The built-in template can use the literal identifier system-default. Custom templates use UUIDs.

Updates are partial. Invoices and PDFs from before the update can keep their saved presentation or content. Regenerate a document only after you confirm the intended invoice state.

Default and Deletion Behavior

Only one template can be default at a time. Fetch /default when you create a new invoice. Do not cache the default indefinitely. If historical continuity matters, duplicate or retire a template in your client workflow. Do not assume that deletion changes the documents that you already issued.

We use cookies to improve your experience, analyze traffic, and personalize content.