Real-Time Inventory Service APIs

The Real-Time Inventory Service APIs provide accurate and real-time inventory visibility to your eCommerce site. These APIs give information such as Get Group Site Availability,  Get Product Site Availability, Get Product Availability at Locations, and Get Group Product Availability at Location.

Refer to the Real-time Inventory topic for more information.

GraphQL queries should be made as a POST call to this endpoint:

.../api/commerce/realtime-inventory/graphql

The RIS GraphQL queries are externally available and Order Management clients can take advantage of them to drive their storefront experience.   You can directly call the RIS queries for your Product Listing Pages or Product Details Pages pages.

The request body varies depending on the specific query, as shown in the following sections.

Get Inventory API

The Get Inventory API call also provides RIS data using the endpoint .../api/commerce/realtime-inventory/v5/inventory. This is the same POST request as the standard GET Inventory call, but provides real-time inventory levels and additional fields for the inventory segmentation and accurate fulfillment date features.

Example Response Body

[
    {
        "locationName": "West Great Falls Store",
        "locationCode": "4",
        "active": true,
        "tenantID": 17809,
        "onHand": 105,
        "available": 103,
        "allocated": 2,
        "pending": 0,
        "upc": "KTP",
        "blockAssignment": false,
        "ltd": 0,
        "floor": 0,
        "safetyStock": 0,
        "distance": 0.0,
        "directShip": true,
        "transferEnabled": true,
        "pickup": true,
        "countryCode": "US",
        "currencyID": 1,
        "retailPrice": 1.99,
        "taggedInventory": [
            {
                "onHand": 105,
                "available": 103,
                "allocated": 2,
                "pending": 0,
                "tags": {
                    "OrderType": "STH",
                    "Channel": "Kibo"
                },
                "futureInventory": [
                    {
                        "futureInventoryID": 13672,
                        "externalID": "12",
                        "onhand": 20,
                        "available": 20,
                        "allocated": 0,
                        "pending": 0,
                        "type": "Adjust",
                        "bopisProcessingTimeHours": 15,
                        "sthProcessingTimeHours": 7,
                        "receiveProcessingTimeHours": 10,
                        "deliveryDate": "2025-06-25T19:59:00+0000",
                        "createDate": "2023-08-17T19:12:25+0000",
                        "sthFulfillmentDate": "2025-06-26T02:59:00+0000",
                        "bopisFulfillmentDate": "2025-06-26T10:59:00+0000"
                    }
                ],
                "bopisProcessingTimeHours": 15,
                "sthProcessingTimeHours": 7,
                "transferProcessingTimeHours": 15,
                "receiveProcessingTimeHours": 10,
                "sthFulfillmentDate": "2024-01-30T23:00:43+0000",
                "bopisFulfillmentDate": "2024-01-31T07:00:43+0000",
                "transferFulfillmentDate": "2024-01-31T14:00:43+0000"
            }
        ]
    },
    {
        "locationName": "Berne Apparel",
        "locationCode": "BERNE",
        "active": true,
        "tenantID": 17809,
        "onHand": 20,
        "available": 20,
        "allocated": 0,
        "pending": 0,
        "upc": "KTP",
        "blockAssignment": false,
        "ltd": 0,
        "floor": 0,
        "safetyStock": 0,
        "distance": 0.0,
        "directShip": true,
        "transferEnabled": true,
        "pickup": true,
        "countryCode": "US",
        "currencyID": 1,
        "retailPrice": 1.99,
        "taggedInventory": [
            {
                "onHand": 20,
                "available": 20,
                "allocated": 0,
                "pending": 0,
                "tags": {
                    "OrderType": "STH",
                    "Channel": "Kibo"
                },
                "futureInventory": null,
                "receiveProcessingTimeHours": 6
            }
        ]
    },
    {
        "locationName": "BelInv001",
        "locationCode": "mike_test",
        "active": true,
        "tenantID": 17809,
        "onHand": 10,
        "available": 10,
        "allocated": 0,
        "pending": 0,
        "upc": "KTP",
        "blockAssignment": false,
        "ltd": 0,
        "floor": 0,
        "safetyStock": 0,
        "distance": 0.0,
        "directShip": true,
        "transferEnabled": true,
        "pickup": true,
        "countryCode": "US",
        "taggedInventory": [
            {
                "onHand": 10,
                "available": 10,
                "allocated": 0,
                "pending": 0,
                "tags": {
                    "OrderType": "STH",
                    "Channel": "Kibo"
                },
                "futureInventory": null
            }
        ]
    },
    {
        "locationName": "AFD STH Bopis Transfer Location",
        "locationCode": "AFDSTHBopisTransferLoc1",
        "active": true,
        "tenantID": 17809,
        "onHand": 0,
        "available": 0,
        "allocated": 0,
        "pending": 0,
        "upc": "KTP",
        "blockAssignment": false,
        "ltd": 0,
        "floor": 0,
        "safetyStock": 0,
        "distance": 0.0,
        "directShip": true,
        "transferEnabled": true,
        "pickup": true,
        "countryCode": "US",
        "taggedInventory": [
            {
                "onHand": 0,
                "available": 0,
                "allocated": 0,
                "pending": 0,
                "tags": {
                    "OrderType": "STH",
                    "Channel": "Kibo"
                },
                "futureInventory": null
            }
        ]
    }
]

