Inventory locations represent physical or logical zones within an operating unit where stock is stored (e.g., main warehouse, kitchen, bar, temporary storage).
List Inventory Locations
curl -X GET "https://api.sushigo.com/api/v1/inventory-locations?operating_unit_id=1" \
-H "Authorization: Bearer YOUR_TOKEN"
Query Parameters
Filter by operating unit (branch or temporary unit)
Filter by location type: MAIN, TEMP, KITCHEN, BAR, or RETURN
Response
Show Inventory Location Object
Type: MAIN, TEMP, KITCHEN, BAR, RETURN
Priority for stock picking (higher = picked first)
Primary location for the operating unit
Example Response
{
"status" : 200 ,
"data" : [
{
"id" : 1 ,
"operating_unit_id" : 1 ,
"name" : "Almacén Principal" ,
"type" : "MAIN" ,
"priority" : 100 ,
"is_primary" : true ,
"is_active" : true
},
{
"id" : 2 ,
"operating_unit_id" : 1 ,
"name" : "Cocina" ,
"type" : "KITCHEN" ,
"priority" : 50 ,
"is_primary" : false ,
"is_active" : true
}
],
"meta" : {
"current_page" : 1 ,
"per_page" : 15 ,
"total" : 2
}
}
Create Inventory Location
curl -X POST "https://api.sushigo.com/api/v1/inventory-locations" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operating_unit_id": 1,
"name": "Bodega Temporal",
"type": "TEMP",
"priority": 75,
"is_primary": false,
"is_active": true,
"notes": "Almacén para eventos especiales"
}'
Request Body
Operating unit ID (must exist)
Location type: MAIN, TEMP, KITCHEN, BAR, or RETURN
Priority for stock picking (1-999, higher picked first)
Primary location for the operating unit
Additional notes about this location
Response
Returns the created location with operating unit and branch details. Status 201.
{
"status" : 201 ,
"data" : {
"id" : 3 ,
"operating_unit_id" : 1 ,
"name" : "Bodega Temporal" ,
"type" : "TEMP" ,
"priority" : 75 ,
"is_primary" : false ,
"is_active" : true ,
"notes" : "Almacén para eventos especiales" ,
"operating_unit" : {
"id" : 1 ,
"name" : "Sucursal Centro" ,
"type" : "BRANCH" ,
"branch" : {
"id" : 1 ,
"code" : "SUC-001" ,
"name" : "Centro"
}
},
"created_at" : "2026-03-06T14:30:00+00:00"
}
}
Errors
422 - Validation error (invalid operating_unit_id, invalid type)
403 - Insufficient permissions
Get Inventory Location
curl -X GET "https://api.sushigo.com/api/v1/inventory-locations/1" \
-H "Authorization: Bearer YOUR_TOKEN"
Path Parameters
Response
Operating unit details (id, name, type, branch)
Number of distinct variants in this location
Example Response
{
"status" : 200 ,
"data" : {
"id" : 1 ,
"operating_unit_id" : 1 ,
"name" : "Almacén Principal" ,
"type" : "MAIN" ,
"priority" : 100 ,
"is_primary" : true ,
"is_active" : true ,
"notes" : null ,
"operating_unit" : {
"id" : 1 ,
"name" : "Sucursal Centro" ,
"type" : "BRANCH" ,
"branch" : {
"id" : 1 ,
"code" : "SUC-001" ,
"name" : "Centro"
}
},
"stock_summary" : {
"variant_count" : 42 ,
"total_on_hand" : 3520.5 ,
"total_reserved" : 125.0 ,
"total_available" : 3395.5
},
"created_at" : "2026-01-10T08:00:00+00:00" ,
"updated_at" : "2026-01-10T08:00:00+00:00"
}
}
Errors
Update Inventory Location
curl -X PUT "https://api.sushigo.com/api/v1/inventory-locations/1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"priority": 120,
"notes": "Prioridad aumentada"
}'
Path Parameters
Request Body
All fields are optional. operating_unit_id cannot be changed after creation.
Response
Returns the updated location object with status 200.
Errors
404 - Location not found
422 - Validation error
403 - Insufficient permissions
Delete Inventory Location
curl -X DELETE "https://api.sushigo.com/api/v1/inventory-locations/3" \
-H "Authorization: Bearer YOUR_TOKEN"
Path Parameters
Response
{
"status" : 200 ,
"data" : {
"message" : "Inventory location deleted successfully"
}
}
Errors
404 - Location not found
409 - Cannot delete - location has stock on hand. Move or consume stock first.
403 - Insufficient permissions
Locations with stock on hand cannot be deleted. Transfer all stock to other locations or consume it before deletion.