Create inventory
Create inventory based on the combination of location number, channel ID, and item ID or SKU.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.
x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.
Unique request ID
Body
Create inventory request sample. Either sku
or itemId
is mandatory.
Inventory counter (also known as inventory position) configured by the merchant
{
"allocated": 10,
"onHand": 100,
"shipped": 20
}
Represents the warehouse or store location where the inventory is stored. It is recommended to link locationNumber
to the corresponding value in the fabric Locations service.
12345
Product SKU (Stock Keeping Unit) identifier. It serves as the primary reference key for the inventory and provides uniqueness to the item.
"SKU1"
Maximum restock inventory quantity
50
Time when backorder is shipped
"2022-08-01T20:03:28.483Z"
Custom attributes to store additional information
{ "isBopis": true }
Infinite inventory flag.true: Inventory can be used any number of times and does not have any consumption limit.false: Inventory can't be used infinitely, and has a consumption limit.
false
Merchant-defined item ID whose inventory is created or updated. If omitted, fabric Inventory service generates the itemId
. If you choose to use the itemId
in your environment, you must include it in all inventory Write requests.
12345
Time between when an order is placed to replenish inventory and when the order is received at warehouse
"5 days"
Inventory quantity below which consumer service wants to be alerted as low stock at the location
10
Code of the network to which the inventory belongs
"ShipToHome"
Maximum first-shipping inventory quantity
40
Time when preorder is shipped
"2022-08-01T20:03:28.483Z"
Region where inventory is managed
"North America"
Reserved inventory quantity at the location
10
Inventory status IN_STOCK, LOW_STOCK, etc.
IN_STOCK
, LOW_STOCK
, OUT_OF_STOCK
, BACKORDER_STOCK
, PREORDER_STOCK
" IN_STOCK"
Inventory type - a classifier attribute that provides flexibility to define inventory types
"primary"
ID of the vendor who will replenish the inventory for the retailer
"vendor1"
Virtual counters are calculated at run time from counters
Response
Inventory response sample
Maximum restock inventory quantity
50
Time when backorder is shipped
"2022-08-01T20:03:28.483Z"
Sales channel ID; identifies business operations location.
"channel_xyz"
Merchant-defined inventory counter (also known as inventory position)
{
"allocated": 10,
"onHand": 100,
"shipped": 20
}
Time of inventory creation
"2022-08-01T18:03:28.483Z"
Placeholder for additional info
{ "isBopis": true }
Infinite inventory flag. true: Inventory can be used any number of times and does not have any consumption limit. false: Inventory can't be used infinitely, and has a consumption limit.
false
The fabric system-generated inventory ID. This ID is generated during inventory creation.
"723910d81723"
An attribute used to indicate that a SKU is out of stock.
false
Merchant-defined item ID whose inventory is created or updated. If omitted, fabric Inventory service generates the itemId
. If you choose to use the itemId
in your environment, you must include it in all inventory Write requests.
12345
The time between when an order is placed to replenish inventory and when the order is received at warehouse.
"5 days"
Represents the warehouse or store location where the inventory is stored. The locationNumber is crucial for inventory management. When creating or updating inventory, you need to include the locationNumber to specify which location the inventory belongs to.
12345
The lowStock parameter is used to alert low stock at a location when inventory is below a set number.
10
Code of the network to which the inventory belongs
"ShipToHome"
Indicates inventory positions at network
{ "softReserve": 10 }
Maximum first-shipping inventory quantity
40
Time when preorder is shipped
"2022-08-01T20:03:28.483Z"
Region where inventory is managed
"North America"
Reserved inventory quantity at the location
10
Product SKU (Stock Keeping Unit) identifier. It serves as the primary reference key for the inventory and provides uniqueness to the item.
"SKU1"
Inventory status IN_STOCK, LOW_STOCK, etc.
IN_STOCK
, LOW_STOCK
, OUT_OF_STOCK
, BACKORDER_STOCK
, PREORDER_STOCK
" IN_STOCK"
Inventory type - a classifier attribute that provides flexibility to define inventory types
"primary"
Time when inventory was last updated
"2022-08-01T20:03:28.483Z"
ID of the vendor who will replenish the inventory for the retailer
"vendor1"
Virtual counters are calculated at run time from counters
Virtual counters are calculated at run time from counters
Was this page helpful?