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

# Add line once

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

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` string — This key allows you to add line in a future order of the subscription contract. This feature is limited access only.

## Response `200`

200

- object
  - `success` boolean — Indicates if the request was successful.
  - `message` string — Response message.
  - `data` unknown
  - `code` string — Response status code.
  - `pageInfo` unknown

---

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