Skip to main content

Warehouse Locations

4 API calls in this section.

List Warehouse Locations

Warehousing / Warehouse Locations
GET/warehousing/locations?tenant_id={{tenant_id}}&warehouse_id=&location_type=&status=&parent_id=&search=&sort_by=code&sort_order=asc&column_filters=&page=1&limit=20&language=en
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/warehousing/locations?tenant_id={{tenant_id}}&warehouse_id=&location_type=&status=&parent_id=&search=&sort_by=code&sort_order=asc&column_filters=&page=1&limit=20&language=en" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json"

Query parameters

tenant_idOptional
query string

{{tenant_id}}

UUID of the tenant (required if not in auth)

warehouse_idOptional
query string

Legacy: filter by warehouse UUID (optional). Overridden by column_filters.warehouse_id if both present.

location_typeOptional
query string

Legacy: filter by location type — zone | aisle | shelf | bin (optional). Overridden by column_filters.location_type if both present.

statusOptional
query string

Legacy: filter by status — active | inactive | maintenance (optional). Overridden by column_filters.status if both present.

parent_idOptional
query string

Legacy: filter by parent location UUID. Use 'null' for top-level locations (optional). Overridden by column_filters.parent_id if both present.

searchOptional
query string

Full-text search across code, name, barcode (optional)

sort_byOptional
query string

code

Sort column — code | name | created_at | updated_at (optional, default: code)

sort_orderOptional
query string

asc

Sort direction — asc | desc (optional, default: asc)

column_filtersOptional
query string

JSON object of column filters. Supported keys: warehouse_id (exact), parent_id (exact), location_type (exact), status (exact), code (contains), name (contains), barcode (contains). Takes precedence over legacy standalone params.

pageOptional
query string

1

Page number for pagination (optional, default: 1)

limitOptional
query string

20

Number of items per page (optional, default: 20)

languageOptional
query string

en

Response language (optional, default: en)

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200OK
Response body
json
1{2  "success": true,3  "message": "Warehouse locations retrieved successfully",4  "locations": [5    {6      "id": "location-uuid-1",7      "location_type": "zone",8      "code": "Z-001",9      "barcode": null,10      "label_url": null,11      "name": "North Zone",12      "status": "active",13      "position": {14        "area": "North",15        "floor": "1"16      },17      "warehouse": {18        "id": "warehouse-uuid",19        "code": "WH-01",20        "name": "Main Warehouse"21      },22      "parent": null23    },24    {25      "id": "location-uuid-2",26      "location_type": "aisle",27      "code": "A-101",28      "barcode": "BC-A101",29      "label_url": null,30      "name": "Aisle 101",31      "status": "active",32      "position": {33        "number": "101",34        "section": "A"35      },36      "warehouse": {37        "id": "warehouse-uuid",38        "code": "WH-01",39        "name": "Main Warehouse"40      },41      "parent": {42        "id": "location-uuid-1",43        "code": "Z-001",44        "name": "North Zone",45        "location_type": "zone"46      }47    }48  ],49  "page": 1,50  "limit": 20,51  "total": 60,52  "stats": {53    "total": 60,54    "active": 50,55    "inactive": 5,56    "maintenance": 557  }58}
Success Response — with column_filters + sort200OK
Response body
json
1{2  "success": true,3  "message": "Warehouse locations retrieved successfully",4  "locations": [5    {6      "id": "location-uuid-2",7      "location_type": "aisle",8      "code": "A-101",9      "barcode": "BC-A101",10      "label_url": null,11      "name": "Aisle 101",12      "status": "active",13      "position": {14        "number": "101",15        "section": "A"16      },17      "warehouse": {18        "id": "warehouse-uuid",19        "code": "WH-01",20        "name": "Main Warehouse"21      },22      "parent": {23        "id": "location-uuid-1",24        "code": "Z-001",25        "name": "North Zone",26        "location_type": "zone"27      }28    }29  ],30  "page": 1,31  "limit": 20,32  "total": 1,33  "stats": {34    "total": 60,35    "active": 50,36    "inactive": 5,37    "maintenance": 538  }39}
Error - Warehouse ID Required400
Response body
json
1{2  "success": false,3  "message": "Warehouse ID required"4}
Error - Warehouse Not Found404
Response body
json
1{2  "success": false,3  "message": "Warehouse not found"4}
Error - Tenant Not Found404
Response body
json
1{2  "success": false,3  "message": "Tenant not found"4}
Error - Insufficient Permissions403
Response body
json
1{2  "success": false,3  "message": "Insufficient permissions"4}
Error - Server Error500
Response body
json
1{2  "success": false,3  "message": "Internal server error"4}

