Skip to main content
PATCH
Update coupon

Authorizations

Authorization
string
header
required

Use your Shoppex API key in the Authorization header.

Headers

If-Match
string

The revision of the resource as last read, e.g. "3". The write runs only while the resource still has it; otherwise 409 REVISION_CONFLICT with current_revision and nothing changes. An MCP tool call without it only replays the stored answer of a key that already ran.

Pattern: ^"?[1-9][0-9]{0,14}"?$

Path Parameters

id
string
required

Body

code
string
Required string length: 1 - 64
discount_value
number
Required range: x >= 1e-9
discount_type
enum<string>
Available options:
PERCENTAGE,
FIXED
max_uses
integer | null
first_order_only
boolean
products_bound
string[]
variants_bound
string[]
applies_to
enum<string>
Available options:
all,
selected
min_order_amount
number | null
max_discount
number | null
valid_from
valid_until
is_active
boolean

Response

Response for status 200

data
object
required