Dynamic Pricing APIs (1.0.0)

Download OpenAPI specification:Download

E-mail: support@fabric.inc License: fabric INC

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

Promotions endpoint lets you evaluate promotions and discount coupons for one or more items instantly.

Evaluate promotions for items

Evaluates a cart's promotions, discount coupons and implicit promotions,either by specified itemId or by SKU (based on the customer specific configuration).

Request
header Parameters
x-api-key
required
string

The x-api-key lets you access fabric APIs without Authorization. You must request fabric Inc to obtain this key.

tenant-key
required
string

Tenant Id

Request Body schema: application/json
isLoggedIn
boolean

True if the user logged in, otherwise false

userId
string

User identification number

audit
boolean

True if audit is required, otherwise false

promoCodes
Array of strings

List of all the promotion codes to apply

Array of objects (promotion-request-shipping)

Shipping Information

required
Array of objects (promotion-request-item)

List of item information objects

date
string <date-time> yyyy-MM-ddThh:mm:ssZ

Date for which the promotions are evaluated.

Array of objects

Segment the user belongs to

Responses
200

Successfully evaluated the promotions

400

Bad Request

403

Forbidden

404

Not Found

500

Internal Server Error

post/promo/evaluate-promotions
Request samples
application/json
{
  • "isLoggedIn": true,
  • "userId": "5e2cfb9b45570b000864c4b5",
  • "audit": true,
  • "promoCodes": [
    ],
  • "shipping": [
    ],
  • "items": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "userProfile": {
    }
}
Response samples
application/json
[
  • {
    }
]

Price

Price endpoint lets you calculate instant prices for one or more items.

Get calculated prices by SKU

Gets final prices for items, after applying discount coupons and promotions, either by SKUs or by itemIds (based on the customer specific configuration).

Request
header Parameters
x-api-key
required
string

The x-api-key lets you access fabric APIs without Authorization. You must request fabric Inc to obtain this key.

tenant-key
required
string

Tenant Id

Request Body schema: application/json
priceList
required
Array of strings

List of price list Ids for which items or skus belong to

sku
Array of strings

List of SKU Ids of items for which prices are calcluated.Either SKUs or ItemIds required. If both are provided, SKU overrides itemId.

itemId
Array of integers <int32>

List of Item Ids for which prices are calculated. Either SKUs or ItemIds required. If both are provided, SKU overrides itemId.

userId
string

User Id

object

Segment the user belongs to

isLoggedIn
boolean

True if the user logged in, otherwise false

channel
Array of integers <int32>

List of channel id from where the request is coming

date
string <date-time> yyyy-MM-ddThh:mm:ssZ

Date for which the prices are calculatedd.

Array of objects (price-request-param)

Various price parameters to calculate the final price

audit
boolean

True if audit required, otherwise false

Responses
200

Successfully retrieved the prices

400

Bad Request

403

Forbidden

404

Not Found

500

Internal Server Error

post/price/get-by-sku
Request samples
application/json
{
  • "priceList": [
    ],
  • "sku": [
    ],
  • "itemId": [
    ],
  • "userId": "5e2cfb9b45570b000864c4b5",
  • "userProfile": {
    },
  • "isLoggedIn": true,
  • "channel": [
    ],
  • "date": "2019-08-24T14:15:22Z",
  • "priceParams": [
    ],
  • "audit": true
}
Response samples
application/json
[
  • {
    }
]