- Support
- Product Releases
- Blog
- Overview
- API References
- API Authentication
- Getting Started with fabric APIs
- Making your first API request
- Example
- Using Developer Portal
- Security and Compliance
Attributes Mapping
Attributes
- Developer Guide
- Product Catalog API - Overview
- Product Catalog - Attributes API
Attribute Groups
Bulk Action for Categories and Collections
Categories
Collections
- Navigation Paths
Files
Jobs
Product Operations by ID
Product Operations by SKU
General Product Operations
- Product Catalog - Files and Jobs API
Published Products by ID
Published Products by SKU
- Product Catalog - Published Products API
- Product Catalog FAQs
Allocations
- Orders (3.0.0)
Backorders Preorders
Exports
Developer Guide
Invoices
Shopping Lists
Shopping List Items
Notifications
Orders
Returns
Cancellations
Tracking
Frauds
Payments
Appeasements
Credits
Shipments
Shipping Methods
Shipping Method Items
Webhooks
- Orders FAQ(s)
- Overview
- Algolia standard integration
- Avalara standard integration
- Constructor.io standard integration
- Stripe standard integration
- Offers (3.0.0)
Real-time Pricing Engine
Promotions
Webhook Events
Redemptions
Priced Products
Product Exclusion Lists
Price Types
Coupons
Coupon Codes
Segments
Prices
Price Methods
Price Controls
Price Lists
Add-ons
Exports
Imports
Attributes
Customer Profile
Customer Address
Customer Self
Getting Started
Product Catalog
Orders
Integrations
Offers
Customers
Calculate prices for products by SKUs
Use this endpoint to calculate prices for one or more products in a specific price list by product SKUs. Note that the itemId
is used as the default identifier for a product. If you want to set SKUs as product identifiers, you must contact fabric support at support@fabric.inc.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Merchant's 24-character tenant ID
The Date and time, in ISO 8601 format, for which the evaluation should be done. The prices and promotions that are active on this date will be considered for evaluation.
A unique request ID.
The sales channel ID.
Evaluate prices for products based on their individual SKUs.
Price list ID of the item.
List of product SKUs for which prices are to be retrieved. You can specify up to 50 SKUs.
Customer details
Unique identifier for the customer
List of segments to which the customer belongs
Parameters for price calculation
Specifies whether an audit is required. The options are:<br />true: Response includes an audit object mentioning how the price is calculated.<br />false: Response doesn't include an audit object.
The language code, which is a combination of language (ISO 639 format) and country (ISO 3166 format). <br />Default value is en-US.
curl --request POST \
--url https://api.fabric.inc/v3/price-engine/actions/evaluate-products-by-sku \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-channel-id: <x-fabric-channel-id>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '{
"priceListId": 100275,
"skus": [
"1000019501",
"1000019502"
],
"customer": {
"id": "5e2cfb9b45570b000864c4b5",
"segments": [
{
"name": "category",
"value": [
"GOLD",
"YELLOW"
]
},
{
"name": "ageGroup",
"value": [
"elderly"
]
}
]
},
"priceParameters": [
{
"additionalProperties": [
{
"id": "length",
"value": 10
},
{
"id": "width",
"value": 20
}
],
"selectedAddOns": [
"blind_motor"
],
"sku": "1000019501",
"quantity": 500
}
],
"isAudit": true,
"locale": "en-US"
}'
{
"errors": [],
"data": [
{
"priceListId": 100275,
"itemId": 11111111,
"currency": "USD",
"channelId": "12",
"offer": {
"price": {
"sale": 1000.15,
"cost": 900.15,
"base": 2000.15,
"unitPriceWithoutDiscounts": 2000.15,
"lineTotalWithoutDiscounts": 2000.15,
"lineTotalWithDiscounts": 2000.15,
"type": "BASE"
},
"discounts": [
{
"amount": 100.15,
"quantity": 1,
"application": 1,
"promotion": {
"id": "6197ec46e836ff000952d668",
"value": 2000.15,
"groupId": "61a6354d0d70e30009415f16",
"level": 1,
"isStackable": true,
"isAlwaysApplied": true,
"name": "20% OFF",
"type": "Coupon",
"discountType": "AMOUNT_OFF"
}
}
],
"suggestedProducts": [
{
"promotionId": "6197ec46e836ff000952c668",
"promotionName": "Buy Shoes, get socks 50% off",
"skus": [
"SOCK1",
"SOCK2",
"SOCKN"
],
"eligiblePriceLists": [
10000
],
"isFree": false,
"discountType": "PERCENTAGE_OFF",
"amount": 50,
"quantity": 1
}
],
"additionalAttributes": [
{}
]
},
"audit": {
"userId": "62f5e25ca090100009c6e0f0",
"priceMethodType": "SurfaceArea_Square_Increment",
"quantity": 50,
"priceParameters": {
"additionalProperties": [
{
"id": "length",
"value": 10
},
{
"id": "width",
"value": 20
}
]
},
"appliedAddons": [
{
"name": "blind-motor",
"value": 100
}
]
}
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Merchant's 24-character tenant ID
The Date and time, in ISO 8601 format, for which the evaluation should be done. The prices and promotions that are active on this date will be considered for evaluation.
A unique request ID.
The sales channel ID.
Body
Price list ID of the item.
List of product SKUs for which prices are to be retrieved. You can specify up to 50 SKUs.
Customer details
Unique identifier for the customer
List of segments to which the customer belongs
Segment name
Segment values
Parameters for price calculation
The additional properties for calculating the price.
The variable ID.
The variable value.
List of add-ons selected for the product
Product SKU
Number of products ordered, mandatory for Range-Base pricing method
Specifies whether an audit is required. The options are:<br />true: Response includes an audit object mentioning how the price is calculated.<br />false: Response doesn't include an audit object.
The language code, which is a combination of language (ISO 639 format) and country (ISO 3166 format). <br />Default value is en-US.
Response
Errors array
The error code.
An error message corresponding to the type
.
Price list ID of the item
Product SKU
Discounts or special offers applied to the price.
Calculated price details of line items
Price at which the product is offered for sale
Cost of goods sold, from either producing or purchasing from other vendors
Starting price of a single item
Price of a single item without discount. This price is either the base
or sale
price. The type used is noted in the type
property.
Total price of all items without calculating discounts. This is the unitPriceWithoutDiscounts
multiplied by the quantity.
Total price of all items after all discounts. This is the unitPriceWithoutDiscounts multiplied by the quantity, less the promotion discount(s).
Price type
Currency string value
A list of discounts applied to the price.
Actual discount amount
The number of items eligible for the promotional discount.
The discount amount distributed proportionally among all the selected items. The distribution is determined based on each item's price relative to the total price of all participating items. Typically, proratedAmount
matches the amount
. However, there might be variations, particularly in the context of Buy-Get promotions.
This is used in conjunction with proratedAmount
to determine the discount portion allocated to the respective units of BuyGet promotions. This is applicable in partial return scenarios.
An identifier for an instance of the Buy-Get promotion that can be applied repeatedly. For example, consider a promotion - Buy 1 shirt and get 1 pant at a 20% off. If a shopper buys three shirts, 20% discount is individually applied to each shirt-pant pair. Each such discounted pair is assigned a unique application
number for tracking purposes.
The promotion details.
A 24-character system-generated Promotion ID.
The discount in percent or amount.
ID of the group or category this product belongs to
The order in which the current promotion is executed.
A flag indicating whether the promotion is stackable. Set to true
to combine the given promotion with other promotions. The discount of the current promotion is combined with other promotions, if applicable, to the item. Set to false
if the promotion is not stackable; the given promotion cannot be combined with other promotions.
A flag indicating whether the promotion is always applied regardless of any exclusive promotions on the same item. Set to true
if the promotion is always applied and set to false
if the promotion is not applied on the item by default.
The name of the promotion.
The type of the promotion.
The type of discount.
PERCENTAGE_OFF
, AMOUNT_OFF
, FIXED_PRICE
The suggested products.
A placeholder for additional price attributes, in key-value pairs.
Details about how the price is calculated
ID of the user who created the price
Method used to calculate the price
Quantity for which the price was calculated
The additional parameters for calculating the price.
The additional properties for calculating the price.
The variable ID.
The variable value.
List of additional components used in the price calculation
Was this page helpful?
curl --request POST \
--url https://api.fabric.inc/v3/price-engine/actions/evaluate-products-by-sku \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-channel-id: <x-fabric-channel-id>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '{
"priceListId": 100275,
"skus": [
"1000019501",
"1000019502"
],
"customer": {
"id": "5e2cfb9b45570b000864c4b5",
"segments": [
{
"name": "category",
"value": [
"GOLD",
"YELLOW"
]
},
{
"name": "ageGroup",
"value": [
"elderly"
]
}
]
},
"priceParameters": [
{
"additionalProperties": [
{
"id": "length",
"value": 10
},
{
"id": "width",
"value": 20
}
],
"selectedAddOns": [
"blind_motor"
],
"sku": "1000019501",
"quantity": 500
}
],
"isAudit": true,
"locale": "en-US"
}'
{
"errors": [],
"data": [
{
"priceListId": 100275,
"itemId": 11111111,
"currency": "USD",
"channelId": "12",
"offer": {
"price": {
"sale": 1000.15,
"cost": 900.15,
"base": 2000.15,
"unitPriceWithoutDiscounts": 2000.15,
"lineTotalWithoutDiscounts": 2000.15,
"lineTotalWithDiscounts": 2000.15,
"type": "BASE"
},
"discounts": [
{
"amount": 100.15,
"quantity": 1,
"application": 1,
"promotion": {
"id": "6197ec46e836ff000952d668",
"value": 2000.15,
"groupId": "61a6354d0d70e30009415f16",
"level": 1,
"isStackable": true,
"isAlwaysApplied": true,
"name": "20% OFF",
"type": "Coupon",
"discountType": "AMOUNT_OFF"
}
}
],
"suggestedProducts": [
{
"promotionId": "6197ec46e836ff000952c668",
"promotionName": "Buy Shoes, get socks 50% off",
"skus": [
"SOCK1",
"SOCK2",
"SOCKN"
],
"eligiblePriceLists": [
10000
],
"isFree": false,
"discountType": "PERCENTAGE_OFF",
"amount": 50,
"quantity": 1
}
],
"additionalAttributes": [
{}
]
},
"audit": {
"userId": "62f5e25ca090100009c6e0f0",
"priceMethodType": "SurfaceArea_Square_Increment",
"quantity": 50,
"priceParameters": {
"additionalProperties": [
{
"id": "length",
"value": 10
},
{
"id": "width",
"value": 20
}
]
},
"appliedAddons": [
{
"name": "blind-motor",
"value": 100
}
]
}
}
]
}