v1

latestOpenAPI 3.1.02026-07-241120379.1 KB

Add line once

This endpoint allows you to add a new one-time line item in a subscription contract.

post/2023-10/subscription/{subscriptionId}/line/once

Path parameters

subscriptionIdinteger required

The unique identifier of the subscription in Loop.

Request body

variantShopifyIdinteger required

Shopify variant ID to add as a one-time line item.

quantityinteger required

Quantity of the variant.

discountType'PERCENTAGE' | 'FIXED_AMOUNT' | 'PRICE' | 'NONE' required

Type of discount applied on the line item.

discountValuenumber float required

Discount value based on the selected discount type.

isUpsellboolean

Marks the line item as an upsell for analytics tracking.

nextOrderIdstring

This key allows you to add line in a future order of the subscription contract. This feature is limited access only.

Response

200

successboolean

Indicates if the request was successful.

messagestring

Response message.

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

Response status code.

{"stackTrail":"paths:/2023-10/subscription/{subscriptionId}/line/once:post:responses:200:content:application/json:schema:properties:pageInfo","oasType":"schema","type":"unknown","description":"Additional metadata information."}

Example response

{
  "success": true,
  "message": "Line added for next order successfully",
  "code": "SUCCESS"
}