POST
/
api-inventory
/
inventory
Get inventories
curl --request POST \
  --url https://prod01-apigw.{customer_name}.fabric.zone/api-inventory/inventory \
  --header 'Content-Type: application/json' \
  --header 'x-site-context: <x-site-context>' \
  --data '{
  "items": [
    {
      "itemId": "1000000051",
      "quantity": 529
    }
  ],
  "channelId": 12
}'
[
  {
    "itemId": 1000000003,
    "quantityRequested": 4,
    "stockDate": "<string>",
    "inStock": true,
    "fromStockQuantity": 4,
    "fromStock": [
      {
        "locationId": "5efcc26a5ee50d00079ca2ab",
        "quantityReserved": 0,
        "quantityAllocated": 9,
        "stockRemaining": 9,
        "stockRequest": 4,
        "channelId": 12
      }
    ],
    "fromTransitQuantity": 0,
    "fromTransit": [
      "<any>"
    ],
    "availableStockQuantity": 9,
    "availableTransitQuantity": 0,
    "availableTotal": 9
  }
]

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
items
object[]
required
Minimum length: 1
channelId
integer
required
Example:

12

Response

Get inventories

itemId
number
Example:

1000000003

quantityRequested
number
Example:

4

stockDate
string
inStock
boolean
Example:

true

fromStockQuantity
number
Example:

4

fromStock
object[]
fromTransitQuantity
number
Example:

0

fromTransit
any[]
availableStockQuantity
number
Example:

9

availableTransitQuantity
number
Example:

0

availableTotal
number
Example:

9