Skip to main content
PATCH
/
coupons
/
coupon
/
{couponName}
/
promo-codes
/
set-activation
curl -X PATCH \
  'https://api.appcharge.com/coupons/coupon/summer26/promo-codes/set-activation' \
  -H 'Content-Type: application/json' \
  -H 'x-publisher-token: <x-publisher-token>' \
  -d '{
    "active": false,
    "promoCodeNames": ["swx1", "swx2", "swx3"]
}'
{
    "promoCodes": [
        {
            "name": "swx1",
            "active": false,
            "maxRedemptions": 100,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-03-05T10:00:00.000Z",
            "redemptions": 28
        },
        {
            "name": "swx2",
            "active": false,
            "maxRedemptions": 200,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-03-05T10:00:00.000Z",
            "redemptions": 80
        },
        {
            "name": "swx3",
            "active": false,
            "maxRedemptions": 250,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-03-05T10:00:00.000Z",
            "redemptions": 30
        }
    ]
}
curl -X PATCH \
  'https://api.appcharge.com/coupons/coupon/summer26/promo-codes/set-activation' \
  -H 'Content-Type: application/json' \
  -H 'x-publisher-token: <x-publisher-token>' \
  -d '{
    "active": false,
    "promoCodeNames": ["swx1", "swx2", "swx3"]
}'
{
    "promoCodes": [
        {
            "name": "swx1",
            "active": false,
            "maxRedemptions": 100,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-03-05T10:00:00.000Z",
            "redemptions": 28
        },
        {
            "name": "swx2",
            "active": false,
            "maxRedemptions": 200,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-03-05T10:00:00.000Z",
            "redemptions": 80
        },
        {
            "name": "swx3",
            "active": false,
            "maxRedemptions": 250,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-03-05T10:00:00.000Z",
            "redemptions": 30
        }
    ]
}

Authorizations

x-publisher-token
string
header
required

Publisher token, as displayed in the Publisher Dashboard.

Path Parameters

couponName
string
required

Coupon name.

Example:

"summer26"

Body

application/json
active
boolean
required

Whether to activate or deactivate the specified promo codes.

Example:

false

promoCodeNames
string[]
required

List of promo code names to activate or deactivate.

Required array length: 1 - 1000 elements
Example:
["swx1", "swx2", "swx3"]

Response

Promo codes updated successfully.

promoCodes
object[]

List of updated promo codes.