Create a Coupon List
curl --request POST \
--url https://api-{dc}.moengage.com/v1/coupon-list \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"label": "<string>",
"expires_at": "2023-12-25",
"created_by": "<string>",
"email_alert_subscribers": [
"[email protected]"
],
"alert_conditions": {
"success_alert": true,
"failure_alert": true,
"coupon_shortage_alert": {
"alert": true,
"threshold_count": 123
},
"expiry_alert": {
"alert": true,
"days_before": 123
}
}
}
'{
"name": "Example Name",
"label": "Sample Label",
"expires_at": "2024-10-31T18:29:00",
"created_by": "John",
"email_alert_subscribers": [
"[email protected]"
],
"alert_conditions": {
"success_alert": true,
"failure_alert": true,
"expiry_alert": {
"alert": true,
"days_before": 1
},
"coupon_shortage_alert": {
"alert": true,
"threshold_count": 10
}
},
"status": "ACTIVE",
"_id": "6721d00eefc476c0f67e0d05"
}Create a Coupon List
This API creates single-use coupon codes. You can use this API to create and organize distinct lists for different coupon code categories.
POST
/
coupon-list
Create a Coupon List
curl --request POST \
--url https://api-{dc}.moengage.com/v1/coupon-list \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"label": "<string>",
"expires_at": "2023-12-25",
"created_by": "<string>",
"email_alert_subscribers": [
"[email protected]"
],
"alert_conditions": {
"success_alert": true,
"failure_alert": true,
"coupon_shortage_alert": {
"alert": true,
"threshold_count": 123
},
"expiry_alert": {
"alert": true,
"days_before": 123
}
}
}
'{
"name": "Example Name",
"label": "Sample Label",
"expires_at": "2024-10-31T18:29:00",
"created_by": "John",
"email_alert_subscribers": [
"[email protected]"
],
"alert_conditions": {
"success_alert": true,
"failure_alert": true,
"expiry_alert": {
"alert": true,
"days_before": 1
},
"coupon_shortage_alert": {
"alert": true,
"threshold_count": 10
}
},
"status": "ACTIVE",
"_id": "6721d00eefc476c0f67e0d05"
}InformationThis API creates the coupon list with basic specifications only. The coupons should be added using Upload the Coupons API to this coupon list before utilizing it in campaigns.
Rate Limit
You can create 100 coupon lists per day.承認
Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.
- Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
- Password: Use your API Key, which you can find within the Campaign report/Business events/Custom templates/Catalog API/Inform Report tile.
For more information on authentication and getting your credentials, refer here.
ボディ
application/json
レスポンス
Success Indicates that the request is successful and the coupon list creation request is accepted.