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" }
Update an existing promotion
promotions:write
Authorization: Bearer YOUR_API_KEY
Show Condition properties
Show Validity properties