The following are multiple Inventory APIs. You can either run using REST or GraphQL queries.

Get Group Site Availability

This query gets the product availability across the site for multiple product codes.

GraphQL Request Body:

The includeNegativeInventory field defaults to false.

{
  getGroupSiteAvailability(productCodes: ["CHAR-5055-1"], futureDaysToConsider: 1000) {
    quantity
    isAvailable
    futureQuantity 
    futureIsAvailable 
    products {
      productCode
      quantity
      isAvailable
      futureQuantity 
      futureIsAvailable
    }
  }
}

Example of GraphQL Response Body:

{
    "data": {
        "getGroupSiteAvailability": {
            "quantity": "<BigInt>",
            "isAvailable": "<Boolean>",
            "futureQuantity": "<BigInt>",
            "futureIsAvailable": "<Boolean>",
            "products": [
                {
                    "productCode": "CHAR-5055-1",
                    "quantity": "<BigInt>",
                    "isAvailable": "<Boolean>",
                    "futureQuantity": "<BigInt>",
                    "futureIsAvailable": "<Boolean>"
                }
            ]
        }
    }
}

REST API Request Endpoint (POST): 

/api/commerce/realtime-inventory/api/storefront/site/availability

The following are headers for API operation. 

HeaderTypeDescription
x-vol-tenantrequest and responseThe unique identifier of the tenant. This number appears in your site’s URL in Admin, preceded by a "t". For example: https://t0000.sandbox.mozu.com/Admin/m-1/ in a sandbox environment.
x-vol-siterequest and responseThe unique identifier of the site. This number can be found in the URL of the live site as well as some areas of the Admin, such as under System > Structure > Site, preceded by an "s-". For example: https://t0000.sandbox.mozu.com/Admin/s-11111/website in a sandbox environment.

Example Request Body:

{
  "includeNegativeInventory": "<boolean>",
  "productCodes": [
    "<string>",
    "<string>"
  ]
}

Example Response Body:

{
  "quantity": "<integer>",
  "isAvailable": "<boolean>",
  "products": [
    {
      "quantity": "<integer>",
      "isAvailable": "<boolean>",
      "productCode": "<string>"
    },
    {
      "quantity": "<integer>",
      "isAvailable": "<boolean>",
      "productCode": "<string>"
    }
  ]
}

Get Product Site Availability

This query gets the product availability across the site for a particular product code.

Request Body:

The includeNegativeInventory field defaults to false.

query{ 
    getProductSiteAvailability(
        productCode:"CHAR-5055-1",
        futureDaysToConsider: 1000
    ){
        quantity 
        isAvailable
        futureIsAvailable
        futureQuantity
    }
}

Example of GraphQL Response Body:

{
    "data": {
        "getProductSiteAvailability": {
            "quantity": "<BigInt>",
            "isAvailable": "<Boolean>",
            "futureIsAvailable": "<Boolean>",
            "futureQuantity": "<BigInt>"
        }
    }
}

REST API Endpoint (GET):

/api/commerce/realtime-inventory/api/storefront/site/availability/

Example Response Body:

{
  "quantity": "<integer>",
  "isAvailable": "<boolean>"
}

Get Product Availability at Locations

This query gets the availability for a product across multiple location codes. 

Request Body: 

