XM
Powered By GitBook
Validate Promotions
Path:
1
POST https://{baseurl}/api-price/promo/validate
Copied!
This API facilitates you to validate promotions for a customer, based on the specified item IDs.

Headers

Content-Type : application/json
x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

Parameters

Type: Body
Name: The criteria to validate promotions based on the item details along with promo codes.
Required: true

Sample Request

1
{
2
"isLoggedIn": false,
3
"userId": "5e2cfb9b45570b000864c4b5",
4
"promoCodes": ["300DOFF"],
5
"items": [
6
{
7
"lineItemId": 1,
8
"sku": "SKU0001",
9
"itemId": 1000000119,
10
"group": [
11
"5e2cfb9b45570b000863c4b5"
12
],
13
"quantity": 3,
14
"price": {
15
"base": 1000,
16
"sale": 0,
17
"currency": "USD"
18
}
19
}
20
]
21
}
Copied!

Response

HTTP Code: 200 Message: OK
Sample:
1
{
2
"isSuccess": true,
3
"items": [
4
{
5
"lineItemId": 1,
6
"sku": "SKU0001",
7
"itemId": 1000000227,
8
"priceListId": 10000003,
9
"group": [
10
"5e2cfb9b45570b000863c4b5"
11
],
12
"quantity": 3,
13
"price": {
14
"base": 299,
15
"sale": 0,
16
"kind": "Promotion",
17
"discount": 295.67
18
},
19
"shippingPrice": 10,
20
"shippingMethodId": "string",
21
"discount": [
22
{
23
"promoId": "5f9be340dde1cd0008f96034",
24
"promoCode": "BLACKFRIDAY",
25
"promoTitle": "Blackfriday sale",
26
"type": "COUPON",
27
"unit": "AMOUNT_OFF",
28
"value": 10
29
}
30
],
31
"discountQuantity": 3,
32
"discountAmount": 10,
33
"shippingDiscount": 10
34
}
35
],
36
"appliedDiscounts": [
37
{
38
"promoId": "5f9be340dde1cd0008f96034",
39
"promoTitle": "Blackfriday sale",
40
"type": "COUPON"
41
}
42
]
43
}
Copied!
HTTP Code: 406 Message: Promo not-stackable
Sample:
1
{
2
"code": "PROMO_NOT_STACKABLE",
3
"message": "NONSTACK promo not stackable."
4
}
Copied!

Change Log

    June - 2021
    March - 2021 First updated
Last modified 3mo ago
Copy link
Contents
Change Log