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

# Add discount

`POST /2023-10/subscription/{subscriptionId}/discount`

## Request

- Base URL: `https://api.loopsubscriptions.com/admin`
- URL: `https://api.loopsubscriptions.com/admin/2023-10/subscription/{subscriptionId}/discount`
- Auth: API key in header `X-Loop-Token`

Rate limit - 5/s

## Path parameters

- `subscriptionId` integer, required

## Request body

- object
  - `discountCode` string: Discount code
  - `manualDiscount` object: Apply manual discount on a subscription contract
    - `title` string: Title of the discount.
    - `type` 'FIXED_AMOUNT' | 'PERCENTAGE': Type of the discount.
    - `value` integer: Value of the discount.
    - `orderLimit` integer, required: Number of recurring orders for which the discount will be applied.
    - `lineIds` integer[]: With this parameter, you can apply the manual discount code to specific lines. If lineIds array is sent null, the discount will be applied to the contract.

## Response `200`

200

- object
  - `success` boolean
  - `message` string
  - `data` object
    - `shopifyId` string
    - `code` string
  - `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)