Create Warehouse Location

Warehousing / Warehouse Locations
POST/warehousing/locations?tenant_id={{tenant_id}}
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/warehousing/locations?tenant_id={{tenant_id}}" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "warehouse_id": "{{warehouse_id}}",7  "location_type": "bin",8  "name": "Storage Bin 1001",9  "parent_id": "{{parent_location_id}}",10  "position": {11    "position": "front",12    "sequence": 113  },14  "capacity": {15    "max_weight": 100,16    "max_volume": 50,17    "dimensions": {18      "length": 30,19      "width": 40,20      "height": 2021    },22    "item_limit": 2023  },24  "status": "active",25  "metadata": {26    "temperature_range": {27      "min": 15,28      "max": 2529    },30    "special_handling": [31      "fragile",32      "dust-free"33    ],34    "security_level": "high",35    "access_restrictions": [36      "key-card",37      "supervisor"38    ],39    "notes": "For high-value items only"40  }41}'
Request body
json
1{2  "warehouse_id": "{{warehouse_id}}",3  "location_type": "bin",4  "name": "Storage Bin 1001",5  "parent_id": "{{parent_location_id}}",6  "position": {7    "position": "front",8    "sequence": 19  },10  "capacity": {11    "max_weight": 100,12    "max_volume": 50,13    "dimensions": {14      "length": 30,15      "width": 40,16      "height": 2017    },18    "item_limit": 2019  },20  "status": "active",21  "metadata": {22    "temperature_range": {23      "min": 15,24      "max": 2525    },26    "special_handling": [27      "fragile",28      "dust-free"29    ],30    "security_level": "high",31    "access_restrictions": [32      "key-card",33      "supervisor"34    ],35    "notes": "For high-value items only"36  }37}

Query parameters

tenant_idOptional
query string

{{tenant_id}}

UUID of the tenant (required if not in auth)

Request body fields

warehouse_idExample
string

Example field from the request body.

location_typeExample
string

Example field from the request body.

nameExample
string

Example field from the request body.

parent_idExample
string

Example field from the request body.

positionExample
object

Example field from the request body.

position.positionExample
string

Example field from the request body.

position.sequenceExample
number

Example field from the request body.

capacityExample
object

Example field from the request body.

capacity.max_weightExample
number

Example field from the request body.

capacity.max_volumeExample
number

Example field from the request body.

capacity.dimensionsExample
object

Example field from the request body.

capacity.dimensions.lengthExample
number

Example field from the request body.

capacity.dimensions.widthExample
number

Example field from the request body.

capacity.dimensions.heightExample
number

Example field from the request body.

capacity.item_limitExample
number

Example field from the request body.

statusExample
string

Example field from the request body.

metadataExample
object

Example field from the request body.

metadata.temperature_rangeExample
object

Example field from the request body.

metadata.temperature_range.minExample
number

Example field from the request body.

metadata.temperature_range.maxExample
number

Example field from the request body.

metadata.special_handlingExample
array<string>

Example field from the request body.

metadata.security_levelExample
string

Example field from the request body.

metadata.access_restrictionsExample
array<string>

Example field from the request body.

