POST
/
api-price
/
price
/
bulk-insert
curl --request POST \
  --url https://prod01-apigw.{customer_name}.fabric.zone/api-price/price/bulk-insert \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-site-context: <x-site-context>' \
  --data '[
  {
    "priceListId": 100000,
    "itemId": 1000011218,
    "itemSku": "1234XYZ",
    "offers": [
      {
        "kind": 0,
        "channel": 12,
        "startDate": "2021-12-30T02:05:47.234Z",
        "endDate": "2099-12-31T00:00:00.000Z",
        "range": [
          {
            "minQuantity": 2,
            "price": 500
          }
        ],
        "price": {
          "base": 2000,
          "sale": "",
          "cost": "",
          "currency": "USD"
        }
      }
    ]
  }
]'
[
  {
    "_id": "616e011037a3810008cfb256",
    "priceListId": 100000,
    "isSoftDeleted": false,
    "itemId": 1000011218,
    "itemSku": "1234XYZ",
    "offerId": 381933,
    "offers": [
      {
        "kind": 0,
        "channel": 12,
        "startDate": "2021-12-30T02:05:00.000Z",
        "endDate": "2099-12-31T00:00:00.000Z",
        "price": {
          "base": 2000,
          "sale": null,
          "cost": "",
          "currency": "USD"
        },
        "offerCode": 123786,
        "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 the fabric API without Authorization. You must request fabric Inc to obtain this key.<br />Authorizationheader is required ifx-api-key` is omitted.

Body

application/json · object[]
Array of Items

The body is of type object[].

Response

200
application/json
Successful

The response is of type object[].