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

# Add line once

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

## Request

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

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

## Path parameters

- `subscriptionId` integer, required

## Request body

- object
  - `variantShopifyId` integer, required: Shopify variant ID to add as a one-time line item.
  - `quantity` integer, required: Quantity of the variant.
  - `discountType` 'PERCENTAGE' | 'FIXED_AMOUNT' | 'PRICE' | 'NONE', required: Type of discount applied on the line item.
  - `discountValue` number, float, required: Discount value based on the selected discount type.
  - `isUpsell` boolean: Marks the line item as an upsell for analytics tracking.
  - `customAttributes` object[]: Custom metadata for the line item.
    - `key` string: Key of the attribute
    - `value` string: Value of the attribute
  - `nextOrderId` integer: This key allows you to add line in a future order of the subscription contract. This feature is limited access only.

## Response `200`

Line added for next order successfull

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

---

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