Download OpenAPI specification:Download
fabric's Dynamic Pricing Engine provides APIs that help to evaluate promotions and calculate prices instantly for the cart items using real-time price calculation method, that incorporates the latest information, to provide personalized and competitive prices for specific customers. It supports formula based custom SKU dynamic pricing, and shows discount breakdown details for separate items having separate promotions.
It uses the cache information, instead of fetching offer details of items from database, to evaluate promotions and calculate prices instantly. It is fast, scalable to millions of pricing requests per day, and supports complex promotional strategies.
Promotions endpoint lets you evaluate promotions and discount coupons for one or more items instantly.
Evaluates a cart's promotions, discount coupons and implicit promotions,either by specified itemId or by SKU (based on the customer specific configuration).
Successfully evaluated the promotions
Bad Request
Forbidden
Not Found
Internal Server Error
{- "isLoggedIn": true,
- "userId": "5e2cfb9b45570b000864c4b5",
- "audit": true,
- "promoCodes": [
- "SUPERCOUPON1",
- "FIRSTPURCHASE10"
], - "shipping": [
- {
- "shippingMethodId": 123,
- "shippingPrice": 20
}
], - "items": [
- {
- "lineItemId": 1,
- "priceList": "100275",
- "sku": "1111111",
- "itemId": 1111111,
- "quantity": 5,
- "group": [
- "5e2cfb9b45570b000863c4b5"
], - "hierarchy": [
- [
- "clothingId1",
- "footwear",
- "sandalsId1"
], - [
- "nike",
- "sandalsId2"
], - [
- "clothingId2",
- "beach"
]
], - "productAttributes": {
- "color": "Red",
- "brand": "Nike",
- "size": "10"
}, - "priceParams": {
- "options": {
- "length": "2",
- "width": "15",
- "blindMotor": true
}
}, - "price": {
- "sale": 10,
- "cost": 9,
- "base": 10,
- "finalPrice": 20,
- "currency": "USD"
}, - "channel": [
- 12,
- 15
], - "shippingMethodId": 123,
- "shippingPrice": 20
}
], - "date": "2019-08-24T14:15:22Z",
- "userProfile": {
- "Customer Type": [
- "Wholesale"
]
}
}
[- {
- "items": [
- {
- "lineItemId": 1,
- "sku": "1111111",
- "itemId": 1111111,
- "priceList": "100275",
- "group": [
- "5e2cfb9b45570b000863c4b5",
- "clothingId1",
- "footwear"
], - "quantity": 5,
- "price": {
- "currency": "USD",
- "base": 10,
- "kind": "BASE",
- "totalPrice": 50,
- "finalPrice": 50,
- "sale": 50
}, - "priceAttributes": {
- "cost": 9,
- "floor": 10,
- "clearance": 10
}, - "discount": [
- {
- "quantity": 5,
- "amount": 10,
- "unit": "%OFF",
- "value": 10,
- "promoId": "6197ec46e836ff000952c668",
- "promoCode": "SUPERCOUPON20",
- "promoTitle": "20% off",
- "type": "COUPON"
}
], - "attributes": {
- "color": "red",
- "brand": "Nike",
- "size": "10"
}, - "shippingPrice": 20,
- "shippingMethodId": 123,
- "shippingDiscount": 5
}
], - "errors": [
- [
- "Parameter does not exist"
]
], - "shipping": [
- {
- "shippingMethodId": 456,
- "shippingPrice": 5,
- "shippingDiscount": 5
}
], - "appliedDiscounts": [
- {
- "promoId": "6197ec46e836ff000952c668",
- "promoCode": "SUPERCOUPON20",
- "promoTitle": "20% off",
- "type": "COUPON",
- "amount": 10
}
], - "notAppliedCoupons": [
- {
- "promoCode": "SUPERCOUPON",
- "message": "Invalid coupon"
}
], - "success": true
}
]
Gets final prices for items, after applying discount coupons and promotions, either by SKUs or by itemIds (based on the customer specific configuration).
Successfully retrieved the prices
Bad Request
Forbidden
Not Found
Internal Server Error
{- "priceList": [
- 100275,
- 100276
], - "sku": [
- 1000019501,
- 1000019502
], - "itemId": [
- 111111,
- 222222
], - "userId": "5e2cfb9b45570b000864c4b5",
- "userProfile": {
- "Customer Type": [
- "Wholesale"
]
}, - "isLoggedIn": true,
- "channel": [
- 12,
- 15
], - "date": "2019-08-24T14:15:22Z",
- "priceParams": [
- {
- "options": {
- "length": "2",
- "width": "15",
- "blindMotor": true
}, - "sku": "11111",
- "quantity": 5,
- "itemId": 12345
}
], - "audit": true
}
[- {
- "priceList": "100275",
- "sku": "11111111",
- "itemId": 11111111,
- "offers": {
- "price": {
- "sale": 10,
- "cost": 9,
- "base": 10,
- "finalPrice": 20,
- "currency": "USD",
- "totalPrice": 15
}, - "kind": "1",
- "channel": 12,
- "discounts": [
- {
- "amount": 10,
- "value": 20,
- "groupId": "61a6354d0d70e30009415f16",
- "promotionId": "6197ec46e836ff000952c668",
- "priority": 1,
- "stackable": true,
- "title": "20% off",
- "quantity": 5,
- "promotionType": "COUPON",
- "discountType": "PERCENTAGE"
}
]
}, - "audit": true
}
]