Swap line

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

Token scope - Read & write subscription contracts

Rate limit - Global pool (i.e. 10 requests per second per domain)

Body parameters explained

  • variantShopifyId - Shopify id of the variant with which the existing line is being swapped.
  • quantity - Quantity of the new variant which is being swapped with the existing lineItem.
  • pricingType - Define the pricingType for the new line added.
    • OLD - The selling plan discount associated with the previous line would be applied to the new swapped line.
    • NEW - The selling plan discount associated with the new line would be applied to the new swapped line.
    • CUSTOM - Apply custom discount to the new swapped line.
  • customDiscount - Apply a custom discount to the new swapped line. Select the pricingType as CUSTOM to apply a custom discount.
  • sellingPlanGroupId - The sellingPlanGroupId refers to the selling plan group ID associated with the variant that will be swapped.
    • If the sellingPlanGroupId is not provided, the system will assign the plan based on the priority of the available selling plan groups.
    • If the provided sellingPlanGroupId is invalid or does not exist, an error will be thrown.
Path Params
int32
required

The unique identifier of the subscription in Loop.

int32
required

ID of the subscription line to swap.

Body Params
int64
required

Shopify variant ID of the new product.

int32
required

Quantity of the new variant.

string
enum
required

Defines which pricing is applied on the swapped line.

Allowed:
int32

Selling plan group to apply on the swapped line.

customDiscount
object

Custom discount configuration for the swapped line.

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json