query{ 
    getProductAvailabilityAtLocations(
        productCode: "KTP",
        locationCodes:["4", "BERNE", "mike_test"]
        tags: [
            { 
                category: "OrderType",
                tag : "STH" 
            }
        ],
        futureDaysToConsider: 100){
        locations{
            locationCode 
            quantity 
            isAvailable
            sthFulfillmentDate
            bopisFulfillmentDate
            transferFulfillmentDate
            sthProcessingTimeHours
            bopisProcessingTimeHours
            transferProcessingTimeHours
            receiveProcessingTimeHours
            segments{
                    tags{
                        category
                        tag
                    }
                    quantity
                    isAvailable
                    sthFulfillmentDate
                    bopisFulfillmentDate
                    transferFulfillmentDate
                    sthProcessingTimeHours
                    bopisProcessingTimeHours
                    transferProcessingTimeHours
                    receiveProcessingTimeHours
                    futureInventory{
                        quantity
                        isAvailable
                        incomingFutureInventoryDate
                        sthFulfillmentDate
                        bopisFulfillmentDate
                        transferFulfillmentDate
                        sthProcessingTimeHours
                        bopisProcessingTimeHours
                        transferProcessingTimeHours
                        receiveProcessingTimeHours
                    }
                }
        }
    }
}

Example Response Body:

{
    "data": {
        "getProductAvailabilityAtLocations": {
            "locations": [
                {
                    "locationCode": "BERNE",
                    "quantity": "10",
                    "isAvailable": true,
                    "receiveProcessingTimeHours": "6",
                    "segments": [
                        {
                            "tags": [
                                {
                                    "category": "Channel",
                                    "tag": "Kibo"
                                },
                                {
                                    "category": "OrderType",
                                    "tag": "STH"
                                }
                            ],
                            "quantity": "10",
                            "isAvailable": true,
                            "receiveProcessingTimeHours": "6"
                        }
                    ]
                },
                {
                    "locationCode": "4",
                    "quantity": "4",
                    "isAvailable": true,
                    "sthFulfillmentDate": "2024-02-12T15:40:17+0000",
                    "bopisFulfillmentDate": "2024-02-12T23:40:17+0000",
                    "transferFulfillmentDate": "2024-02-13T06:40:17+0000",
                    "sthProcessingTimeHours": "7",
                    "bopisProcessingTimeHours": "15",
                    "transferProcessingTimeHours": "15",
                    "receiveProcessingTimeHours": "10",
                    "segments": [
                        {
                            "tags": [
                                {
                                    "category": "Channel",
                                    "tag": "Kibo"
                                },
                                {
                                    "category": "OrderType",
                                    "tag": "STH"
                                }
                            ],
                            "quantity": "4",
                            "isAvailable": true,
                            "sthFulfillmentDate": "2024-02-12T15:40:17+0000",
                            "bopisFulfillmentDate": "2024-02-12T23:40:17+0000",
                            "transferFulfillmentDate": "2024-02-13T06:40:17+0000",
                            "sthProcessingTimeHours": "7",
                            "bopisProcessingTimeHours": "15",
                            "transferProcessingTimeHours": "15",
                            "receiveProcessingTimeHours": "10"
                        }
                    ]
                },
                {
                    "locationCode": "mike_test",
                    "quantity": "10",
                    "isAvailable": true,
                    "segments": [
                        {
                            "tags": [
                                {
                                    "category": "Channel",
                                    "tag": "Kibo"
                                },
                                {
                                    "category": "OrderType",
                                    "tag": "STH"
                                }
                            ],
                            "quantity": "10",
                            "isAvailable": true
                        }
                    ]
                }
            ]
        }
    }
}

REST API Endpoint (GET): 

/api/commerce/realtime-inventory/api/storefront/availability/locations/product

The following are headers for API operation. 

HeaderTypeDescription
x-vol-tenantrequest and responseThe unique identifier of the tenant. This number appears in your site’s URL in Admin, preceded by a "t". For example: https://t0000.sandbox.mozu.com/Admin/m-1/ in a sandbox environment.
x-vol-siterequest and responseThe unique identifier of the site. When you log in to Admin, this number appears in the URL preceded by an "s-". For example: https://t0000.sandbox.mozu.com/Admin/s-11111/website in a sandbox environment.

Example Response Body:

{
  "productCode": "<string>",
  "locations": [
    {
      "quantity": "<integer>",
      "isAvailable": "<boolean>",
      "productCode": "<string>",
      "locationCode": "<string>",
      "productDetails": {
        "sku": "<string>",
        "partNumber": "<string>"
      }
    },
    {
      "quantity": "<integer>",
      "isAvailable": "<boolean>",
      "productCode": "<string>",
      "locationCode": "<string>",
      "productDetails": {
        "sku": "<string>",
        "partNumber": "<string>"
      }
    }
  ]
}

Get Group Availability at Locations

This query gets the availability for multiple product codes or variants across multiple location codes. 

Request Body:

