POST
/
inventories
/
actions
/
find-and-update
curl --request POST \
  --url https://api.fabric.inc/v3/inventories/actions/find-and-update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-fabric-channel-id: <x-fabric-channel-id>' \
  --header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
  --data '{
  "sku": "SKU1",
  "itemId": 12345,
  "locationNumber": 12345,
  "region": "North America",
  "vendorId": "vendor1",
  "leadTime": "5 days",
  "type": "primary",
  "hasInfiniteInventory": true,
  "backorderShipmentAt": "2022-08-01T20:03:28.483Z",
  "preorderShipmentAt": "2022-08-01T20:03:28.483Z",
  "backorderLimit": 50,
  "preorderLimit": 40,
  "safetyStock": 10,
  "lowStock": 10,
  "counters": {
    "onHand": 100,
    "allocated": 10,
    "shipped": 20
  },
  "customAttributes": {
    "isBopis": true
  }
}'
{
  "inventoryId": "723910d81723",
  "sku": "SKU1",
  "itemId": 12345,
  "locationNumber": 12345,
  "region": "North America",
  "channelId": "channel_xyz",
  "vendorId": "vendor1",
  "createdAt": "2022-08-01T18:03:28.483Z",
  "updatedAt": "2022-08-01T20:03:28.483Z",
  "leadTime": "5 days",
  "type": "primary",
  "hasInfiniteInventory": true,
  "backorderShipmentAt": "2022-08-01T20:03:28.483Z",
  "preorderShipmentAt": "2022-08-01T20:03:28.483Z",
  "backorderLimit": 50,
  "preorderLimit": 40,
  "safetyStock": 10,
  "lowStock": 10,
  "networkCode": "ShipToHome",
  "counters": {
    "onHand": 100,
    "allocated": 10,
    "shipped": 20
  },
  "customAttributes": {
    "isBopis": true
  },
  "networkCounters": {
    "softReserve": 10
  },
  "virtualCounters": {
    "availableToPurchase": 60
  }
}

Authorizations

Authorization
string
headerrequired

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

Headers

x-fabric-tenant-id
string
required

Merchant's 24-character tenant ID

x-fabric-channel-id
string
required

Sales channel ID

x-fabric-request-id
string

Unique request ID

Body

application/json
sku
string
required

Product SKU (Stock Keeping Unit) identifier. It serves as the primary reference key for the inventory and provides uniqueness to the item.

itemId
integer

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.

locationNumber
integer
required

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.

region
string

Region where inventory is managed

vendorId
string

ID of the vendor who will replenish the inventory for the retailer

leadTime
string

Time between when an order is placed to replenish inventory and when the order is received at warehouse

type
string

Inventory type - a classifier attribute that provides flexibility to define inventory types

hasInfiniteInventory
boolean
default: false

Infinite inventory flag.<br />true: Inventory can be used any number of times and does not have any consumption limit.<br />false: Inventory cannot be used infinitely, and has a consumption limit.

backorderShipmentAt
string

Time when backorder is shipped

preorderShipmentAt
string

Time when preorder is shipped

backorderLimit
integer

Maximum restock inventory quantity

preorderLimit
integer

Maximum first-shipping inventory quantity

safetyStock
integer

Reserved inventory quantity at the location

lowStock
integer

Inventory quantity below which consumer service wants to be alerted as low stock at the location

counters
object
required

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

customAttributes
object

Placeholder for additional info

Response

200 - application/json
inventoryId
string

System-generated inventory ID. This ID is generated during inventory creation.

sku
string

Product SKU (Stock Keeping Unit) identifier. It serves as the primary reference key for the inventory and provides uniqueness to the item.

itemId
integer

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.

locationNumber
integer

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.

region
string

Region where inventory is managed

channelId
string

Sales channel ID; identifies business operations location.

vendorId
string

ID of the vendor who will replenish the inventory for the retailer

createdAt
string

Time of inventory creation

updatedAt
string

Time when inventory was last updated

leadTime
string

Time between when an order is placed to replenish inventory and when the order is received at warehouse

type
string

Inventory type - a classifier attribute that provides flexibility to define inventory types

hasInfiniteInventory
boolean
default: false

Infinite inventory flag.<br />true: Inventory can be used any number of times and does not have any consumption limit.<br />false: Inventory cannot be used infinitely, and has a consumption limit.

backorderShipmentAt
string

Time when backorder is shipped

preorderShipmentAt
string

Time when preorder is shipped

backorderLimit
integer

Maximum restock inventory quantity

preorderLimit
integer

Maximum first-shipping inventory quantity

safetyStock
integer

Reserved inventory quantity at the location

lowStock
integer

Inventory quantity below which consumer service wants to be alerted as low stock at the location

networkCode
string

Code of the network to which the inventory belongs

counters
object

Merchant-defined inventory counter (also known as inventory position)

customAttributes
object

Placeholder for additional info

networkCounters
object

Indicates inventory positions at network

virtualCounters
object

Virtual counters are calculated at run time from counters