metadata.notesExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response201
Response body
json
1{2  "success": true,3  "message": "Warehouse location created successfully",4  "location": {5    "id": "new-location-uuid",6    "tenant_id": "tenant-uuid",7    "warehouse_id": "warehouse-uuid",8    "parent_id": "parent-location-uuid",9    "location_type": "bin",10    "code": "B-1001",11    "name": "Storage Bin 1001",12    "position": {13      "position": "front",14      "sequence": 115    },16    "capacity": {17      "max_weight": 100,18      "max_volume": 50,19      "dimensions": {20        "length": 30,21        "width": 40,22        "height": 2023      },24      "item_limit": 2025    },26    "status": "active",27    "metadata": {28      "temperature_range": {29        "min": 15,30        "max": 2531      },32      "special_handling": [33        "fragile",34        "dust-free"35      ],36      "security_level": "high",37      "access_restrictions": [38        "key-card",39        "supervisor"40      ],41      "notes": "For high-value items only"42    },43    "created_at": "2023-06-01T10:00:00Z",44    "updated_at": "2023-06-01T10:00:00Z",45    "deleted_at": null46  }47}
Error - Missing Required Field400
Response body
json
1{2  "success": false,3  "message": "Field required: position"4}
Error - Invalid Location Type400
Response body
json
1{2  "success": false,3  "message": "Invalid location type: unknown. Must be one of: zone, aisle, shelf, bin"4}
Error - Invalid Location Hierarchy400
Response body
json
1{2  "success": false,3  "message": "Invalid location hierarchy"4}
Error - Invalid Location Hierarchy400
Response body
json
1{2  "success": false,3  "message": "Invalid location hierarchy"4}
Error - Warehouse Not Found404
Response body
json
1{2  "success": false,3  "message": "Warehouse not found"4}
Error - Parent Location Not Found404
Response body
json
1{2  "success": false,3  "message": "Parent location not found"4}
Error - Tenant Not Found404
Response body
json
1{2  "success": false,3  "message": "Tenant not found"4}
Error - Insufficient Permissions403
Response body
json
1{2  "success": false,3  "message": "Insufficient permissions"4}

Get Warehouse Location

Warehousing / Warehouse Locations
GET/warehousing/locations/:id?tenant_id={{tenant_id}}&search_type=
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/warehousing/locations/:id?tenant_id={{tenant_id}}&search_type=" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json"

Path parameters

idRequired
path string

UUID of the location to retrieve (required)

Query parameters

tenant_idOptional
query string

{{tenant_id}}

UUID of the tenant (required if not in auth)

search_typeOptional
query string

Optional. Set to 'barcode' to treat :id as barcode

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200
Response body
json
1{2  "success": true,3  "message": "Location retrieved successfully",4  "location": {5    "id": "location-uuid",6    "tenant_id": "tenant-uuid",7    "warehouse_id": "warehouse-uuid",8    "parent_id": "parent-location-uuid",9    "location_type": "bin",10    "code": "B-1001",11    "name": "Storage Bin 1001",12    "position": {13      "position": "front",14      "sequence": 115    },16    "capacity": {17      "max_weight": 100,18      "max_volume": 50,19      "dimensions": {20        "length": 30,21        "width": 40,22        "height": 2023      },24      "item_limit": 2025    },26    "status": "active",27    "metadata": {28      "temperature_range": {29        "min": 15,30        "max": 2531      },32      "special_handling": [33        "fragile",34        "dust-free"35      ],36      "security_level": "high",37      "access_restrictions": [38        "key-card",39        "supervisor"40      ],41      "notes": "For high-value items only"42    },43    "created_at": "2023-06-01T10:00:00Z",44    "updated_at": "2023-06-01T10:00:00Z",45    "deleted_at": null,46    "parent": {47      "id": "parent-location-uuid",48      "location_type": "shelf",49      "code": "S-101",50      "name": "Shelf 101"51    },52    "warehouse": {53      "id": "warehouse-uuid",54      "name": "Main Warehouse",55      "code": "WH-001"56    }57  }58}
Error - Location ID Required400
Response body
json
1{2  "success": false,3  "message": "Location ID required"4}
Error - Location Not Found404
Response body
json
1{2  "success": false,3  "message": "Location not found"4}
Error - Tenant Not Found404
Response body
json
1{2  "success": false,3  "message": "Tenant not found"4}
Error - Insufficient Permissions403
Response body
json
1{2  "success": false,3  "message": "Insufficient permissions"4}