query {
    getGroupAvailabilityAtLocations(productCodes: ["KTP"], locationCodes:["4", "BERNE", "mike_test"]
        tags: [
            { 
                category: "OrderType",
                tag : "STH" 
            }
        ]){
        locations{
            locationCode 
            isAvailable
            sthFulfillmentDate
            bopisFulfillmentDate
            transferFulfillmentDate
            sthProcessingTimeHours
            bopisProcessingTimeHours
            transferProcessingTimeHours
            receiveProcessingTimeHours
            productDetails {
                sku
                partNumber
            }
            segments{
                    tags{
                        category
                        tag
                    }
                    quantity
                    isAvailable
                    sthFulfillmentDate
                    bopisFulfillmentDate
                    transferFulfillmentDate
                    sthProcessingTimeHours
                    bopisProcessingTimeHours
                    transferProcessingTimeHours
                    receiveProcessingTimeHours
                    futureInventory{
                        quantity
                        isAvailable
                        incomingFutureInventoryDate
                        sthFulfillmentDate
                        bopisFulfillmentDate
                        transferFulfillmentDate
                        sthProcessingTimeHours
                        bopisProcessingTimeHours
                        transferProcessingTimeHours
                        receiveProcessingTimeHours
                    }
                }
        }
    }
}

Example Response Body:

