Skip to main content
PUT
/
coupons
/
{id}
Update a coupon
curl --request PUT \
  --url https://api.salesive.com/api/v1/coupons/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "discount": 25,
  "active": false
}
'
{
  "status": 200,
  "success": true,
  "message": "Coupon updated successfully",
  "data": {
    "_id": "66b1f2a9c4d5e6f7a8b9c0d1",
    "code": "SUMMER20",
    "user": "66a0e1b2c3d4e5f6a7b8c9d0",
    "shop": "66a0d1c2b3a4958677564738",
    "type": "percentage",
    "discount": 25,
    "usageLimit": 100,
    "usageCount": 12,
    "usagePerUser": 1,
    "minimumOrderAmount": 5000,
    "startDate": "2026-06-01T00:00:00.000Z",
    "endDate": "2026-08-31T23:59:59.000Z",
    "active": false,
    "createdAt": "2026-05-20T10:15:00.000Z",
    "updatedAt": "2026-06-28T12:30:00.000Z"
  }
}
Updates a coupon; send only the fields to change (at least one required), and any changed code is uppercased and must stay unique within the store. The store is bound to your app token server-side — never send a shop id.

Authorizations

Authorization
string
header
required

Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side — never send a shop id.

Path Parameters

id
string
required

The coupon's unique id.

Body

application/json

Fields accepted when updating a coupon. At least one field must be supplied.

code
string

New coupon code (alphanumeric only). Stored uppercase; must be unique within the store.

type
enum<string>

Discount type: fixed or percentage.

Available options:
fixed,
percentage
discount
number

Discount amount. Must be greater than 0.

usageLimit
integer

Maximum total redemptions. Minimum 1.

Required range: x >= 1
usagePerUser
integer

Maximum redemptions per customer. Minimum 1.

Required range: x >= 1
minimumOrderAmount
number

Minimum order subtotal required. Cannot be negative.

Required range: x >= 0
startDate
string<date-time>

Date the coupon becomes valid (ISO 8601).

endDate
string<date-time>

Date the coupon expires (ISO 8601). Must be on or after startDate.

active
boolean

Whether the coupon is active.

Response

The updated coupon.

Standard Salesive response envelope. The operation-specific payload is carried in data.

status
integer
required

HTTP status code, echoed in the body.

success
boolean
required

Whether the request succeeded.

message
string
required

Human-readable result message.

data
object

A store-scoped discount coupon.