POST
/
price-engine
/
actions
/
evaluate-products-by-sku
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

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-fabric-tenant-id
string
required

Merchant's 24-character tenant ID

x-fabric-date
string

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.

x-fabric-request-id
string

A unique request ID.

x-fabric-channel-id
string
required

The sales channel ID.

Body

application/json
priceListId
integer
required

Price list ID of the item.

skus
string[]
required

List of product SKUs for which prices are to be retrieved. You can specify up to 50 SKUs.

customer
object

Customer details

priceParameters
object[]

Parameters for price calculation

isAudit
boolean

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.

locale
string

The language code, which is a combination of language (ISO 639 format) and country (ISO 3166 format). <br />Default value is en-US.

Response

200 - application/json
errors
object[]

Errors array

data
object[]