Swap line

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

put/2026-04/subscription/{subscriptionId}/line/{lineId}/swap

Request

  • Base URL
    https://api.loopsubscriptions.com/admin
  • URL
    https://api.loopsubscriptions.com/admin/2026-04/subscription/{subscriptionId}/line/{lineId}/swap
  • Auth
    API key in header X-Loop-Token

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.

basePricenumber float

Lets you set a custom base price for the swapped product

Response

Line swapped successfully

successboolean
messagestring
dataunknown
codestring
pageInfounknown

Example response

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

Changes

No recorded changes to this operation across all 1 revision of this API.