Existing customer? Sign In
Below is the JSON used to create the invoice above. All the attributes within the data parameter are non-mandatory. Supply only what you want to populate on the document.
{
"template": "invoice4",
"data": {
"title": "Invoice",
"color": "#000000",
"logo": "https://docamatic.s3.eu-west-1.amazonaws.com/assets/logo.png",
"invoice_number_label": "Invoice #:",
"invoice_number": "101842",
"date_label": "Invoice Date:",
"date": "Nov 24, 2025",
"date_due_label": "Due Date:",
"date_due": "Dec 24, 2025",
"company_name": "Acme",
"company_address1": "787 Brunswick",
"company_address2": null,
"company_city": "Los Angeles",
"company_state": "CA",
"company_zip": "50028",
"company_country": "USA",
"company_telephone": "4444 555 555",
"company_email": "support@acme.com",
"company_website": null,
"vat_number_label": "VAT #:",
"company_vat": "234234",
"bill_to_label": "Bill To",
"bill_to_name": "Casey Williams",
"bill_to_company": null,
"bill_to_address1": "57 West 57th Street",
"bill_to_address2": null,
"bill_to_city": "New York",
"bill_to_state": "NY",
"bill_to_zip": "10451",
"bill_to_country": "USA",
"bill_to_telephone": "2126 085 983",
"bill_to_email": "casey@test.com",
"bill_to_vat": "938231",
"telephone_label": "Tel.",
"description_label": "Description",
"quantity_label": "Quantity",
"price_label": "Price",
"tax_label": "Tax",
"total_label": "Total",
"items": [
{
"name": "Pursuit Running Shoes",
"description": "Men's Pursuit Running Shoes - 10/M",
"quantity": "1",
"price": "$149.00",
"total": "$149.00"
},
{
"name": "Shelby Boots",
"description": "Men's Shelby Leather Boots - 10/M",
"quantity": "2",
"price": "$99.00",
"original_price": "$119.00",
"total": "$198.00"
}
],
"discount_label": "Discount",
"discount": null,
"subtotal_label": "Subtotal",
"subtotal": "$347.00",
"shipping_label": "Shipping",
"shipping": null,
"sales_tax_label": "Sales Tax (10%)",
"sales_tax": "$34.70",
"invoice_total_label": "Total",
"total": "$391.70",
"notes_label": "Notes",
"notes": "It was wonderful doing business with you. Thank you!"
}
}
It's easy to change the look and feel of the invoice. The template API allows you to easily insert your own logo and specify a custom font.
{
"template": "invoice4",
"font": "Open Sans",
"font_size": 0.9,
"font_color": "#32325d",
"data" : {...}
}
By default all templates are generated as a PDF document. If you would like to generate as a PNG or WEBP image, supply the file_type parameter in your API request:
{
"template": "invoice4",
"file_type": "png",
"data" : {...}
}
Not a developer? No problem! Docamatic's Zapier integration allows you to easily generate invoices without coding.
If you prefer to build your own templates or require more flexibility, be sure to try our HTML to PDF API . We are using the same HTML to PDF API to generate the invoice above!
Back to templates