---
title: "Add line"
method: POST
path: "/2026-04/subscription/{subscriptionId}/line"
---

# Add line

`POST /2026-04/subscription/{subscriptionId}/line`

## Request

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

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

## Path parameters

- `subscriptionId` integer, required

## Request body

- object
  - `variantShopifyId` integer, required: The shopify variant id of the product that needs to be added to the subscription
  - `quantity` integer, required: Line item quantity for the shopify variant
  - `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' | 'FIXED_PRICE' | 'PERCENTAGE' | 'PRICE'
    - `value` integer
  - `customAttributes` object[]
    - `key` string: Key of the attribute
    - `value` string: Value of the attribute
  - `lineOrderInterval` string
  - `nextOrderId` string

## Response `200`

Line added successfully

- 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)
