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

This endpoint allows you to modify a subscription in bulk by passing `linesToAdd`, `linesToRemove`, and `linesToUpdate` objects in a single request.

## Path parameters

- `subscriptionId` integer, required

## Request body

- object
  - `linesToAdd` object[]: List of new products to be added to the subscription.
    - `variantShopifyId` integer: Shopify ID of the variant
    - `quantity` integer: Quantity
    - `sellingPlanGroupId` integer: The sellingPlanGroupId which has to be applied on the line
    - `isUpsell` boolean
    - `customAttributes` object
      - `key` string: The name or identifier of the attribute.
      - `value` string: The corresponding data for that key.
  - `linesToRemove` object[]: List of existing subscription line item IDs to be removed.
    - `lineId` integer: ID of the line to remove
  - `linesToUpdate` object[]: List of existing line items with updated details like quantity or selling plan.
    - `lineId` integer: ID of the line to update
    - `quantity` integer: Quantity
    - `sellingPlanGroupId` integer: The sellingPlanGroupId which has to be applied on the line

## Response `200`

Lines updated successfully

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

## Other responses

- `201`: Created

## Changes

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

[Operation history](https://skmtc.dev/loopwork/apis/storefront-api/changes/2026-04/subscription/:subscriptionId/line/put.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)
