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
Base – HandlerBase\<GetWarehouseCollectionParameter, GetWarehouseCollectionResult\>
Handlers –
| Order | Handler | Description |
|---|---|---|
| 500 | GetCoordinates | Validates 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. |
| 600 | GetWarehousesCount | Gets the total count of nearby warehouses within the specified radius using the WarehouseRepository. Respects the ExcludeCurrentPickupWarehouse and OnlyPickupWarehouses parameters. |
| 700 | GetWarehouses | Calculates pagination (PageSize, Page, TotalPages) and retrieves nearby warehouses from the WarehouseRepository with sorting (defaults to "Name"). Respects ExcludeCurrentPickupWarehouse and OnlyPickupWarehouses parameters. |
| 800 | PopulateResult | Determines the distance unit of measure (imperial or metric) based on the country of the nearest warehouse that has a country assigned. |
| 900 | CopyCustomPropertiesToResult | If 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
Base – HandlerBase\<GetWarehouseParameter, GetWarehouseResult\>
Handlers –
| Order | Handler | Description |
|---|---|---|
| 500 | GetWarehouse | Retrieves the Warehouse entity by Id. Returns NotFound error if not found. Creates a WarehouseDto from the entity, optionally including alternate warehouses. |
| 600 | CopyCustomPropertiesToResult | If GetCustomProperties is true, copies custom properties from the Warehouse entity to the result. |
Updated about 6 hours ago
