Skip to main content
PATCH
/
stores
/
{storeId}
/
coupons
/
{couponId}
Update a coupon
curl --request PATCH \
  --url https://api.pandabase.io/v2/core/stores/{storeId}/coupons/{couponId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>",
  "displayName": "<string>",
  "description": "<string>",
  "type": "FIXED",
  "value": 2,
  "minimumPurchase": 1,
  "maxUses": 2,
  "maxUsesPerCustomer": 2,
  "firstPurchaseOnly": true,
  "startsAt": "2023-11-07T05:31:56Z",
  "expiresAt": "2023-11-07T05:31:56Z",
  "enabled": true
}
'
{
  "ok": true,
  "data": "<unknown>"
}

Authorizations

Authorization
string
header
required

Store API token. Use the sk_ prefixed secret key as the Bearer token.

Path Parameters

storeId
string
required

Store ID (shp_ prefix)

Required string length: 12 - 48
couponId
string
required

Coupon ID (cpn_ prefix)

Required string length: 12 - 48

Body

application/json
code
string
Required string length: 2 - 64
displayName
string | null
Maximum string length: 128
description
string | null
Maximum string length: 500
type
enum<string>
Available options:
FIXED,
PERCENTAGE
value
integer
Required range: x >= 1
minimumPurchase
integer | null
Required range: x >= 0
maxUses
integer | null
Required range: x >= 1
maxUsesPerCustomer
integer | null
Required range: x >= 1
firstPurchaseOnly
boolean
startsAt
string<date-time> | null
expiresAt
string<date-time> | null
enabled
boolean

Response

Successful operation

ok
boolean
required
data
any
required