Menu
Update a promotion
Update a promotion
PUT
/update-promotion/{promotionId}Use it in a workflow
- Add a step and choose the SCAYLE Admin connector.
- Pick the Update a promotion action (under Promotions).
- Fill in the fields below, then reference the result from later steps as
{{updateAPromotion.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"name": "Christmas Promotion",
"schedule": {
"from": "2023-05-10T10:00:00+00:00",
"to": "2024-05-10T10:00:00+00:00"
},
"isActive": false,
"shopId": [
"139",
"554"
],
"companyId": [
"100"
],
"effect": {
"id": "buy_x_get_y",
"additionalData": {
"variant_ids": [
12389244,
23985437
],
"max_count": 1,
"max_count_type": "per_eligible_items_quantity",
"eligible_items_quantity": 6
}
},
"id": "645e0c241a93369ff53f26e0",
"version": "645e0c241a93369ff53f26e0",
"siblingPromotions": {
"enabled": false,
"allowList": [
"645e0c241a93369ff53f26e0",
"646235bf496f8f56171c3762"
],
"blockList": [
"64623787496f8f56171c3763"
],
"level": "basket"
},
"audiences": {
"allowList": [
"645e0c241a93369ff53f26e0",
"646235bf496f8f56171c3762"
],
"blockList": [
"64623787496f8f56171c3763"
]
},
"globalConditions": [
{
"key": "mov_100",
"condition": "payload.items.exists(i, 11003 in i.variant.id)"
}
],
"itemConditions": [
{
"key": "mov_100",
"condition": "item.color == 'yellow'"
}
]
}
Response
Returns 200 with an object. Read it in later steps with {{updateAPromotion.response.data.<field>}}.
{
"name": "Christmas Promotion",
"schedule": {
"from": "2023-05-10T10:00:00+00:00",
"to": "2024-05-10T10:00:00+00:00"
},
"isActive": false,
"shopId": [
"139",
"554"
],
"companyId": [
"100"
],
"effect": {
"id": "buy_x_get_y",
"additionalData": {
"variant_ids": [
12389244,
23985437
],
"max_count": 1,
"max_count_type": "per_eligible_items_quantity",
"eligible_items_quantity": 6
}
},
"id": "645e0c241a93369ff53f26e0",
"version": "645e0c241a93369ff53f26e0",
"siblingPromotions": {
"enabled": false,
"allowList": [
"645e0c241a93369ff53f26e0",
"646235bf496f8f56171c3762"
],
"blockList": [
"64623787496f8f56171c3763"
],
"level": "basket"
},
"audiences": {
"allowList": [
"645e0c241a93369ff53f26e0",
"646235bf496f8f56171c3762"
],
"blockList": [
"64623787496f8f56171c3763"
]
},
"globalConditions": [
{
"key": "mov_100",
"condition": "payload.items.exists(i, 11003 in i.variant.id)"
}
],
"itemConditions": [
{
"key": "mov_100",
"condition": "item.color == 'yellow'"
}
]
}
Need more? See the SCAYLE Admin guide for connection setup and behaviour shared by every action.
Was this page helpful?