POST
/
api-price
/
price
curl --request POST \
  --url https://prod01-apigw.{customer_name}.fabric.zone/api-price/price \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-site-context: <x-site-context>' \
  --data '{
  "priceListId": 100000,
  "itemIds": [
    [
      1000011218
    ]
  ],
  "itemSkus": [
    "1234XYZ"
  ],
  "offers": [
    {
      "kind": 12,
      "channel": 12,
      "startDate": "2021-12-30T02:05:47.234Z",
      "endDate": "2099-12-31T00:00:00.000Z",
      "price": {
        "base": 2000,
        "sale": 1000,
        "cost": 800,
        "currency": "USD"
      },
      "range": [
        {
          "minQuantity": 2,
          "price": 500
        }
      ]
    }
  ]
}'
{
  "_id": "616e011037a3810008cfb256",
  "priceListId": 100000,
  "isSoftDeleted": false,
  "itemId": 1000011218,
  "itemSku": "1234XYZ",
  "offerId": 371922,
  "offers": [
    {
      "kind": 12,
      "channel": 12,
      "startDate": "2021-12-30T02:05:00.000Z",
      "endDate": "2099-12-31T00:00:00.000Z",
      "price": {
        "base": 2000,
        "sale": 1000,
        "cost": 800,
        "currency": "USD"
      },
      "range": [
        {
          "_id": "616e143828d0b800086dd84a",
          "minQuantity": 2,
          "price": 500
        }
      ]
    }
  ],
  "createdAt": "2021-10-18T23:19:44.852Z",
  "updatedAt": "2021-10-19T00:40:30.341Z",
  "job": false
}

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\"}"

x-api-key
string
required

The x-api-key enables you to access fabric APIs without Authorization. You must request fabric Inc to obtain this key.<br /> Authorization header is required if x-api-key is omitted.

Body

application/json
A JSON object that contains price information.

Price Insert Object.

Response

200
application/json
Successfully creates price.

Create Price Response