Authentication v1
- Identity APIs
- User
- Address
- Auth
User Self Service APIs
- Introduction
- User Self Service APIs
- Authentication APIs
Experiences v2 (XM v2)
- XM
- Pages
- Global Components
- Menu
Experiences v1 (XM v1)
- XM
- Pages
- Global Components
- Menu
Product Catalog
- Product Catalog
- Category
- Product
- Attributes
- Bulk Import
Orders v2 (OMS v2)
- Order Management System
- Order
- Order Attribute
- Developer Guide
- Order Return
- Payment Status
- Package Tracking
- Cross Border
- Order Cancellation
- Appeasement
- Allocation
- Configuration
- Fraud Configuration
- Target Configuration
- Location
- Location Attribute
- Inventory Network
- Inventory
- Inventory Counter
- Inventory Bulk Operation
- Inventory Attribute
- Inventory Upload Log
- Shipment
- Shipping Method
- Webhook
- Notification
- Export
- Invoice
- Fraud
- Backorder Preorder Reservation
- List
Orders v1 (OMS v1)
- Order Management System
- Cart
- Bill To
- Ship To
- Wishlist
- Cart Decoupled
- Warehouse
- Inventory
- Attributes
- List
- Tax/Address Validate
- Shipping
- Payments
- Order
Offers v2
- Offers
- Developer Guide
- Promotion
- Price Kind
- Dynamic Pricing Engine
- Segment
- Coupon
- Coupon Codes
- Product
- Price List
- Attributes
- Item
- Price Guard
- Global Exclusion
- Upload Price CSV
- Pricing
- Redemption
- Exports
Offers v1
- Offers
- Login API
- Promotions
- Pricing
Subscriptions (SMT API)
- Subscriptions API
- Cancellation Reasons
- Subscription Discounts
- Subscriptions
- Subscribers
- Orders
Loyalty (Member)
- Member APIs
- Inquire
- Discounts
- Redeem
- Earn
- Members
Dropship
- Dropship API
- Shipments
- Products
- Invoices
- Connections
- Inventory
- Developer Guide
- Returns
- Orders
Cart API
- Cart
- Order Draft
- Attribute
- Adjustments
- Shipping
- Cart
Checkout API
- Checkout
- Checkout
Customer
- Core Concepts
- Customer Service
- Organization
- User Party
- Organization Group Addresses
- User Internal Party
- Organization Contracts
- Party
- Party Contracts
- Contracts
- User
- Search
- User Trait
- Organization Users
- Address
- User Address
- Trait
- Party Address
- Party Trait
- Organization Group Users
- Internal Party
- Contract Pricelist
- Internal Parties Party
- Account
- Party Account
- Organization Addresses
- Organization Groups
- Individual Addresses
- Users Organization
- Individual
Get calculated prices
Retrieves prices for items either by SKUs or by item IDs based on the customer specific configuration set in the backend.
curl --request POST \
--url https://live.copilot.fabric.inc/v1/price/get-by-sku \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"traceId": 394823457,
"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": "BASE",
"channel": 12,
"discounts": [
{
"amount": 10,
"value": 20,
"groupId": "61a6354d0d70e30009415f16",
"promotionId": "6197ec46e836ff000952c668",
"priority": 1,
"stackable": true,
"title": "20% off",
"quantity": 5,
"promotionType": "COUPON",
"discountType": "PERCENTAGE_OFF",
"application": 1,
"isAlwaysApplied": false,
"level": 1,
"stackingType": "STACKABLE",
"proratedAmount": 10,
"proratedQuantity": 1,
"promotionMessages": [
{
"promoId": "61df12345678900009b7091c",
"title": "Buy 2 get 1 free",
"message": "Offer valid at participating stores through September 5, 2023.",
"pages": [
"PDP"
],
"locales": [
"en-CA"
],
"type": "DISCOUNT",
"threshold": 2
}
]
}
],
"additionalAttributes": [
{}
],
"promotionMessages": [
{
"promoId": "6197ec46e836ff000952c667",
"threshold": 3,
"message": "Add another pair of shoes to get free socks!",
"locales": [
"en-US",
"en-GB"
],
"type": "PROXIMITY"
},
{
"promoId": "6197ec46e836ff000952c668",
"title": "Get free socks!",
"message": "Buy two pairs of shoes and get a pair of socks for free!",
"locales": [
"en-US",
"en-GB"
],
"pages": [
"PDP",
"CART"
],
"type": "POTENTIAL_DISCOUNT"
}
]
},
"audit": {
"userId": "62f5e25ca090100009c6e0f0",
"priceMethodType": "SurfaceArea_Square_Increment",
"quantity": 5,
"options": {
"length": 12,
"width": 10
},
"appliedAddons": [
"blind-motor"
]
}
}
]
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
The x-site-context
header is a JSON object that contains information about the source you wish to pull from. The mandatory account
is the 24 character identifier found in Copilot. The channel
(Sales channel ID), stage
(environment name), and date
attributes can be used to further narrow the scope of your data source.
Body
Prices conditions
Trace ID, used to trace logs
List of price list IDs which items or SKUs belong to
A list of Stock Keeping Units (SKUs) for items whose prices needs to be retrieved. Specify either SKUs or itemIds. If both are provided, the SKU takes precedence.
List of item IDs for items whose prices needs to be retrieved. Specify either SKUs or itemIds. If both are provided, the SKU takes precedence.
User ID
true if the user logged in<br /> false if the user is not logged in
List of channel ID from where the request is coming
Date for which the prices are to be retrieved
Various price parameters to calculate final price
Pricing options for calculation
Pricing pptions for calculation
Item SKU. Either SKU or ItemId is mandatory
Number of items ordered. Mandatory for Range-Base pricing method
Item ID. Either SKU or ItemId is mandatory
true if audit is required. Response body will have an audit object with details about how the dynamic pricing engine obtained the result.<br /> false if audit is not required.
Response
Price List ID
Item SKU
Item SKU
Offers on the price
Price at which the product is offered for sale
Cost price. Displayed if configured earlier
Minimum fixed price of a single unit of the item
Final calculated price of the item. Does not include discounts.
Currency
Final calculated price of the item, include discounts.
Price kind name
Channel for which the price is retrieved
Discount object
Actual discount amount
Discount in percent or amount
ID of the group or category this item belongs to
Promotion ID
The order in which promotion should be applied. Promotion types are assigned a default priority. First, priority 1 promotions will be evaluated. The result of priority 1 will be used as a base price for priority 2. Similarly, the result of priority 2 will be used as a base price for priority 3 and so on.
true indicates promotions are stackable, meaning their discounts will be summed together. Stackable promotions will be applied regardless of other promotions being applied.<br /> false indicates promotions are non-stackable, meaning discounts will be compared, within the same priority, and the maximum discount will be applied for promotion.
Promotion title
Item quantity
Promotion type
Discount Type
PERCENTAGE_OFF
, AMOUNT_OFF
, FIXED_PRICE
It is used specifically for BuyGet type that applies when you Buy something and Get discount of some amount or percentage or free items. This field indicates how many times this BuyGet promotion is applied.
A flag indicating whether the promotion is always applied. Set it to true
if the promotion is always applied, even on non-stackable promotions and false
to apply promotions based on configured conditions.
The promotion execution order. Promotion types are assigned default execution orders. Initial evaluation begins with level 1 promotions. The result of level 1 is used as the base price for level 2. Similarly, the result of level 2 becomes the base price for level 3, and so on.
Defines the rules for how a promotion can be combined with other promotions. This field determines whether a specific promotion can be applied in conjunction with other active promotions during a transaction or if it must be used exclusively. Possible values: - STACKABLE
: This promotion can be combined with other stackable promotions, allowing multiple
discounts to be applied together. The order in which stackable promotions are applied
is determined by the level
field, with promotions having a higher priority (lower numeric value)
being applied before those with a lower priority.
EXCLUSIVE
: This promotion cannot be combined with any other promotions. Thelevel
field is used to determine which exclusive promotion will be evaluated and applied first. Once an exclusive promotion is applied, no other promotions can be used in the same transaction.TYPE_EXCLUSIVE
: This promotion cannot be combined with other promotions of the same type. Thelevel
field is used to determine which promotion within the same type will be evaluated and applied first.UNIVERSAL
: This promotion can be combined with any other promotions without restrictions. Universal promotions will be evaluated last.
STACKABLE
, EXCLUSIVE
, TYPE_EXCLUSIVE
, UNIVERSAL
The BuyGet promotions distribute the discount across specified parameters. For example, when buying A results in a discount on B, the discount amount on B is prorated across both A and B. The distributed amount is reflected in proratedAmount
, while the quantity is captured in proratedQuantity
.
The proratedQuantity
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.
The promotion message that is displayed to the customer.
Promotion ID
The title of the promotion message, summarizing the offer or discount type.
A promotional message providing details about the offer, including eligibility, duration, and conditions.
The web pages where the message is displayed, whether the product display page (PDP), product list page (PLP), the customer's cart, or the checkout page.
PDP
, PLP
, Cart
, Checkout
The geographic regions where the promotion message is displayed, determined by the user's IP address. Locales define language and country-specific settings for promotions.
Specifies the promotion message type.
DISCOUNT
: The discount has been applied.PROXIMITY
: The product or cart is close to meeting discount conditions.POTENTIAL_DISCOUNT
: The product could qualify for a discount but has not yet.
DISCOUNT
, PROXIMITY
, POTENTIAL_DISCOUNT
Indicates a quantity or amount that is close to meeting the discount requirement. If the user reaches this value, a promotion message is displayed. This field is only valid for PROXIMITY messages.
A placeholder for additional attributes, in key-value pairs.
The promotion message that is displayed to the customer.
Promotion ID
The title of the promotion message, summarizing the offer or discount type.
A promotional message providing details about the offer, including eligibility, duration, and conditions.
The web pages where the message is displayed, whether the product display page (PDP), product list page (PLP), the customer's cart, or the checkout page.
PDP
, PLP
, Cart
, Checkout
The geographic regions where the promotion message is displayed, determined by the user's IP address. Locales define language and country-specific settings for promotions.
Specifies the promotion message type.
DISCOUNT
: The discount has been applied.PROXIMITY
: The product or cart is close to meeting discount conditions.POTENTIAL_DISCOUNT
: The product could qualify for a discount but has not yet.
DISCOUNT
, PROXIMITY
, POTENTIAL_DISCOUNT
Indicates a quantity or amount that is close to meeting the discount requirement. If the user reaches this value, a promotion message is displayed. This field is only valid for PROXIMITY messages.
Was this page helpful?
curl --request POST \
--url https://live.copilot.fabric.inc/v1/price/get-by-sku \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"traceId": 394823457,
"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": "BASE",
"channel": 12,
"discounts": [
{
"amount": 10,
"value": 20,
"groupId": "61a6354d0d70e30009415f16",
"promotionId": "6197ec46e836ff000952c668",
"priority": 1,
"stackable": true,
"title": "20% off",
"quantity": 5,
"promotionType": "COUPON",
"discountType": "PERCENTAGE_OFF",
"application": 1,
"isAlwaysApplied": false,
"level": 1,
"stackingType": "STACKABLE",
"proratedAmount": 10,
"proratedQuantity": 1,
"promotionMessages": [
{
"promoId": "61df12345678900009b7091c",
"title": "Buy 2 get 1 free",
"message": "Offer valid at participating stores through September 5, 2023.",
"pages": [
"PDP"
],
"locales": [
"en-CA"
],
"type": "DISCOUNT",
"threshold": 2
}
]
}
],
"additionalAttributes": [
{}
],
"promotionMessages": [
{
"promoId": "6197ec46e836ff000952c667",
"threshold": 3,
"message": "Add another pair of shoes to get free socks!",
"locales": [
"en-US",
"en-GB"
],
"type": "PROXIMITY"
},
{
"promoId": "6197ec46e836ff000952c668",
"title": "Get free socks!",
"message": "Buy two pairs of shoes and get a pair of socks for free!",
"locales": [
"en-US",
"en-GB"
],
"pages": [
"PDP",
"CART"
],
"type": "POTENTIAL_DISCOUNT"
}
]
},
"audit": {
"userId": "62f5e25ca090100009c6e0f0",
"priceMethodType": "SurfaceArea_Square_Increment",
"quantity": 5,
"options": {
"length": 12,
"width": 10
},
"appliedAddons": [
"blind-motor"
]
}
}
]