Apply discount code

Changed on

This 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 URL
    https://api.loopsubscriptions.com/storefront
  • URL
    https://api.loopsubscriptions.com/storefront/2023-10/subscription/{subscriptionId}/discount
  • Auth
    API key in header Authorization

Path parameters

subscriptionIdinteger required

The unique identifier for a subscription in Loop.

Request body

codestring required

The shopify discount code which needs to be applied.

Response

200

successboolean
messagestring
codestring
pageInfounknown

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-discount removed and replaced with apply-discount-code

    • info

      added the optional property / to the response with the status