curl -X POST \
'https://api.appcharge.com/coupons/coupon/summer26/promo-codes' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-d '{
"promoCodes": [
{
"name": "swx1",
"maxRedemptions": 1,
"active": true
},
{
"name": "swx2",
"maxRedemptions": 1,
"active": true
}
]
}'
{
"promoCodes": [
{
"name": "swx1",
"active": true,
"maxRedemptions": 1,
"createdAt": "2025-01-22T15:58:24.116Z",
"updatedAt": "2025-01-25T08:44:26.668Z"
},
{
"name": "swx2",
"active": true,
"maxRedemptions": 1,
"createdAt": "2025-01-22T15:58:24.116Z",
"updatedAt": "2025-01-25T08:44:26.668Z"
}
]
}
{
"error": "Invalid coupon name. Use only English letters and numbers."
}
{
"error": "Invalid promo code name. Use only English letters and numbers."
}
{
"error": "Promo codes count must be at least 1."
}
{
"error": "Promo codes count must not exceed 1000."
}
{
"error": "Some promo codes in the request are duplicated: swx1, swx2."
}
{
"error": "maxRedemptions must not be less than 1."
}
{
"error": "Missing required field: promoCodes."
}
{
"error": "Coupon not found."
}
{
"error": "Some promo codes are already active on other coupon: swx1, swx2."
}
{
"error": "Unexpected error. Please contact support."
}
Coupons
Bulk Create Promo Codes
Creates multiple promo codes for a specific coupon.
Maximum of 1,000 promo codes allowed per request.
POST
/
coupons
/
coupon
/
{couponName}
/
promo-codes
curl -X POST \
'https://api.appcharge.com/coupons/coupon/summer26/promo-codes' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-d '{
"promoCodes": [
{
"name": "swx1",
"maxRedemptions": 1,
"active": true
},
{
"name": "swx2",
"maxRedemptions": 1,
"active": true
}
]
}'
{
"promoCodes": [
{
"name": "swx1",
"active": true,
"maxRedemptions": 1,
"createdAt": "2025-01-22T15:58:24.116Z",
"updatedAt": "2025-01-25T08:44:26.668Z"
},
{
"name": "swx2",
"active": true,
"maxRedemptions": 1,
"createdAt": "2025-01-22T15:58:24.116Z",
"updatedAt": "2025-01-25T08:44:26.668Z"
}
]
}
{
"error": "Invalid coupon name. Use only English letters and numbers."
}
{
"error": "Invalid promo code name. Use only English letters and numbers."
}
{
"error": "Promo codes count must be at least 1."
}
{
"error": "Promo codes count must not exceed 1000."
}
{
"error": "Some promo codes in the request are duplicated: swx1, swx2."
}
{
"error": "maxRedemptions must not be less than 1."
}
{
"error": "Missing required field: promoCodes."
}
{
"error": "Coupon not found."
}
{
"error": "Some promo codes are already active on other coupon: swx1, swx2."
}
{
"error": "Unexpected error. Please contact support."
}
curl -X POST \
'https://api.appcharge.com/coupons/coupon/summer26/promo-codes' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-d '{
"promoCodes": [
{
"name": "swx1",
"maxRedemptions": 1,
"active": true
},
{
"name": "swx2",
"maxRedemptions": 1,
"active": true
}
]
}'
{
"promoCodes": [
{
"name": "swx1",
"active": true,
"maxRedemptions": 1,
"createdAt": "2025-01-22T15:58:24.116Z",
"updatedAt": "2025-01-25T08:44:26.668Z"
},
{
"name": "swx2",
"active": true,
"maxRedemptions": 1,
"createdAt": "2025-01-22T15:58:24.116Z",
"updatedAt": "2025-01-25T08:44:26.668Z"
}
]
}
{
"error": "Invalid coupon name. Use only English letters and numbers."
}
{
"error": "Invalid promo code name. Use only English letters and numbers."
}
{
"error": "Promo codes count must be at least 1."
}
{
"error": "Promo codes count must not exceed 1000."
}
{
"error": "Some promo codes in the request are duplicated: swx1, swx2."
}
{
"error": "maxRedemptions must not be less than 1."
}
{
"error": "Missing required field: promoCodes."
}
{
"error": "Coupon not found."
}
{
"error": "Some promo codes are already active on other coupon: swx1, swx2."
}
{
"error": "Unexpected error. Please contact support."
}
Authorizations
Was this page helpful?