{
    "data": {
        "getGroupAvailabilityAtLocations": [
            {
                "locations": [
                    {
                        "locationCode": "BERNE",
                        "isAvailable": true,
                        "receiveProcessingTimeHours": "6",
                        "productDetails": {},
                        "segments": [
                            {
                                "tags": [
                                    {
                                        "category": "Channel",
                                        "tag": "Kibo"
                                    },
                                    {
                                        "category": "OrderType",
                                        "tag": "STH"
                                    }
                                ],
                                "quantity": "10",
                                "isAvailable": true,
                                "receiveProcessingTimeHours": "6"
                            }
                        ]
                    },
                    {
                        "locationCode": "4",
                        "isAvailable": true,
                        "sthFulfillmentDate": "2024-02-12T15:46:18+0000",
                        "bopisFulfillmentDate": "2024-02-12T23:46:18+0000",
                        "transferFulfillmentDate": "2024-02-13T06:46:18+0000",
                        "sthProcessingTimeHours": "7",
                        "bopisProcessingTimeHours": "15",
                        "transferProcessingTimeHours": "15",
                        "receiveProcessingTimeHours": "10",
                        "productDetails": {},
                        "segments": [
                            {
                                "tags": [
                                    {
                                        "category": "Channel",
                                        "tag": "Kibo"
                                    },
                                    {
                                        "category": "OrderType",
                                        "tag": "STH"
                                    }
                                ],
                                "quantity": "4",
                                "isAvailable": true,
                                "sthFulfillmentDate": "2024-02-12T15:46:18+0000",
                                "bopisFulfillmentDate": "2024-02-12T23:46:18+0000",
                                "transferFulfillmentDate": "2024-02-13T06:46:18+0000",
                                "sthProcessingTimeHours": "7",
                                "bopisProcessingTimeHours": "15",
                                "transferProcessingTimeHours": "15",
                                "receiveProcessingTimeHours": "10",
                                "futureInventory": [
                                    {
                                        "quantity": "20",
                                        "isAvailable": true,
                                        "incomingFutureInventoryDate": "2025-06-25T19:59:00+0000",
                                        "sthFulfillmentDate": "2025-06-26T02:59:00+0000",
                                        "bopisFulfillmentDate": "2025-06-26T10:59:00+0000",
                                        "sthProcessingTimeHours": "7",
                                        "bopisProcessingTimeHours": "15",
                                        "receiveProcessingTimeHours": "10"
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "locationCode": "mike_test",
                        "isAvailable": true,
                        "productDetails": {},
                        "segments": [
                            {
                                "tags": [
                                    {
                                        "category": "Channel",
                                        "tag": "Kibo"
                                    },
                                    {
                                        "category": "OrderType",
                                        "tag": "STH"
                                    }
                                ],
                                "quantity": "10",
                                "isAvailable": true
                            }
                        ]
                    }
                ]
            }
        ]
    }
}

REST API Request Endpoint (GET): 

/api/commerce/realtime-inventory/api/storefront/availability/locations/products

The following are headers for API operation. 

HeaderTypeDescription
x-vol-tenantrequest and responseThe unique identifier of the tenant. This number appears in your site’s URL in Admin, preceded by a "t". For example: https://t0000.sandbox.mozu.com/Admin/m-1/ in a sandbox environment.
x-vol-siterequest and responseThe unique identifier of the site. When you log in to Admin, this number appears in the URL preceded by an "s-". For example: https://t0000.sandbox.mozu.com/Admin/s-11111/website in a sandbox environment.

Example Request Body:

{
  "productCodes": [
    "<string>",
    "<string>"
  ],
  "locationCodes": [
    "<string>",
    "<string>"
  ]
}

Example Response Body:

[
  {
    "productCode": "<string>",
    "locations": [
      {
        "quantity": "<integer>",
        "isAvailable": "<boolean>",
        "productCode": "<string>",
        "locationCode": "<string>",
        "productDetails": {
          "sku": "<string>",
          "partNumber": "<string>"
        }
      },
      {
        "quantity": "<integer>",
        "isAvailable": "<boolean>",
        "productCode": "<string>",
        "locationCode": "<string>",
        "productDetails": {
          "sku": "<string>",
          "partNumber": "<string>"
        }
      }
    ]
  },
  {
    "productCode": "<string>",
    "locations": [
      {
        "quantity": "<integer>",
        "isAvailable": "<boolean>",
        "productCode": "<string>",
        "locationCode": "<string>",
        "productDetails": {
          "sku": "<string>",
          "partNumber": "<string>"
        }
      },
      {
        "quantity": "<integer>",
        "isAvailable": "<boolean>",
        "productCode": "<string>",
        "locationCode": "<string>",
        "productDetails": {
          "sku": "<string>",
          "partNumber": "<string>"
        }
      }
    ]
  }
]

Get Group Available Locations

This query gets the locations of available inventory for specific fulfillment types. This supports an ANY query which is a union across multiple locations. It also supports an ALL query which is the intersection across multiple locations.

Possible values for productSearchType options are "all", "any", "partial", and "all_stores".

Request Body:

The fulfillment types are "PICKUP" and "DIRECT_SHIP".

query{  
    getGroupAvailableLocations(
        fulfillmentTypes: [DIRECT_SHIP, PICKUP]
        productCodes: ["KTP"]
        tags: [
            { 
                category: "OrderType",
                tag : "STH" 
            },
            { 
                category: "Channel",
                tag : "Ebay" 
            }
        ]){ 
        locationCodes
    }    
}

Example Response Body:

{
"data": {
"getGroupAvailableLocations": {
"locationCodes": [
"A",
"8"
]
}
}
}

REST API Request Endpoint (POST):

/api/commerce/realtime-inventory/api/storefront/locations

The following are headers for API operation. 

HeaderTypeDescription
x-vol-tenantrequest and responseThe unique identifier of the tenant. This number appears in your site’s URL in Admin, preceded by a "t". For example: https://t0000.sandbox.mozu.com/Admin/m-1/ in a sandbox environment.
x-vol-siterequest and responseThe unique identifier of the site. When you log in to Admin, this number appears in the URL preceded by an "s-". For example: https://t0000.sandbox.mozu.com/Admin/s-11111/website in a sandbox environment.

Example Request Body:

{
  "fulfillmentTypes": [
    "PICKUP",
    "DIRECT_SHIP"
  ],
  "productCodes": [
    "<string>",
    "<string>"
  ],
  "productSearchType": "all"
}

Example Response Body:

{
"data": {
"getGroupAvailableLocations": {
"locationCodes": [
"A",
"8"
]
}
}
}

Get Group Available Pickup Locations

This query gets the pickup locations of available inventory for only returns pickup locations. This supports ANY query which is a union across multiple locations. It also supports an ALL which is the intersection across multiple locations.

Request Body: 

query{ getGroupAvailablePickupLocations(productCodes: [String!]): PickupLocationsResponse}

Example Response Body:

{
  "data": {
    "getGroupAvailablePickupLocations": {
      "productCode": "<String>",
      "pickupLocations": [
        {
          "locationCode": "<String>",
          "address": "<String>",
          "hoursOfOperation": "<String>",
          "isAvailableForPickup": "<Boolean>",
          "sthPickupDate": "<OffsetDateTime>",
          "bopisPickupDate": "<OffsetDateTime>",
          "transferPickupDate": "<OffsetDateTime>",
          "productDetails": {
            "partNumber": "<String>",
            "sku": "<String>"
          }
        },
        {
          "locationCode": "<String>",
          "address": "<String>",
          "hoursOfOperation": "<String>",
          "isAvailableForPickup": "<Boolean>",
          "sthPickupDate": "<OffsetDateTime>",
          "bopisPickupDate": "<OffsetDateTime>",
          "transferPickupDate": "<OffsetDateTime>",
          "productDetails": {
            "partNumber": "<String>",
            "sku": "<String>"
          }
        }
      ]
    }
  }
}