v1

latestOpenAPI 3.1.02026-07-241120379.1 KB

Swap line

This endpoint allows to update the existing line with a new line in a subscription contract.

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

Path parameters

subscriptionIdinteger required

The unique identifier of the subscription in Loop.

lineIdinteger required

ID of the subscription line to swap.

Request body

variantShopifyIdinteger required

Shopify variant ID of the new product.

quantityinteger required

Quantity of the new variant.

pricingType'OLD' | 'NEW' | 'CUSTOM' required

Defines which pricing is applied on the swapped line.

sellingPlanGroupIdinteger

Selling plan group to apply on the swapped line.

Response

200

successboolean

Indicates if the request was successful.

messagestring

Response message.

{"stackTrail":"paths:/2023-10/subscription/{subscriptionId}/line/{lineId}/swap:put:responses:200:content:application/json:schema:properties:data","oasType":"schema","type":"unknown","description":"Additional response data."}
codestring

Response status code.

Example response

{
  "success": true,
  "message": "Line swapped successfully",
  "code": "SUCCESS"
}