Create invoice template
Creates a new invoice template with specified layout and components.
- Validates required fields and component structure
- Ensures unique template names
- Optionally sets as default template Requires admin access.
Headers
The API key to access the admin API
Body
Template configuration including layout, required fields, and display settings
Unique name for the invoice template
"Standard Template"
Template components configuration that defines the invoice layout and content. Includes: - Required fields (invoiceNumber, date, amount, etc.) - Display settings (company details, customer details, line items) - Company information - Tax settings - Custom fields
{
"requiredFields": {
"invoiceNumber": true,
"date": true,
"amount": true,
"customerDetails": true
},
"showCompanyDetails": true,
"showCustomerDetails": true,
"showLineItems": true,
"showPaymentTerms": true,
"showFooter": true,
"showLogo": true,
"companyDetails": {
"companyName": "Company Name",
"companyAddress": "Company Address",
"companyCity": "City",
"companyCountry": "Country",
"companyEmail": "email@company.com",
"logoUrl": "https://example.com/logo.png",
"vatNumber": "123456789"
},
"taxSettings": {
"enabled": true,
"rate": 20,
"label": "VAT"
}
}Set this template as the default template for new invoices
Response
Template created successfully
Unique name for the invoice template
"Standard Template"
Template components configuration that defines the invoice layout and content. Includes: - Required fields (invoiceNumber, date, amount, etc.) - Display settings (company details, customer details, line items) - Company information - Tax settings - Custom fields
{
"requiredFields": {
"invoiceNumber": true,
"date": true,
"amount": true,
"customerDetails": true
},
"showCompanyDetails": true,
"showCustomerDetails": true,
"showLineItems": true,
"showPaymentTerms": true,
"showFooter": true,
"showLogo": true,
"companyDetails": {
"companyName": "Company Name",
"companyAddress": "Company Address",
"companyCity": "City",
"companyCountry": "Country",
"companyEmail": "email@company.com",
"logoUrl": "https://example.com/logo.png",
"vatNumber": "123456789"
},
"taxSettings": {
"enabled": true,
"rate": 20,
"label": "VAT"
}
}Set this template as the default template for new invoices