Update Warehouse Location

Warehousing / Warehouse Locations
PUT/warehousing/locations/:id?tenant_id={{tenant_id}}
Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/warehousing/locations/:id?tenant_id={{tenant_id}}" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "name": "Updated Location Name",7  "location_type": "bin",8  "parent_id": "{{parent_location_id}}",9  "status": "maintenance",10  "position": {11    "position": "back",12    "sequence": 213  },14  "capacity": {15    "max_weight": 150,16    "item_limit": 2517  },18  "metadata": {19    "notes": "Updated location notes",20    "security_level": "medium"21  }22}'
Request body
json
1{2  "name": "Updated Location Name",3  "location_type": "bin",4  "parent_id": "{{parent_location_id}}",5  "status": "maintenance",6  "position": {7    "position": "back",8    "sequence": 29  },10  "capacity": {11    "max_weight": 150,12    "item_limit": 2513  },14  "metadata": {15    "notes": "Updated location notes",16    "security_level": "medium"17  }18}

Path parameters

idRequired
path string

UUID of the location to update (required)

Query parameters

tenant_idOptional
query string

{{tenant_id}}

UUID of the tenant (required if not in auth)

Request body fields

nameExample
string

Example field from the request body.

location_typeExample
string

Example field from the request body.

parent_idExample
string

Example field from the request body.

statusExample
string

Example field from the request body.

positionExample
object

Example field from the request body.

position.positionExample
string

Example field from the request body.

position.sequenceExample
number

Example field from the request body.

capacityExample
object

Example field from the request body.

capacity.max_weightExample
number

Example field from the request body.

capacity.item_limitExample
number

Example field from the request body.

metadataExample
object

Example field from the request body.

metadata.notesExample
string

Example field from the request body.

metadata.security_levelExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200
Response body
json
1{2  "success": true,3  "message": "Location updated successfully",4  "location": {5    "id": "location-uuid",6    "tenant_id": "tenant-uuid",7    "warehouse_id": "warehouse-uuid",8    "parent_id": "parent-location-uuid",9    "location_type": "bin",10    "code": "B001",11    "barcode": "WLCWH001B001",12    "label_url": null,13    "name": "Updated Location Name",14    "position": {15      "position": "back",16      "sequence": 217    },18    "capacity": {19      "max_weight": 150,20      "item_limit": 2521    },22    "status": "maintenance",23    "metadata": {24      "notes": "Updated location notes",25      "security_level": "medium"26    },27    "created_at": "2023-06-01T10:00:00Z",28    "updated_at": "2023-06-02T10:00:00Z",29    "deleted_at": null30  }31}
Error - Location ID Required400
Response body
json
1{2  "success": false,3  "message": "Location ID required"4}
Error - Invalid Position Structure400
Response body
json
1{2  "success": false,3  "message": "Bin position must include 'position' and 'sequence'"4}
Error - Location Not Found404
Response body
json
1{2  "success": false,3  "message": "Location not found"4}
Error - Tenant Not Found404
Response body
json
1{2  "success": false,3  "message": "Tenant not found"4}
Error - Insufficient Permissions403
Response body
json
1{2  "success": false,3  "message": "Insufficient permissions"4}
Error - Invalid Request Body400
Response body
json
1{2  "success": false,3  "message": "Invalid request body"4}