A discount coupon with a large offer, a description, an optional minimum spend, the coupon code with a barcode for use in store, the expiry date, the terms and the steps to redeem it. Offers for online use only leave out the barcode. Download the Word file to adapt it to your brand, then generate a coupon for every campaign.
Upload the voucher template, then send the structured data to get the finished document. Make sure to replace YOUR_API_KEY with your unique key and YOUR_TEMPLATE_ID with the ID of your template.
Send an array of JSON objects and get one document for each object, returned in a ZIP archive. Use the output_name parameter to customize each filename with the merge tags from your template.
curl -X 'POST' \
'https://api.docugenerate.com/v1/document' \
-H 'Accept: application/json' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"template_id": "YOUR_TEMPLATE_ID",
"output_format": ".pdf",
"data": {
"brand_name": "Urban Roast",
"discount_value": "25% OFF",
"offer_title": "Your next coffee order",
"offer_detail": "Take 25% off any drink or pastry order, from the first cup to the last crumb.",
"has_min_spend": true,
"min_spend": "15.00",
"currency": "USD",
"in_store": true,
"coupon_code": "WELCOME25",
"expiry_date": "December 31, 2026",
"terms": [
"One use per customer.",
"Cannot be combined with other offers.",
"Not valid on gift cards."
],
"steps": [
"Add your items to the cart, or tell the cashier you have a coupon.",
"Enter the code at checkout, or show the barcode.",
"Enjoy your discount."
]
}
}' curl -X 'POST' \
'https://api.docugenerate.com/v1/document' \
-H 'Accept: application/json' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"template_id": "YOUR_TEMPLATE_ID",
"output_format": ".pdf",
"single_file": false,
"output_name": "Discount Coupon [coupon_code]",
"data": [
{ "brand_name": "Urban Roast", "discount_value": "25% OFF", "offer_title": "Your next coffee order", "offer_detail": "Take 25% off any drink or pastry order, from the first cup to the last crumb.", "has_min_spend": true, "min_spend": "15.00", "currency": "USD", "in_store": true, "coupon_code": "WELCOME25", "expiry_date": "December 31, 2026", "terms": ["One use per customer.","Cannot be combined with other offers.","Not valid on gift cards."], "steps": ["Add your items to the cart, or tell the cashier you have a coupon.","Enter the code at checkout, or show the barcode.","Enjoy your discount."] },
{ "brand_name": "Urban Roast", "discount_value": "$5 OFF", "offer_title": "Your next food order", "offer_detail": "Take $5 off any food order, from breakfast bowls to lunch sandwiches.", "has_min_spend": true, "min_spend": "20.00", "currency": "USD", "in_store": true, "coupon_code": "FOOD5", "expiry_date": "January 31, 2027", "terms": ["One use per customer.","Cannot be combined with other offers.","Not valid on gift cards."], "steps": ["Add your items to the cart, or tell the cashier you have a coupon.","Enter the code at checkout, or show the barcode.","Enjoy your discount."] },
{ "brand_name": "Urban Roast", "discount_value": "BUY 1 GET 1", "offer_title": "A free pastry with any coffee", "offer_detail": "Buy any coffee and get a pastry of your choice free.", "has_min_spend": false, "min_spend": "", "currency": "USD", "in_store": true, "coupon_code": "PASTRY1", "expiry_date": "November 30, 2026", "terms": ["One use per customer.","Cannot be combined with other offers.","Not valid on gift cards."], "steps": ["Add your items to the cart, or tell the cashier you have a coupon.","Enter the code at checkout, or show the barcode.","Enjoy your discount."] },
{ "brand_name": "Urban Roast", "discount_value": "15% OFF", "offer_title": "Your first online order", "offer_detail": "Take 15% off your first order in our online shop, from beans to brewing gear.", "has_min_spend": true, "min_spend": "25.00", "currency": "USD", "in_store": false, "coupon_code": "FIRSTBEANS15", "expiry_date": "December 31, 2026", "terms": ["One use per customer.","Cannot be combined with other offers.","Not valid on gift cards."], "steps": ["Add your items to the cart, or tell the cashier you have a coupon.","Enter the code at checkout, or show the barcode.","Enjoy your discount."] },
{ "brand_name": "Urban Roast", "discount_value": "30% OFF", "offer_title": "Whole bean coffee bags", "offer_detail": "Take 30% off any 1 kg bag of whole bean coffee, in store.", "has_min_spend": false, "min_spend": "", "currency": "USD", "in_store": true, "coupon_code": "BEANS30", "expiry_date": "December 15, 2026", "terms": ["One use per customer.","Cannot be combined with other offers.","Not valid on gift cards."], "steps": ["Add your items to the cart, or tell the cashier you have a coupon.","Enter the code at checkout, or show the barcode.","Enjoy your discount."] },
{ "brand_name": "Urban Roast", "discount_value": "FREE SHIPPING", "offer_title": "On online orders", "offer_detail": "Free delivery on any online order of coffee beans, anywhere in the US.", "has_min_spend": true, "min_spend": "35.00", "currency": "USD", "in_store": false, "coupon_code": "SHIPFREE", "expiry_date": "January 15, 2027", "terms": ["One use per customer.","Cannot be combined with other offers.","Not valid on gift cards."], "steps": ["Add your items to the cart, or tell the cashier you have a coupon.","Enter the code at checkout, or show the barcode.","Enjoy your discount."] },
{ "brand_name": "Urban Roast", "discount_value": "$10 OFF", "offer_title": "Your next group order", "offer_detail": "Take $10 off orders of 6 or more drinks for your team.", "has_min_spend": true, "min_spend": "30.00", "currency": "USD", "in_store": true, "coupon_code": "TEAM10", "expiry_date": "February 28, 2027", "terms": ["One use per customer.","Cannot be combined with other offers.","Not valid on gift cards."], "steps": ["Add your items to the cart, or tell the cashier you have a coupon.","Enter the code at checkout, or show the barcode.","Enjoy your discount."] },
{ "brand_name": "Urban Roast", "discount_value": "20% OFF", "offer_title": "A coffee subscription", "offer_detail": "Take 20% off the first three months of any coffee subscription.", "has_min_spend": false, "min_spend": "", "currency": "USD", "in_store": false, "coupon_code": "SUBSCRIBE20", "expiry_date": "March 31, 2027", "terms": ["One use per customer.","Cannot be combined with other offers.","Not valid on gift cards."], "steps": ["Add your items to the cart, or tell the cashier you have a coupon.","Enter the code at checkout, or show the barcode.","Enjoy your discount."] },
{ "brand_name": "Urban Roast", "discount_value": "SIZE UPGRADE", "offer_title": "On any hot drink", "offer_detail": "Upgrade any hot drink to the next size at no cost.", "has_min_spend": false, "min_spend": "", "currency": "USD", "in_store": true, "coupon_code": "UPSIZE", "expiry_date": "December 20, 2026", "terms": ["One use per customer.","Cannot be combined with other offers.","Not valid on gift cards."], "steps": ["Add your items to the cart, or tell the cashier you have a coupon.","Enter the code at checkout, or show the barcode.","Enjoy your discount."] },
{ "brand_name": "Urban Roast", "discount_value": "10% OFF", "offer_title": "Your birthday week", "offer_detail": "Show this coupon during your birthday week and take 10% off your order.", "has_min_spend": false, "min_spend": "", "currency": "USD", "in_store": true, "coupon_code": "BDAY10", "expiry_date": "December 31, 2027", "terms": ["One use per customer.","Cannot be combined with other offers.","Not valid on gift cards."], "steps": ["Add your items to the cart, or tell the cashier you have a coupon.","Enter the code at checkout, or show the barcode.","Enjoy your discount."] }
]
}' Questions frequently asked about our voucher templates
Get started with 20 free documents per month and our ready-to-use voucher templates.