Skip to main content
POST
/
api
/
public
/
v1
/
promotion-codes
/
update
Update promotion code
curl --request POST \
  --url https://app.localhost:3000/api/public/v1/promotion-codes/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "pc_123",
  "data": {
    "code": "WINTER30",
    "usageLimit": 200,
    "active": true,
    "firstTimeCustomersOnly": false
  }
}
'
{
  "id": "pc_123",
  "code": "WINTER30",
  "active": true,
  "usageLimit": 200
}

Authorizations

Authorization
string
header
required

Enter your API key as: Bearer your-api-key

Body

application/json
id
string
required

The promotion code ID to update

data
object
required

Updated promotion code data

Response

Successful response

id
string
code
string
promotionId
string
storeId
string
active
boolean
usageCount
number
usageLimit
number | null
firstTimeCustomersOnly
boolean
expiresAt
string<date-time> | null
createdAt
string<date-time>
updatedAt
string<date-time>