Menu
Get applicable promotions by code
Get applicable promotions by code
POST
/v1/baskets/{basketId}/promotion-codeUse it in a workflow
- Add a step and choose the SCAYLE Storefront connector.
- Pick the Get applicable promotions by code action (under baskets).
- Fill in the fields below, then reference the result from later steps as
{{getApplicablePromotionsByCode.response.data}}.
Request
Path parameters
Query parameters
Headers
Request body
Enter the body as JSON in the step's Body field.
{
"promotionCode": "string"
}
Response
Returns 200 with an object. Read it in later steps with {{getApplicablePromotionsByCode.response.data.<field>}}.
{
"key": "string",
"items": [
{
"key": "string",
"packageId": 0,
"quantity": 0,
"availableQuantity": 0,
"status": "available",
"variant": {
"id": 987654,
"price": {
"appliedReductions": [
{
"amount": null,
"category": null,
"type": null
}
],
"totalAppliedReductions": {
"amount": {
"absoluteWithTax": null,
"relative": null
}
},
"reductionsRelativeTo": "beforeSaleWithTax",
"currencyCode": "string",
"tax": {
"vat": {
"amount": null,
"rate": null
}
},
"withoutTax": 0,
"withTax": 0,
"beforeSaleWithTax": 5999,
"recommendedRetailPrice": 0,
"reference": {
"size": 0,
"unit": "string",
"withoutTax": 0,
"withTax": 0
},
"customData": {}
},
"referenceKey": 563843898,
"firstLiveAt": "2023-01-26T09:30:15Z",
"stock": {
"supplierId": 0,
"warehouseId": 0,
"quantity": 0,
"isSellableWithoutStock": false,
"expectedAvailabilityAt": "2023-01-26"
},
"customData": {},
"createdAt": "2023-01-26T09:30:15Z",
"updatedAt": "2023-01-26T09:30:15Z",
"isComposite": false,
"advancedAttributes": {},
"appliedPricePromotionKey": "promotion_key_123",
"attributes": {}
},
"product": {
"id": 0,
"images": [
{
"attributes": {},
"customData": {},
"hash": "string",
"name": "string",
"url": "string"
}
],
"customData": {},
"isActive": false,
"isNew": false,
"isSoldOut": false,
"masterKey": "480306626-1",
"firstLiveAt": "2023-01-26T09:30:15Z",
"referenceKey": "abc123",
"createdAt": "2023-01-26T09:30:15Z",
"updatedAt": "2023-01-26T09:30:15Z",
"indexedAt": "2023-01-26T09:30:15Z"
},
"price": {
"total": {
"appliedReductions": [
{
"amount": null,
"category": null,
"type": null
}
],
"currencyCode": "string",
"tax": {
"vat": {
"amount": null,
"rate": null
}
},
"withoutTax": 0,
"withTax": 0,
"recommendedRetailPrice": 0,
"reference": {
"size": 0,
"unit": "string",
"withoutTax": 0,
"withTax": 0
}
},
"unit": {
"appliedReductions": [
{
"amount": null,
"category": null,
"type": null
}
],
"currencyCode": "string",
"tax": {
"vat": {
"amount": null,
"rate": null
}
},
"withoutTax": 0,
"withTax": 0,
"recommendedRetailPrice": 0,
"reference": {
"size": 0,
"unit": "string",
"withoutTax": 0,
"withTax": 0
}
}
},
"lowestPriorPrice": {
"withTax": 0,
"relativeDifferenceToPrice": 0
},
"promotionId": "string",
"promotionCode": "string",
"itemGroup": {
"id": "string",
"isMainItem": false,
"isRequired": false
}
}
],
"cost": {
"appliedReductions": [
{
"amount": {
"absoluteWithTax": 0,
"relative": 0
},
"category": "campaign",
"type": "relative"
}
],
"currencyCode": "string",
"tax": {
"vat": {
"amount": 0,
"rate": 0
}
},
"withoutTax": 0,
"withTax": 0,
"recommendedRetailPrice": 0,
"reference": {
"size": 0,
"unit": "string",
"withoutTax": 0,
"withTax": 0
}
},
"packages": [
{
"id": 0,
"carrierKey": "string",
"deliveryDate": {
"min": "2018-02-02",
"max": "2018-02-05"
}
}
],
"applicablePromotions": [
{
"itemId": "string",
"promotion": {
"id": "string",
"name": "string",
"displayName": "string",
"isActive": false,
"priority": 0,
"schedule": {
"from": "2023-01-26T09:30:15Z",
"to": "2023-01-26T09:30:15Z"
},
"effect": {},
"conditions": [
{
"key": "string",
"level": "global",
"condition": "string"
}
],
"tiers": [
{
"id": 0,
"name": "string",
"mov": 0,
"effect": {
"additionalData": null
}
}
],
"customData": {
"headline": "string",
"subline": "string",
"link": "string",
"hideCountDown": false,
"highlightProductCards": false,
"condition": "string",
"color": {
"background": "string",
"text": "string"
},
"product": {
"badgeLabel": "string",
"attributeId": 0
}
}
}
}
],
"basketOutdated": false
}
Need more? See the SCAYLE Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?