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

# Bulk update lines

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

This endpoint allows to bulk update the existing lines in a subscription contract.

## Path parameters

- `subscriptionId` integer, required

## Request body

- object
  - `linesToAdd` object[]
    - `variantShopifyId` integer
    - `quantity` integer
    - `sellingPlanGroupId` integer — The sellingPlanGroupId which has to be applied on the line
    - `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[]
    - `lineId` integer
  - `linesToUpdate` object[]
    - `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`

200

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

## Other responses

- `400` — 400

---

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