Skip to main content
POST
/
api-price
/
price
/
bulk-insert
Add or Update Bulk Price
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

priceListId
required

Pricelist Id or name. this is optional. Price will be updated for Default Pricelist if priceListId is not provided. price list id

Example:

100000

itemId
number
required

Item ID

Example:

1000011218

offers
object[]
required

Offers

Required array length: 1 - 10 elements
itemSku
string

SKU

Example:

"1234XYZ"

Response

Successful

_id
string

ID

Example:

"616e011037a3810008cfb256"

priceListId
number

Price List ID

Example:

100000

isSoftDeleted
boolean

Has been soft deleted

Example:

false

itemId
number

Internal Item ID

Example:

1000011218

itemSku
string

Produtct SKU

Example:

"1234XYZ"

offerId
number

Offer ID

Example:

381933

offers
object[]

Offers

Required array length: 1 - 10 elements
createdAt
string<date-time>

Date and time of creation

Example:

"2021-10-18T23:19:44.852Z"

updatedAt
string<date-time>

Date and time of updated

Example:

"2021-10-19T00:40:30.341Z"

job
boolean

Job

Example:

false

I