Edit line

This endpoint allows you to update the quantity, pricing, and selling plan

Token scope - Read & write subscription contracts

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

Path param explained :

  • subscriptionId Id of the subscription for which you want to update the line details. 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.
  • lineId - Loop line Id of the product for which you update the details

Body parameters explained

  • pricingType- The pricing type to be applied to the subscription line item.
    • SELLING_PLAN - The line item price is derived from the selling plan associated with the subscription.
    • CUSTOM - Allows you to apply a custom discount to the line item using the customDiscount object. The discounted price is calculated based on the discount configuration provided.
  • customDiscount - The custom discount to be associated with the line which is being edited.
    • For PERCENTAGE, provide a whole number (for example, 15 for a 15% discount). Decimal values are not supported due to Shopify limitations.
    • For FIXED_PRICE, provide the fixed amount to be deducted from the line item price.
    • For PRICE, provide the final price that should be charged for the line item.
  • sellingPlanGroupId - The sellingPlanGroupId refers to the selling plan group ID associated with the variant that will be added.
    • 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 contract in Loop.

int32
required

The unique identifier of a line in a subscription.

Body Params
int32
required

New quantity of a particular line in a subscription contract.

int32

The selling plan group ID to be applied to the subscription line item.

string
enum

The pricing type to be applied to the subscription line item.

Allowed:
customDiscount
object

The custom discount configuration to be applied when pricingType is set to CUSTOM.

Response

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