This endpoint updates an existing promotion. You can modify conditions, validity periods, and display settings. Some fields cannot be updated after a promotion has been used.
Authentication
This endpoint requires a valid API key with promotions:write
permissions.
Authorization: Bearer YOUR_API_KEY
Path Parameters
The unique identifier of the promotion to update
Request Body
All fields are optional. Only provided fields will be updated.
Internal name for the promotion
Customer-facing description
Update promotion conditions Show Condition properties
Maximum uses per customer
Eligible customer segments
Update status: “active”, “paused”, “expired”
Response
Returns the updated promotion object.
curl --location --request PUT 'https://api.stateset.com/v1/promotions/promo_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"validity": {
"end_date": "2024-09-30T23:59:59Z"
},
"conditions": {
"max_uses_total": 1500
},
"status": "active"
}'
{
"id" : "promo_0901f083-aa1c-43c5-af5c-0a9d2fc64e30" ,
"object" : "promotion" ,
"name" : "Summer Sale 2024" ,
"code" : "SUMMER20" ,
"description" : "Get 20% off on all summer collection items" ,
"type" : "percentage" ,
"value" : {
"amount" : 20 ,
"max_discount" : 10000
},
"conditions" : {
"min_purchase_amount" : 5000 ,
"max_uses_total" : 1500 ,
"max_uses_per_customer" : 1 ,
"used_count" : 245 ,
"category_ids" : [ "cat_summer_2024" ],
"exclude_sale_items" : true
},
"validity" : {
"start_date" : "2024-06-01T00:00:00Z" ,
"end_date" : "2024-09-30T23:59:59Z" ,
"timezone" : "America/Los_Angeles" ,
"is_active" : true ,
"days_remaining" : 102
},
"status" : "active" ,
"updated_at" : "2024-06-20T15:00:00Z" ,
"updated_by" : "user_456"
}