POST
/
v1
/
price
/
get-by-sku
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

Authorization
string
header
required

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

Headers

x-site-context
string
required

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.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Body

application/json

Prices conditions

Response

200
application/json

Successfully retrieved the prices

The response is of type object[].