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 API Response

[
    {
        "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 GraphQL Response 

{
    "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 Endpoint

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

The following are headers for API operation. 

Header Type Description
x-vol-tenant request and response The 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-site request and response The 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 API Request

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

Example API Response

{
  "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.

GraphQL Request Body

The includeNegativeInventory field defaults to false.

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

Example GraphQL Response

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

REST API Endpoint

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

Example API Response

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

Get Product Availability at Locations

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

GraphQL 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 GraphQL Response

{
    "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. 

Header Type Description
x-vol-tenant request and response The 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-site request and response The 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 API Response

{
  "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. 

GraphQL 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 GraphQL Response

{
    "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 Endpoint

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

The following are headers for API operation. 

Header Type Description
x-vol-tenant request and response The 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-site request and response The 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 API Request

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

Example API Response

[
  {
    "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. Use the following productSearchType values to further fine-tune your search results as needed.

  • ALL: Only returns locations that have all of the quantity available for all of the products in the request.
  • PARTIAL: Only returns locations that have all of the quantity available for at least one of the products in the request, and only those products.
  • ANY: Returns locations that have any quantity available for any of the products in the request.
  • ALL_STORES: All stores that are part of the location network will be returned even if they have no inventory for the specified product.

GraphQL Request Body

This example queries for specific product inventory being fulfilled via pickup or direct ship.

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

Example GraphQL Response

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

REST API Endpoint 

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

The following are headers for API operation. 

Header Type Description
x-vol-tenant request and response The 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-site request and response The 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 API Request

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

Example API Response

{
"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.

GraphQL Request Body

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

Example GraphQL Response

{
  "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>"
          }
        }
      ]
    }
  }
}