curl -X PATCH \
'https://api.appcharge.com/coupons/coupon/summer26' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-d '{
"active": false,
"maxRedemptionsPerCustomer": null,
"expiredBy": null,
"startsAt": "2026-06-16T09:30:53.378Z",
"supportedOfferExternalIds": ["1", "3"],
"firstTimePurchase": false,
"allowedPlayers": ["player123", "player456"]
}'
{
"name": "summer26",
"active": false,
"discountPercentage": 10,
"maxRedemptionsPerCustomer": null,
"expiredBy": null,
"startsAt": "2026-06-16T09:30:53.378Z",
"supportedOfferExternalIds": ["1", "3"],
"firstTimePurchase": false,
"allowedPlayers": ["player123", "player456"]
}
{
"error": "startsAt must be a time in the future."
}
{
"error": "expiredBy must be a time later than startsAt."
}
{
"error": "Trying to update fields that can’t be updated."
}
{
"error": "Coupon not found."
}
{
"error": "Unexpected error. Please contact support."
}
Update Coupon
Updates an existing coupon. Only the fields provided in the request body will be updated.
curl -X PATCH \
'https://api.appcharge.com/coupons/coupon/summer26' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-d '{
"active": false,
"maxRedemptionsPerCustomer": null,
"expiredBy": null,
"startsAt": "2026-06-16T09:30:53.378Z",
"supportedOfferExternalIds": ["1", "3"],
"firstTimePurchase": false,
"allowedPlayers": ["player123", "player456"]
}'
{
"name": "summer26",
"active": false,
"discountPercentage": 10,
"maxRedemptionsPerCustomer": null,
"expiredBy": null,
"startsAt": "2026-06-16T09:30:53.378Z",
"supportedOfferExternalIds": ["1", "3"],
"firstTimePurchase": false,
"allowedPlayers": ["player123", "player456"]
}
{
"error": "startsAt must be a time in the future."
}
{
"error": "expiredBy must be a time later than startsAt."
}
{
"error": "Trying to update fields that can’t be updated."
}
{
"error": "Coupon not found."
}
{
"error": "Unexpected error. Please contact support."
}
curl -X PATCH \
'https://api.appcharge.com/coupons/coupon/summer26' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-d '{
"active": false,
"maxRedemptionsPerCustomer": null,
"expiredBy": null,
"startsAt": "2026-06-16T09:30:53.378Z",
"supportedOfferExternalIds": ["1", "3"],
"firstTimePurchase": false,
"allowedPlayers": ["player123", "player456"]
}'
{
"name": "summer26",
"active": false,
"discountPercentage": 10,
"maxRedemptionsPerCustomer": null,
"expiredBy": null,
"startsAt": "2026-06-16T09:30:53.378Z",
"supportedOfferExternalIds": ["1", "3"],
"firstTimePurchase": false,
"allowedPlayers": ["player123", "player456"]
}
{
"error": "startsAt must be a time in the future."
}
{
"error": "expiredBy must be a time later than startsAt."
}
{
"error": "Trying to update fields that can’t be updated."
}
{
"error": "Coupon not found."
}
{
"error": "Unexpected error. Please contact support."
}
Authorizations
Publisher token, as displayed in the Publisher Dashboard.
Path Parameters
Coupon name.
"summer26"
Body
Whether the coupon is active.
false
Maximum number of times a customer can redeem this coupon. Set to null to remove the maximum redemptions per customer.
5
Expiration date of the coupon. Set to null to remove the expiration date and make the coupon permanent.
"2026-12-31T23:59:59.000Z"
Start date of the coupon validity. If not provided, defaults to current date and time.
"2026-06-16T09:30:53.378Z"
List of offer external IDs that support this coupon. Empty array means all offers are supported.
Note: This represents both the offer.sku value in the Create Checkout Session API, and the publisherOfferId in the Offers V2 API.
["bundle1", "rollingoffer3"]
Whether the coupon is only valid for first-time purchases.
false
List of player IDs allowed to use this coupon. Empty array means all players are allowed.
["player123", "player456"]
Response
Coupon updated successfully.
Coupon name.
"summer26"
Whether the coupon is active.
true
Discount percentage applied by the coupon.
1
Maximum number of times a customer can redeem this coupon.
2
Expiration date of the coupon.
"2025-04-02T06:54:51.670Z"
Start date of the coupon validity.
"2025-02-02T06:54:51.670Z"
List of offer external IDs that support this coupon. Empty array means all offers are supported.
["bundle1", "rollingoffer3"]
Whether the coupon is only valid for first-time purchases.
false
List of player IDs allowed to use this coupon. Empty array means all players are allowed.
["player123", "player456", "player789"]
Was this page helpful?
