Apply upgrade profile

This endpoint allows you to apply an upgrade profile to a subscription contract.

Path param explained :

  • subscriptionId Id of the subscription. This can be passed in the following format :
    • {id} - where id is the Loop internal id of the subscription contract. This is the default path param format.
    • loop-{id} - where id is the Loop internal id of the subscription contract.
    • shopify-${id} - Where id is the shopifySubscriptionId of the subscription contract.

Key points to consider:

Single-Line Subscription

  • If the upgrade profile has multiple products mapped as upgrade options, you can upgrade to any of the available products by passing the specific product's Shopify variant ID in the variantShopifyId field.
  • If variantShopifyId is not provided, the line will be upgraded to the first mapped product configured in the personalized upgrade profile.
  • For a Product quantity + frequency change upgrade, use isMultiProductQuantityUpgrade and updatedProductInfo to specify the products and quantities to apply. Set isMultiProductQuantityUpgrade to true when upgrading to two or more products.

Multi-Line Subscription

  • Only line items with an available SKU upgrade option can be upgraded.
  • To upgrade a specific line item, pass its line ID in the sourceLineId field.
  • If the upgrade profile has multiple products mapped as upgrade options, you can select the target product by passing its Shopify variant ID in the variantShopifyId field.
  • If variantShopifyId is not provided, the line will be upgraded to the first mapped product configured in the personalized upgrade profile.
Path Params
int32
required

The unique identifier of the subscription in Loop.

Body Params
int32
required

The ID of the upgrade profile to apply to the subscription. Retrieve this ID using the Fetch Upgrade Profiles API.

int32

The ID of the subscription line item to upgrade. Required for multi-line subscriptions when you want to upgrade a specific line item. Only line items with an available SKU upgrade option can be upgraded in multi-line subscriptions

integer

The Shopify variant ID of the product to upgrade to. Use this when the upgrade profile has multiple products configured as upgrade options. If omitted, the subscription is upgraded to the first product configured in the personalized upgrade profile.

boolean
Defaults to false

Use this request parameter when applying "Product quantity + frequency change" upgrade. Pass true if the give line needs to upgraded to multiple products. Defaults to false

updatedProductInfo
array of objects

Specifies the products and quantities to apply when using a Product quantity + frequency change upgrade for two or more products.

updatedProductInfo
Response

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