Skip to main content
PATCH
/
coupons
/
{uniqid}
Update a coupon
curl --request PATCH \
  --url https://api.shoppex.io/dev/v1/coupons/{uniqid} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>",
  "discount_value": 123,
  "discount_type": "PERCENTAGE",
  "max_uses": 123,
  "products_bound": [
    "<string>"
  ],
  "min_order_amount": 123,
  "max_discount": 123,
  "valid_from": "<string>",
  "valid_until": "<string>",
  "used_count": 123,
  "is_active": true
}
'
{
  "data": {
    "id": "<string>",
    "uniqid": "<string>",
    "shop_id": "<string>",
    "type": "PERCENTAGE",
    "code": "<string>",
    "discount": 123,
    "used": 123,
    "max_uses": 123,
    "min_order_amount": 123,
    "max_discount": 123,
    "valid_from": 123,
    "valid_until": 123,
    "is_active": true,
    "created_at": 123,
    "updated_at": 123,
    "products_bound": [
      "<string>"
    ],
    "products_count": 123
  }
}

Authorizations

Authorization
string
header
required

Use your API key with the Bearer scheme. Get your key from Dashboard → Settings → API Keys. Format: Authorization: Bearer shx_...

Path Parameters

uniqid
string
required

Body

application/json
code
string
discount_value
number
discount_type
enum<string>
Available options:
PERCENTAGE,
FIXED
max_uses
number
products_bound
string[]
min_order_amount
number
max_discount
number
valid_from
valid_until
used_count
number
is_active
boolean

Response

Default Response

data
object
required