Un coupon de réduction avec une grande offre, une description, un montant minimum d’achat facultatif, le code du coupon avec un code-barres pour une utilisation en magasin, la date d’expiration, les conditions et les étapes pour en bénéficier. Les offres réservées à une utilisation en ligne n’ont pas de code-barres. Téléchargez le fichier Word pour l’adapter à votre marque, puis générez un coupon pour chaque campagne.
Importez le modèle, puis envoyez les données structurées pour obtenir le document final. Pensez à remplacer YOUR_API_KEY par votre clé unique et YOUR_TEMPLATE_ID par l'ID de votre modèle.
Envoyez un tableau d'objets JSON et recevez un document par objet, dans une archive ZIP. Utilisez le paramètre output_name pour nommer chaque fichier avec les balises de fusion de votre modèle.
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 fréquentes sur nos modèles de bons
Démarrez avec 20 documents gratuits par mois et nos modèles de bons prêts à l'emploi.