Existing customer? Sign In
Below is the JSON used to create the returns form above. All the attributes within the data parameter are non-mandatory. Supply only what you want to populate on the document.
{
"template": "returns_form",
"data": {
"order_number": "1893",
"order_date": "02/29/2024",
"return_from": {
"name": "Casey Williams",
"address1": "57 Parkway, 5th Floor",
"address2": "New York, NY 10013",
"telephone": "+1 212-608-5983"
},
"return_to": {
"name": "Acme Returns",
"address1": "787 Brunswick",
"address2": "Los Angeles, CA 50028",
"telephone": "4444 555 555"
},
"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
}
],
"message_title": "Thanks for your business!",
"message_body": "Please complete the above form and return it with the items carefully packed.",
"company": {
"logo": "https://docamatic.s3.eu-west-1.amazonaws.com/assets/logo.png",
"name": "Acme",
"address": "787 Brunswick, Los Angeles, CA 50028",
"contact": "support@acme.com / 4444 555 555",
"website": "acme.com",
"facebook": true,
"instagram": true,
"twitter": true,
"vat_number": "103472324283"
},
"color": "#000000",
"barcode": 1893
}
}
It's easy to change the look and feel of the returns form. The template API allows you to easily insert your own logo and specify a custom font.
{
"template": "returns_form",
"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": "returns_form",
"file_type": "png",
"data" : {...}
}
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 returns form above!
Back to templates