Delete Promotion Codes

delete
Delete a promotion code

https://api.moltin.com/v2/promotions/:id/codes/:code
This endpoint allows you to delete a single promotion code
Request
Response
Path Parameters
id
required
string
ID of the promotion associated with the codes
Headers
Authorization
required
string
The bearer token to grant access to the API
204: No Content
This response indicates your delete request has succeeded
cURL
curl -X DELETE https://api.moltin.com/v2/promotions/:id/codes/:code \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json"

delete
Delete multiple promotion codes

https://api.moltin.com/v2/promotions/:id/codes
This endpoint allows you to delete one or more promotion codes
Request
Response
Path Parameters
id
required
string
ID of the promotion associated with the codes
Headers
Authorization
required
string
The bearer token to grant access to the API
Body Parameters
codes[].code
required
object
the code you want to delete
codes[]
required
array
an array of codes
type
required
string
promotion_codes
204: No Content
This response indicates your delete request has succeeded
cURL
curl -X DELETE https://api.moltin.com/v2/promotions/:id/codes \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data":{
"type":"promotion_codes",
"codes": [
{"code":"ZXY_CBA"},
{"code":"ABC_XYZ"}
]
}
}'