---
title: "Create or update price"
method: POST
path: "/api-offers/price"
tags: ["Pricing"]
---

# Create or update price

`POST /api-offers/price`

## Request

- Base URL: `https://live.copilot.fabric.inc`
- URL: `https://live.copilot.fabric.inc/api-offers/price`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/fabric/apis/offers-v2/docs/api-offers/price/post.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Headers

- `x-site-context` string, required

## Request body

- CreatePrice
  - `priceListId` union: `Optional`. ID or name of the price list to update the price for. If you do not provide ID or name, price will be updated for the *default* price list.<br /> If you're using this endpoint to create price details, the price list ID will be generated automatically.
    - string
    - number
  - `itemIds` number[], required: Item IDs to create or update the price for
  - `itemSkus` string[]: SKUs of the products to create or update the price for
  - `offers` object[], required
    - `kind` number: Pricekind ID. This ID helps to identify if the price is base price or clearance price or any other additional price.
    - `channel` number, required: Sales channel ID
    - `startDate` string, date-time, required: Price start date and time
    - `endDate` string, date-time, required: Price end date and time
    - `price` object, required: Price data
      - `base` number: Base price of the item
      - `sale` number: Price at which the product is offered for sale
      - `cost` number: Cost of the item, set by the manufacturer, if any
      - `currency` string: Currency code of the price
    - `additionalAttributes` object[]: A placeholder for additional attributes, in key-value pairs.
      - `customSkuTitle` string
      - `customCategory` string

## Response `200`

OK

- object[]: List of created or updated prices
  - `id` string: fabric internal ID
  - `isSoftDeleted` boolean: true: Price is soft deleted, means the details are removed from UI but are available in the databse.<br /> false: Price is not deleted
  - `itemId` number: ID of the item
  - `itemSku` string: SKU of the item
  - `priceListId` number: ID of the pricelist to which the created price is added or updated
  - `offerId` number: ID of the created offer for the itemId or itemSku
  - `offers` object[]: Prices of the SKU or priceListId
    - `kind` number: Pricekind ID. This ID helps to identify if the price is base price or clearance price or any other additional price.
    - `channel` number: Channel ID
    - `startDate` string, date-time: Price start date-time
    - `endDate` string, date-time: Price end date-time
    - `price` object: Price data
      - `base` number: Minimum fixed price of the item
      - `sale` number: Price at which the product is offered for sale
      - `cost` number: Cost of the item if any
      - `currency` string: Currency code of the price
    - `priceMethodType` 'Range-Base' | 'SurfaceArea_Square_Increment' | 'SurfaceArea_Square_Increment_2Dim': Type of method for calculating the price. <br /> **Range-Base:** Uses the quantity of sold items to determine which price to use. Base price (minimum fixed price) is ignored in this method.<br /> **SurfaceArea_Square_Increment:** Adds an incremental amount depending on the area of the item. The final price is calculated by adding the area multiplied by the price set for quantity, to the base price. For example, if we sell a rug that is 10x2, final price will be the base price (50, for example), plus an increment of the area (20) times the price range set for min quantity.<br /> **SurfaceArea_Square_Increment_2Dim:** Adds extra price to the base price, determined by the area. The difference with this Square Area method is that in this case the overprice is not calculated, but instead it is looked-up in a table-like structure that is already created, by checking for the range of values provided in `width`.
    - `additionalAttributes` object[]: A placeholder for additional attributes, in key-value pairs.
      - `customSkuTitle` string
      - `customCategory` string
  - `createdAt` string, date-time: Price creation date-time
  - `updatedAt` string, date-time: price last updated date-time
  - `job` boolean: true: Job is running either to create or update details<br /> false: Job is either completed or not running for some reason

## Other responses

- `400`: Bad request
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/fabric/apis/offers-v2.md) - [All operations](https://skmtc.dev/fabric/apis/offers-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/fabric/apis/offers-v2/revisions/da2bd742b9bc?raw)
