---
title: "Add line"
method: POST
path: "/2023-10/subscription/{subscriptionId}/line"
---

# Add line

`POST /2023-10/subscription/{subscriptionId}/line`

## Request

- Base URL: `https://api.loopsubscriptions.com/admin`
- URL: `https://api.loopsubscriptions.com/admin/2023-10/subscription/{subscriptionId}/line`
- Auth: API key in header `X-Loop-Token`

Rate limit - 5/s

## Path parameters

- `subscriptionId` integer, required

## Request body

- object
  - `variantShopifyId` integer, required: Shopify ID of the variant
  - `quantity` integer, required: Quantity
  - `sellingPlanGroupId` integer: The sellingPlanGroupId which has to be applied on the line
  - `isUpsell` boolean: This key allows you to track upsell analytics by indicating whether an item is an upsell or not
  - `pricingType` 'SELLING_PLAN' | 'CUSTOM'
  - `customDiscount` object: To apply a custom discount, set the `pricingType` parameter to `CUSTOM`
    - `type` 'NONE' | 'PERCENTAGE' | 'FIXED_PRICE'
    - `value` integer
  - `customAttributes` object[]
    - `key` string: Key of the attribute
    - `value` string: Value of the attribute
  - `lineOrderInterval` string
  - `nextOrderId` string

## Response `200`

200

- object
  - `success` boolean
  - `message` string
  - `data` unknown
  - `code` string

---

[API](https://skmtc.dev/loopwork/apis/loop-admin.md) - [All operations](https://skmtc.dev/loopwork/apis/loop-admin/llms.txt) - [OpenAPI document](https://skmtc.dev/loopwork/apis/loop-admin/revisions/1eaf81bcb1ea?raw)
