---
title: "Bulk update lines"
method: PUT
path: "/2026-04/subscription/{subscriptionId}/line"
---

# Bulk update lines

`PUT /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 to bulk update the existing lines in a subscription contract.

## Path parameters

- `subscriptionId` integer, required

## Request body

- object
  - `linesToAdd` object[], required
    - `variantShopifyId` integer
    - `quantity` integer
    - `sellingPlanGroupId` integer
    - `isUpsell` boolean
    - `customAttributes` object[]
      - `key` string: Key of the attribute
      - `value` string: Value of the attribute
    - `isOneTime` boolean: Pass this as true if the product is to be added only for upcoming order
    - `discountType` 'FIXED_AMOUNT' | 'PERCENTAGE' | 'PRICE' | 'NONE': The discount type to be added on one time product. This field is required only if isOneTime flag is passed as true
    - `discountValue` integer: The discount value to be added on one time product. This field is required only if isOneTime flag is passed as true
    - `lineOrderInterval` string: The frequency of this line that will be added.
    - `nextOrderId` string: Order id of the future scheduled order from where the subscription will be started.
  - `linesToRemove` object[], required
    - `lineId` integer
  - `linesToUpdate` object[], required
    - `lineId` integer
    - `quantity` integer
    - `customAttributes` object[]: This key appends new key-value pairs to the line item's attributes, or updates the value if the key already exists. Keys not included in this request are not affected.
      - `key` string: Key of the attribute
      - `value` string: Value of the attribute

## Response `200`

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