v1
latestOpenAPI 3.0.32026-07-24235275.4 KBOffers
Add discount codes
Note: Once the offer(s) has been created, please reach out to an Attentive team member to enable this API feature for you
Make a call to this asynchronous endpoint to create new discount codes in an existing offer.
<h2>Validation rules</h2> <ul> <li>Maximum of 200,000 discount codes per request.</li> <li><code>distributionStart</code> must be before <code>distributionStop</code>, in UTC ISO format (e.g., <code>2023-02-14T21:29:25Z</code>).</li> <li>Date ranges must not overlap with ranges from previous uploads to the same offer. Uploading to an existing range is allowed.</li> <li>All uploads in an offer must use the same distribution type. If previous uploads include expiration dates, new uploads must also include them, and vice versa.</li> <li>The offer (coupon pool) must exist and belong to your account.</li> </ul> <h2>Sync behavior</h2> Check the status on the offer to monitor progress. If it still says <strong>SYNCING</strong>, the uploads may not be ready yet.post/coupons/coupon-pool/{coupon-pool-id}/create
Path parameters
coupon-pool-idinteger required
The ID created under "Create an Offer"
Request body
Example request
{
"codes": [
"code1",
"code2",
"code3",
"code4",
"code5"
],
"distributionStart": "2023-02-14T21:29:25Z",
"distributionStop": "2023-02-15T21:29:25Z"
}Response
Accepted. Check the Attentive Offers page to make sure that there are no errors and the remaining code count is accurate.