curl --request DELETE \
--url https://api-{dc}.moengage.com/v1/coupon-list/{coupon_list_id}/files/{coupon_file_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'MOE-APPKEY: <moe-appkey>'{
"error": {
"code": "invalid-request",
"message": "The requested JSON is incorrect. Please verify and try again."
}
}{
"error": {
"code": "request-unauthenticated",
"message": "Your request is unauthorized. Please verify your credentials and try again."
}
}{
"error": {
"code": "request-forbidden",
"message": "Your account does not have access to the Coupon Management features. Contact the MoEngage team for further assistance."
}
}{
"error": {
"code": "unexpected-error",
"message": "Something went wrong with your request. Please contact the MoEngage team for further assistance."
}
}This API removes a specific coupon file from a coupon list. It is useful in scenarios where a test file or incorrect file is inadvertently uploaded, thereby ensuring the accuracy and effectiveness of your coupon list management.
curl --request DELETE \
--url https://api-{dc}.moengage.com/v1/coupon-list/{coupon_list_id}/files/{coupon_file_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'MOE-APPKEY: <moe-appkey>'{
"error": {
"code": "invalid-request",
"message": "The requested JSON is incorrect. Please verify and try again."
}
}{
"error": {
"code": "request-unauthenticated",
"message": "Your request is unauthorized. Please verify your credentials and try again."
}
}{
"error": {
"code": "request-forbidden",
"message": "Your account does not have access to the Coupon Management features. Contact the MoEngage team for further assistance."
}
}{
"error": {
"code": "unexpected-error",
"message": "Something went wrong with your request. Please contact the MoEngage team for further assistance."
}
}Rate Limit
You can delete:- 5 coupon files per minute or
- 50 coupon files per day
Authorizations
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
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
The unique identifier for the coupon list.
The unique identifier for the coupon file.
Response
Success (No content) The request is successful, and the coupon file is deleted.