Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Realtime inventory

Describes the Realtime inventory API handler in Optimizely Configured Commerce.

HTTP Verb – GET

URL – /api/v1/realtimeinventory

Description – Gets the specified real time inventory parameter.

Base – HandlerBase<GetRealtimeInventoryParameter, GetRealtimeInventoryResult>

Handlers

OrderHandlerDescription
500ValidateContextRetrieves product settings by GetProductSettingsHandler. Validates CanSeeProducts setting, if it equals "false", returns error.
600GetDisplayableGetInventoryParameterStore GetInventoryParameter property from the parameter object to DisplayableGetInventoryParameter property on the result object. If DisplayableGetInventoryParameter property doesn't contain any product id, returns error.
700GetInventoryResultsRetrieves a inventoryServiceResults using the RealTimeInventory engine. If the inventoryServiceResults contains any Inventories, stores them in the RealTimeInventoryResults property on the result object.
800GetAvailability

Iterates over RealTimeInventoryResults and gets a product and a productInventory from each RealTimeInventoryResult.

Iterates over each product's unit of measure, if productInventory does not have availability information for selected unit of measure, calls GetAvailability catalog pipeline for it. Updates product's availability and availability in warehouses.