Menu
Create a promotion (POST /promotions)
Create a promotion
POST
/promotionsUse it in a workflow
- Add a step and choose the SCAYLE Admin connector.
- Pick the Create a promotion (POST /promotions) action (under Promotions).
- Fill in the fields below, then reference the result from later steps as
{{createAPromotionPostPromotions.response.data}}.
Request
Query parameters
Request body
Enter the body as JSON in the step's Body field.
{
"name": "Christmas Promotion",
"status": "active",
"activationType": "code",
"level": "basket",
"schedule": {
"from": "2023-05-10T10:00:00+00:00",
"to": "2024-05-10T10:00:00+00:00"
},
"companyIds": [
100
],
"shopCountryIds": {
"allowList": [
1,
2
],
"blockList": [
3,
4
]
},
"effect": {
"type": "buy_x_get_y",
"additionalData": null
},
"conditions": [
{
"level": "global",
"key": "mov_100",
"condition": "payload.items.exists(i, 11003 in i.variant.id)"
}
],
"id": "645e0c241a93369ff53f26e0",
"version": "645e0c241a93369ff53f26e0",
"displayName": {
"de_DE": "Weihnachtsaktion",
"en_US": "Christmas promotion"
}
}
Response
Returns 201 with an object. Read it in later steps with {{createAPromotionPostPromotions.response.data.<field>}}.
{
"name": "Christmas Promotion",
"status": "active",
"activationType": "code",
"level": "basket",
"schedule": {
"from": "2023-05-10T10:00:00+00:00",
"to": "2024-05-10T10:00:00+00:00"
},
"companyIds": [
100
],
"shopCountryIds": {
"allowList": [
1,
2
],
"blockList": [
3,
4
]
},
"effect": {
"type": "buy_x_get_y",
"additionalData": null
},
"conditions": [
{
"level": "global",
"key": "mov_100",
"condition": "payload.items.exists(i, 11003 in i.variant.id)"
}
],
"id": "645e0c241a93369ff53f26e0",
"version": "645e0c241a93369ff53f26e0",
"displayName": {
"de_DE": "Weihnachtsaktion",
"en_US": "Christmas promotion"
}
}
Need more? See the SCAYLE Admin guide for connection setup and behaviour shared by every action.
Was this page helpful?