Replace promotion phases
Replace a promotion's complete ordered phase set.
Send every desired active phase in evaluation order. At least one phase is required. Referenced old phases are retained as soft-deleted history; unreferenced old phases are purged.
This replacement model prevents changes to a promotion from rewriting the discount details attached to historical orders.
Authorization
bearerAuth storeAuth Provide your SellApp API key as a bearer token.
In: header
Select the SellApp store for this API request.
In: header
Path Parameters
The promotion path parameter.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://sell.app/api/v2/promotions/0/phases"{
"data": [
{
"id": 0,
"promotion_id": 0,
"sort_order": 1,
"discount_type": "percentage",
"discount_value": "string",
"ends_at": "2019-08-24T14:15:22Z",
"max_redemptions": 1,
"minimum_amount": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z"
}
]
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "Rule not found."
}{
"message": "The given data was invalid.",
"errors": {
"data": [
"The data field is required."
]
}
}Authorization
bearerAuth storeAuth Provide your SellApp API key as a bearer token.
In: header
Select the SellApp store for this API request.
In: header
Path Parameters
The promotion path parameter.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://sell.app/api/v2/promotions/0/phases" \ -H "Content-Type: application/json" \ -d '{ "phases": [ { "discount_type": "percentage", "discount_value": "20", "ends_at": "2026-08-04T00:00:00Z", "max_redemptions": 200, "minimum_amount": "10" }, { "discount_type": "fixed", "discount_value": "5", "ends_at": null, "max_redemptions": null, "minimum_amount": "25" } ] }'{
"data": [
{
"id": 0,
"promotion_id": 0,
"sort_order": 1,
"discount_type": "percentage",
"discount_value": "string",
"ends_at": "2019-08-24T14:15:22Z",
"max_redemptions": 1,
"minimum_amount": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z"
}
]
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "Rule not found."
}{
"message": "The given data was invalid.",
"errors": {
"data": [
"The data field is required."
]
}
}