---
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/storefront`
- URL: `https://api.loopsubscriptions.com/storefront/2026-04/subscription/{subscriptionId}/line`
- Auth: API key in header `Authorization`

This endpoint allows you to permanently adds a product to a subscription, ensuring it recurs in all future orders until removed.

## Path parameters

- `subscriptionId` integer, required

## Request body

- object
  - `variantShopifyId` integer, required: Shopify variant ID to add to the subscription.
  - `quantity` integer, required: Quantity of the variant to add.
  - `sellingPlanGroupId` integer: Selling plan group to apply on the line item.
  - `isUpsell` boolean: Marks the line item as an upsell for analytics tracking.
  - `upsellProfileId` integer: Tracks the associated upsell profile analytics.
  - `customAttributes` object
    - `key` string: The name or identifier of the attribute.
    - `value` string: The corresponding data for that key.

## Response `200`

Line added successfully

- object
  - `success` boolean
  - `message` string
  - `data` object
    - `id` integer
    - `name` string
    - `shopifyId` string
    - `variantShopifyId` integer
    - `quantity` integer
    - `price` string
    - `discountedPrice` integer
    - `variantTitle` string
    - `sku` string
  - `code` string
  - `pageInfo` unknown

## Changes

- **2026-11-03** `1ff6a5700816`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/loopwork/apis/storefront-api/changes/2026-04/subscription/:subscriptionId/line/post.md)

---

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