Storage Locations
This guide explains how to work with storage locations in the Unified Order Service (UOS) API.
What is a Storage Location?
In the UOS system, a "storage location" represents a specific area within a place where items can be stored based on temperature requirements. Storage locations are used for organizing products during the picking and packing process.
Storage locations can have the following temperature types:
ambient: Room temperature storagecooled: Refrigerated storagefrozen: Freezer storage
Creating a Storage Location
To create a new storage location for a place, send a POST request to the /v1/places/{placeId}/storage-location endpoint.
curl -X POST "https://api.uos.example.com/v1/places/place-123/storage-location" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Main Ambient Storage",
"temperature_type": "ambient",
"description": "Main storage area for non-refrigerated items"
}'
Retrieving Storage Locations
To retrieve all storage locations for a place, send a GET request to the /v1/places/{placeId}/storage-location endpoint.
curl -X GET "https://api.uos.example.com/v1/places/place-123/storage-location" \
-H "Authorization: Bearer YOUR_API_KEY"
Getting a Specific Storage Location
To retrieve details of a specific storage location, send a GET request to the /v1/places/{placeId}/storage-location/{id} endpoint.
curl -X GET "https://api.uos.example.com/v1/places/place-123/storage-location/location-456" \
-H "Authorization: Bearer YOUR_API_KEY"
Updating a Storage Location
To update an existing storage location, send a PATCH request to the /v1/places/{placeId}/storage-location/{id} endpoint.
curl -X PATCH "https://api.uos.example.com/v1/places/place-123/storage-location/location-456" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Ambient Storage",
"description": "Updated storage area description"
}'
Deleting a Storage Location
To delete a storage location, send a DELETE request to the /v1/places/{placeId}/storage-location/{id} endpoint.
curl -X DELETE "https://api.uos.example.com/v1/places/place-123/storage-location/location-456" \
-H "Authorization: Bearer YOUR_API_KEY"
Storage Location Field Reference
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the storage location |
place_id | string | ID of the place this storage location belongs to |
name | string | Name of the storage location |
temperature_type | string | Temperature type: "ambient", "cooled", or "frozen" |
description | string | Optional description of the storage location |
created_at | string | When the storage location was created |
updated_at | string | When the storage location was last updated |
Using Storage Locations with the Drone API
The Drone API provides additional endpoints for working with storage locations in a store context.
Listing Storage Locations
To get storage locations for a store using the Drone API, send a GET request to the /dts/drone/storage_location/list endpoint.
curl -X GET "https://api.uos.example.com/dts/drone/storage_location/list?store_guid=store-123" \
-H "Authorization: Bearer YOUR_API_KEY"
Assigning Storage Locations to Order Items
To assign storage locations to items in an order using the Drone API, send a POST request to the /dts/drone/order/set_storage_locations endpoint.
curl -X POST "https://api.uos.example.com/dts/drone/order/set_storage_locations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": {
"order_id": "order-123",
"items": [
{
"item_id": "item-456",
"storage_location_id": "location-789"
},
{
"item_id": "item-457",
"storage_location_id": "location-790"
}
]
}
}'
Best Practices
- Create storage locations based on the temperature requirements of products in your inventory
- Use consistent naming conventions for your storage locations
- Consider the physical layout of your store or warehouse when creating storage locations
- Update storage location assignments regularly as your store layout changes