Apply discount code
Changed onThis endpoint allows you to apply a valid discount code to the subscription, updating the pricing based on the associated promotion.
post/2023-10/subscription/{subscriptionId}/discount
Request
- Base URLhttps://api.loopsubscriptions.com/storefront
- URLhttps://api.loopsubscriptions.com/storefront/2023-10/subscription/{subscriptionId}/discount
- AuthAPI key in header Authorization
Path parameters
subscriptionIdinteger required
The unique identifier for a subscription in Loop.
Request body
Response
200
Example response
{
"success": true,
"message": "Discount applied successfully",
"data": {
"shopifyId": "19b13c34-e9e7-48d4-8c5a-e5c3570c30b6",
"code": "TEST30",
"subscription": {
"id": 1473,
"shopifyId": 345678098723
}
},
"code": "SUCCESS"
}Changes
- breaking
added the new required request property
- warning
removed the request property
- warning
removed the request property
- info
api operation id
add-discountremoved and replaced withapply-discount-code - info
added the optional property
/to the response with the status
- breaking