Invoice Template

Generate this PDF document with a simple API request or via Zapier

Invoice (detailed)

Example JSON

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": "invoice1",
    "data": {
        "order_number": "1893",
        "order_date": "02/29/2024",
        "shipping": "FedEx (10292838282)",
        "total_items": 2,
        "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": "+1 212-608-5983",
        "ship_to_name": "Casey Williams",
        "ship_to_company": null,
        "ship_to_address1": "57 West 57th Street",
        "ship_to_address2": null,
        "ship_to_city": "New York",
        "ship_to_state": "NY",
        "ship_to_zip": "10451",
        "ship_to_country": "USA",
        "ship_to_telephone": "+1 212-608-5983",
        "items": [
            {
                "image": "https://docamatic.s3-eu-west-1.amazonaws.com/assets/shoe.jpg",
                "description": "Men's Pursuit Running Shoes - 10/M - BLACK",
                "sku": "PRS3000011-AH",
                "barcode": 3000011303023329,
                "quantity": 2,
                "original_price": "$249.00",
                "price": "$149.00",
                "total": "298.00"
            }
        ],
        "note": "Please gift wrap",
        "discount": "-$5.00",
        "subtotal": "$200.00",
        "shipping_total": "$10.00",
        "sales_tax_percentage": "10%",
        "sales_tax": "$15.00",
        "total": "$300.00",
        "message_title": "Thanks for your business!",
        "message_body": "If you have any questions please get in contact with us.",
        "company_logo": "https://docamatic.s3.eu-west-1.amazonaws.com/assets/logo.png",
        "company_name": "Acme",
        "company_address": "787 Brunswick, Los Angeles, CA 50028",
        "company_contact": "support@acme.com / 4444 555 555",
        "company_website": "acme.com",
        "company_facebook": true,
        "company_instagram": true,
        "company_twitter": true,
        "company_vat_number": "103472324283",
        "color": "#000000",
        "barcode": 1893,
        "qr": null
    }
}
    

Styling

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": "invoice1",
    "font": "Open Sans",
    "font_size": 0.9,
    "font_color": "#32325d",
    "data" : {...}
}
    

Generate as PDF or Image

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": "invoice1",
    "file_type": "png",
    "data" : {...}
}
    

Auto Generate Invoices with Zapier

Not a developer? No problem! Docamatic's Zapier integration allows you to easily generate invoices without coding.

Zapier and Docamatic

Need a custom template?

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