This endpoint allows you to replace an existing product in the subscription with a new product.

put/2023-10/subscription/{subscriptionId}/line/{lineId}/swap

Request

  • Base URL
    https://api.loopsubscriptions.com/storefront
  • URL
    https://api.loopsubscriptions.com/storefront/2023-10/subscription/{subscriptionId}/line/{lineId}/swap
  • Auth
    API key in header Authorization

Path parameters

subscriptionIdinteger required

The unique identifier for a subscription in Loop.

lineIdinteger required

The unique identifier for the line in Loop.

Request body

variantShopifyIdinteger required

The unique identifier of the variant in Shopify

quantityinteger required

The quantity of variant to be swapped

sellingPlanGroupIdinteger

The sellingPlanGroupId which has to be applied on the line

cancellationFlowIdinteger

This parameter is used to log the cancellation reason performance

Response

200

successboolean
messagestring
codestring
pageInfounknown

Example response

{
  "success": true,
  "message": "Line swapped successfully",
  "data": {
    "id": 2320007,
    "name": "A Ring - 6",
    "shopifyId": "b0e30ff1-8742-43c8-b152-fad393bd75e0",
    "quantity": 2,
    "price": "9.00"
  },
  "code": "SUCCESS"
}

Changes

    • breaking

      the response's property type changed from no type to object for status

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      api operation id swap-line-on-subscription removed and replaced with swap-line

    • info

      added the new optional request property

    • info

      for the path request parameter lineId, the format was generalized from int32 to int64

    • info

      for the path request parameter subscriptionId, the format was generalized from int32 to int64

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property to the response with the status