Skip to main content
PATCH
/
coupon-list
/
{coupon_list_id}
Update a Coupon List
curl --request PATCH \
  --url https://api-0{dc}.moengage.com/v1/coupon-list/{coupon_list_id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'MOE-APPKEY: <moe-appkey>' \
  --data '
{
  "name": "<string>",
  "expires_at": "2023-12-25",
  "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": "<string>",
"label": "<string>",
"expires_at": "<string>",
"status": "<string>",
"total_coupons": 123,
"created_at": "<string>",
"updated_at": "<string>",
"email_alert_subscribers": "<string>",
"alert_conditions": {},
"available_coupons": 123,
"created_by": "<string>",
"_id": "<string>"
}
InformationThis API reactivates the ARCHIVED or EXPIRED coupon list upon modification, provided the list has a future expiration date.

Rate Limit

You can update 100 coupon lists per day.

Authorizations

Authorization
string
header
required

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.

Headers

MOE-APPKEY
string
required

This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).

Path Parameters

coupon_list_id
string
required

The unique identifier for the coupon list.

Body

application/json
name
string

This field contains the new name of the coupon list.

expires_at
string<date>

This field contains the new date of the coupon list in yyyy-mm-dd format.

email_alert_subscribers
string<email>[]

This field consists of the new email address of the coupon list subscriber. The subscriber will receive all the alerts on the coupon list in the email provided in this field.

alert_conditions
object

This object contains the updated details for the alert conditions.

Response

Success Indicates that the request is successful and the coupon list update request is accepted.

name
string

This field consists of the updated name of the coupon list.

label
string

This field consists of the label name for the coupon list.

expires_at
string

This field contains the updated expiration date of the coupon list in yyyy-mm-dd format.

status
string

This field consists of the status of the coupon list.

Note: You can only update active coupon lists.

total_coupons
integer

This field consists of the total number of coupons in the coupon list.

created_at
string

This field consists of the date and time the coupon list was created.

updated_at
string

This field consists of the date and time of the most recent update to the coupon list.

email_alert_subscribers
string

This field contains the subscriber's updated email address on the coupon list.

alert_conditions
object

This field consists of the updated alert conditions and the statuses specified for the coupon list.

available_coupons
integer

This field consists of the available number of coupons in coupon list.

created_by
string

This field consists of the user name who created the coupon list.

_id
string

This field contains the unique ID of the coupon list requested for update. This ID is used in the params to fetch and archive coupon lists.