---
title: "Update discount"
method: POST
path: "/marketing/update-discount"
tags: ["Marketing"]
---

# Update discount

`POST /marketing/update-discount`

## Request

- Base URL: `https://demo.onlinebillingform.com/api/v2`
- URL: `https://demo.onlinebillingform.com/api/v2/marketing/update-discount`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/billingserv/apis/billingserv-api-v2/docs/marketing/update-discount/post.ts> (a function with typed inputs; its response is checked against the schema)

Use this BillingServ API endpoint to update discount. Review the response for the operation result or validation errors.

## Request body

- object
  - `discount_id` integer, required
  - `minimum_value` number, required
  - `discount_value` number, required
  - `start` string, date, required
  - `end` string, date
  - `type` integer, required: 0 = percentage, 1 = fixed/code
  - `recurring` 0 | 1, required
  - `uses` string, required
  - `selected_packages` string

## Response `200`

OK

- ApiResponse
  - `success` boolean

## Other responses

- `401`: Missing or invalid API key
- `403`: Authenticated key does not have permission for this endpoint
- `404`: The requested resource was not found or is not available to this API account.
- `422`: Validation error
- `500`: The server could not complete the request.

## Changes

- **2026-08-22** `6b9208b64456`: 8 info
  - added the non-success response with the status `404`
  - added the non-success response with the status `500`
  - added the optional property `code` to the response with the `401` status
  - added the optional property `code` to the response with the `403` status
  - …4 more

[Operation history](https://skmtc.dev/billingserv/apis/billingserv-api-v2/changes/marketing/update-discount/post.md)

---

[API](https://skmtc.dev/billingserv/apis/billingserv-api-v2.md) - [All operations](https://skmtc.dev/billingserv/apis/billingserv-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/billingserv/apis/billingserv-api-v2/revisions/232ab5ca8413?raw)
