Pricing

Create or update price

Creates or updates price details for one or many items based on given item IDs. Support for currency code is determined based on the currency code you have set while creating the price list, whuch is identified by priceListId in the request body.

post/api-offers/price

Request

Headers

x-site-contextstring required
Example:{"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account": "1234abcd5678efgh9ijklmno","stage":"production"}

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.

Request body

itemIdsnumber[] required

Item IDs to create or update the price for

itemSkusstring[]

SKUs of the products to create or update the price for

Example request

{
  "priceListId": "100-TwoWeeks",
  "itemIds": [
    10000001
  ],
  "itemSkus": [
    "SKU0123456"
  ],
  "offers": [
    {
      "kind": 12,
      "channel": 12,
      "price": {
        "base": 299,
        "sale": 199,
        "cost": 149,
        "currency": "USD"
      },
      "additionalAttributes": [
        {
          "customSkuTitle": "HOUSE TREE",
          "customCategory": "HOME"
        }
      ]
    }
  ]
}

Response

OK

idstring

fabric internal ID

isSoftDeletedboolean

true: Price is soft deleted, means the details are removed from UI but are available in the databse.<br /> false: Price is not deleted

itemIdnumber

ID of the item

itemSkustring

SKU of the item

priceListIdnumber

ID of the pricelist to which the created price is added or updated

offerIdnumber

ID of the created offer for the itemId or itemSku

createdAtstring date-time

Price creation date-time

updatedAtstring date-time

price last updated date-time

jobboolean

true: Job is running either to create or update details<br /> false: Job is either completed or not running for some reason

Example response

[
  {
    "itemId": 1000000051,
    "itemSku": "SKU123456",
    "priceListId": 100000,
    "offerId": 2386,
    "offers": [
      {
        "kind": 12,
        "channel": 12,
        "price": {
          "base": 299,
          "sale": 199,
          "cost": 149,
          "currency": "USD"
        },
        "priceMethodType": "Range-Base",
        "additionalAttributes": [
          {
            "customSkuTitle": "HOUSE TREE",
            "customCategory": "HOME"
          }
        ]
      }
    ],
    "createdAt": "2020-02-02T17:22:48.570Z",
    "updatedAt": "2020-02-02T17:22:48.570Z"
  }
]

Changes

No recorded changes to this operation across all 2 revisions of this API.