Apply coupon
Use this endpoint to apply coupon on existing subscription. The coupon previously has to be configured in Cleeng Dashboard -> Offers & Coupons -> Coupon Management.
patch/customers/{customerId}/subscriptions/{subscriptionId}
Request
- Base URLhttps://mediastoreapi-sandbox.cleeng.com
- URLhttps://mediastoreapi-sandbox.cleeng.com/customers/{customerId}/subscriptions/{subscriptionId}
- AuthAPI key in header Authorization
Path parameters
customerIdstring required
Customer identifier at Cleeng
subscriptionIdstring required
Subscription identifier at Cleeng. You can take this param from fetch customer's subscription endpoint.
Request body
Response
200
Example response
{
"responseData": {
"success": true,
"subscription": {
"subscriptionId": 743218705,
"customerId": 264555895,
"status": "active",
"dateTo": 4219655155,
"offerId": "S253647975_PL",
"paymentCountry": "PL",
"couponCode": "test50",
"coupon": {
"discountRate": 0.5,
"usageLeft": 5
}
},
"message": "Coupon applied successfully"
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.