PUT
/
inventory
curl --request PUT \
  --url https://prod01.oms.fabric.inc/api/v2/inventory \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-site-context: <x-site-context>' \
  --data '{
  "sku": "SKU00025",
  "itemId": 4225678911,
  "locationNum": 473746,
  "channelId": 12,
  "vendorId": "vendor123",
  "leadTime": 1234,
  "inventoryType": "primary",
  "infiniteInventory": true,
  "backOrderDate": "2022-08-08T00:00:00.000Z",
  "preOrderDate": "2022-08-08T00:00:00.000Z",
  "backOrderLimit": 100,
  "preOrderLimit": 100,
  "safetyStock": 10,
  "lowStock": 10,
  "segment": "Clothing",
  "region": "US",
  "counters": {
    "on-hand": 10
  },
  "attributes": {
    "buy online, pick up in-store (bopis)": true
  }
}'
{
  "virtualCounters": {
    "availableToPurchase": 10
  },
  "id": "62272e917b12209e68751d94",
  "sku": "SKU00025",
  "itemId": 4225678911,
  "locationNum": 473746,
  "channelId": 12,
  "vendorId": "vendor123",
  "leadTime": 1234,
  "inventoryType": "Safety stock",
  "infiniteInventory": true,
  "counters": {
    "on-hand": 10
  },
  "attributes": {
    "buy online, pick up in-store (bopis)": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

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

Body

application/json
sku
string
required

SKU of the item

Example:

"SKU00025"

itemId
integer
required

Item ID

Example:

4225678911

locationNum
integer
required

Location number is used to identify the warehouse or location where the inventory is going to be kept

Example:

473746

channelId
string
required

Sales channel ID. This field is used to identify where the business operations are being held.

Example:

12

vendorId
string

Vendor ID

Example:

"vendor123"

leadTime
string

The amount of time between when a purchase order is placed to replenish products and when the order is received in the warehouse.

Example:

1234

inventoryType
string

Inventory type. It is a classifier attribute that provides flexibility to define types.

Example:

"primary"

infiniteInventory
boolean

Infinite inventory flag.<br /> true indicates that the inventory can be consumed any number of times as per need<br />false indicates that the inventory cannot be used infinitely, and has a limit to be consumed

Example:

true

backOrderDate
string

Inventory restock date

Example:

"2022-08-08T00:00:00.000Z"

preOrderDate
string

First ship date of inventory

Example:

"2022-08-08T00:00:00.000Z"

backOrderLimit
integer

Maximum restock inventory quantity

Example:

100

preOrderLimit
integer

Maximum quanity of inventory for first-ship

Example:

100

safetyStock
integer

Reserved inventory quantity at the location

Example:

10

lowStock
integer

Inventory quantity to mark as low stock at the location

Example:

10

segment
string

Inventory segment

Example:

"Clothing"

region
string

Region where inventory is managed

Example:

"US"

counters
object

Inventory counter (also known as inventory position) configured by the merchant

Example:
{ "on-hand": 10 }
attributes
object

Custom attribute of the inventory

Example:
{
  "buy online, pick up in-store (bopis)": true
}

Response

200
application/json
OK
virtualCounters
object

View quantity of inventory, based on pre configured value. For example, 'availableToPurchase' can be a custom attribute configured by merchants.

Example:
{ "availableToPurchase": 10 }
id
string

Inventory ID

Example:

"62272e917b12209e68751d94"

sku
string

SKU of the item

Example:

"SKU00025"

itemId
integer

Item ID for which inventory is updated

Example:

4225678911

locationNum
integer

Location number is used to identify the warehouse or location where the inventory is kept

Example:

473746

channelId
string

Sales channel ID. This field is used to identify where the business operations are being held.

Example:

12

vendorId
string

Vendor ID

Example:

"vendor123"

leadTime
string

The amount of time between when a purchase order is placed to replenish products and when the order is received in the warehouse

Example:

1234

inventoryType
string

Type of inventory

Example:

"Safety stock"

infiniteInventory
boolean

Infinite inventory flag.<br /> true indicates that the inventory can be consumed any number of times as per need<br />false indicates that the inventory cannot be used infinitely, and has a limit to be consumed

Example:

true

counters
object

Inventory counter (also known as inventory position) configured by the merchant

Example:
{ "on-hand": 10 }
attributes
object

Custom inventory attributes configured by the merchant

Example:
{
  "buy online, pick up in-store (bopis)": true
}