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

# Add line

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

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 — 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' | '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.net/loopwork/apis/storefront-api.md) · [All operations](https://skmtc.net/loopwork/apis/storefront-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loopwork/storefront-api/versions/1524500daa02/schema)
