Delete Promotion Codes

Delete a promotion code

DELETE https://api.moltin.com/v2/promotions/:id/codes/:code

This endpoint allows you to delete a single promotion code

Path Parameters

NameTypeDescription

id

string

ID of the promotion associated with the codes

Headers

NameTypeDescription

Authorization

string

The bearer token to grant access to the API

curl -X DELETE https://api.moltin.com/v2/promotions/:id/codes/:code \
     -H "Authorization: Bearer XXXX" \
     -H "Content-Type: application/json"

Delete multiple promotion codes

DELETE https://api.moltin.com/v2/promotions/:id/codes

This endpoint allows you to delete one or more promotion codes

Path Parameters

NameTypeDescription

id

string

ID of the promotion associated with the codes

Headers

NameTypeDescription

Authorization

string

The bearer token to grant access to the API

Request Body

NameTypeDescription

codes[].code

object

the code you want to delete

codes[]

array

an array of codes

type

string

promotion_codes

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"}
        ]
      }
    }'

Last updated