Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Warehouse API handler

Manage warehouse locations for store pickup functionality.

GET Warehouse Collection

HTTP Verb – GET

URL – /api/v1/warehouses

Description – Get a collection of nearby warehouses

BaseHandlerBase\<GetWarehouseCollectionParameter, GetWarehouseCollectionResult\>

Handlers

OrderHandlerDescription
500GetCoordinatesValidates the parameter and result are not null. Sets the search radius (uses PickupSettings.SearchRadius if parameter Radius is 0), latitude, and longitude on the result.
600GetWarehousesCountGets the total count of nearby warehouses within the specified radius using the WarehouseRepository. Respects the ExcludeCurrentPickupWarehouse and OnlyPickupWarehouses parameters.
700GetWarehousesCalculates pagination (PageSize, Page, TotalPages) and retrieves nearby warehouses from the WarehouseRepository with sorting (defaults to "Name"). Respects ExcludeCurrentPickupWarehouse and OnlyPickupWarehouses parameters.
800PopulateResultDetermines the distance unit of measure (imperial or metric) based on the country of the nearest warehouse that has a country assigned.
900CopyCustomPropertiesToResultIf GetCustomProperties is true and warehouses exist, loads custom properties for each warehouse and copies them to the corresponding WarehouseDto in the result.

GET Warehouse

HTTP Verb – GET

URL – /api/v1/warehouses/{warehouseId}

Description – Get a single warehouse by Id

BaseHandlerBase\<GetWarehouseParameter, GetWarehouseResult\>

Handlers

OrderHandlerDescription
500GetWarehouseRetrieves the Warehouse entity by Id. Returns NotFound error if not found. Creates a WarehouseDto from the entity, optionally including alternate warehouses.
600CopyCustomPropertiesToResultIf GetCustomProperties is true, copies custom properties from the Warehouse entity to the result.