Warehouses
5 API calls in this section.
List Warehouses
/warehousing/warehouses?page=1&limit=10&status=&code=&search=&sort_by=&sort_order=desc&column_filters=&total_capacity_order=&available_capacity_order=&customer_id=&carrier_code=&tenant_id=&language=enList warehouses with pagination, sorting, column filters and stats.
1curl --request GET "$ONDI_BASE_URL/warehousing/warehouses?page=1&limit=10&status=&code=&search=&sort_by=&sort_order=desc&column_filters=&total_capacity_order=&available_capacity_order=&customer_id=&carrier_code=&tenant_id=&language=en" \2 --header "Authorization: Bearer {{access_token}}"Query parameters
pageOptional1
Page number (default: 1)
limitOptional10
Items per page (default: 10)
statusOptionalLegacy: filter by status (active|inactive|maintenance|full)
codeOptionalLegacy: exact code filter
searchOptionalSearch by name or code (ILIKE)
sort_byOptionalSort column: name | code | status | total_capacity | available_capacity | created_at (default)
sort_orderOptionaldesc
asc or desc (default: desc). Overridden by total_capacity_order/available_capacity_order if set.
column_filtersOptionalJSON object. Keys: name (ILIKE), code (ILIKE), status (exact), access_mode (exact: all_users|exclude_users|select_users), total_capacity (number or {min?,max?}), available_capacity (number or {min?,max?}), created_at ({from?,to?}). Example: {"status":"active","total_capacity":{"min":100}}
total_capacity_orderOptionalLegacy sort: asc|desc (takes precedence over sort_by)
available_capacity_orderOptionalLegacy sort: asc|desc (takes precedence over sort_by)
customer_idOptionalFilter by customer access mapping (business user_id). Applied implicitly for customer-role users.
carrier_codeOptionalWhen provided, returns carrier_config_present + external_integration per warehouse
tenant_idOptionalTenant ID (optional if in auth token)
languageOptionalen
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
1{2 "success": false,3 "message": "Tenant not found"4}1{2 "success": false,3 "message": "Insufficient permissions"4}1{2 "success": false,3 "message": "Internal server error"4}Create Warehouse
/warehousing/warehouses?tenant_id={{tenant_id}}1curl --request POST "$ONDI_BASE_URL/warehousing/warehouses?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": "Main Distribution Center",7 "code": "WH001",8 "address_id": "{{address_id}}",9 "status": "active",10 "total_capacity": 10000,11 "available_capacity": 7500,12 "features": {13 "climate_control": true,14 "security_level": "high",15 "dock_doors": 12,16 "hazardous_materials": false,17 "refrigeration": true,18 "cross_docking": true19 },20 "access_mode": "all_users",21 "user_ids": []22}'1{2 "name": "Main Distribution Center",3 "code": "WH001",4 "address_id": "{{address_id}}",5 "status": "active",6 "total_capacity": 10000,7 "available_capacity": 7500,8 "features": {9 "climate_control": true,10 "security_level": "high",11 "dock_doors": 12,12 "hazardous_materials": false,13 "refrigeration": true,14 "cross_docking": true15 },16 "access_mode": "all_users",17 "user_ids": []18}Query parameters
tenant_idOptional{{tenant_id}}
UUID of the tenant (required if not in auth)
Request body fields
nameExampleExample field from the request body.
codeExampleExample field from the request body.
address_idExampleExample field from the request body.
statusExampleExample field from the request body.
total_capacityExampleExample field from the request body.
available_capacityExampleExample field from the request body.
featuresExampleExample field from the request body.
features.climate_controlExampleExample field from the request body.
features.security_levelExampleExample field from the request body.
features.dock_doorsExampleExample field from the request body.
features.hazardous_materialsExampleExample field from the request body.
features.refrigerationExampleExample field from the request body.
features.cross_dockingExampleExample field from the request body.
access_modeExampleExample field from the request body.
user_idsExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "message": "Warehouse created successfully",4 "warehouse": {5 "id": "warehouse-uuid",6 "tenant_id": "tenant-uuid",7 "name": "Main Distribution Center",8 "code": "WH001",9 "address_id": "address-uuid",10 "status": "active",11 "total_capacity": 10000,12 "available_capacity": 7500,13 "features": {14 "climate_control": true,15 "security_level": "high",16 "dock_doors": 12,17 "hazardous_materials": false,18 "refrigeration": true,19 "cross_docking": true20 },21 "created_at": "2023-06-01T10:00:00Z",22 "updated_at": "2023-06-01T10:00:00Z",23 "deleted_at": null24 }25}1{2 "success": false,3 "message": "Invalid access mode"4}1{2 "success": false,3 "message": "Customer IDs required for selected access mode"4}1{2 "success": false,3 "message": "Invalid customer IDs",4 "invalid_customer_ids": [5 "user-uuid-not-in-tenant"6 ]7}1{2 "success": false,3 "message": "Field required: name"4}1{2 "success": false,3 "message": "Warehouse code already exists"4}1{2 "success": false,3 "message": "Invalid feature field: invalid_feature"4}1{2 "success": false,3 "message": "Address not found"4}1{2 "success": false,3 "message": "Tenant not found"4}1{2 "success": false,3 "message": "Insufficient permissions"4}1{2 "success": false,3 "message": "Internal server error"4}Get Warehouse
/warehousing/warehouses/:id?tenant_id={{tenant_id}}1curl --request GET "$ONDI_BASE_URL/warehousing/warehouses/:id?tenant_id={{tenant_id}}" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json"Path parameters
idRequiredUUID of the warehouse to retrieve (required)
Query parameters
tenant_idOptional{{tenant_id}}
UUID of the tenant (required if not in auth)
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "message": "Warehouse retrieved successfully",4 "warehouse": {5 "id": "warehouse-uuid",6 "tenant_id": "tenant-uuid",7 "name": "Main Distribution Center",8 "code": "WH001",9 "address_id": "address-uuid",10 "status": "active",11 "total_capacity": 10000,12 "available_capacity": 7500,13 "features": {14 "climate_control": true,15 "security_level": "high",16 "dock_doors": 12,17 "hazardous_materials": false,18 "refrigeration": true,19 "cross_docking": true20 },21 "created_at": "2023-06-01T10:00:00Z",22 "updated_at": "2023-06-01T10:00:00Z",23 "deleted_at": null,24 "address": {25 "id": "address-uuid",26 "full_address": "123 Warehouse Blvd, Industrial District",27 "city": "Metropolis",28 "country": "US",29 "latitude": 40.7128,30 "longitude": -74.00631 }32 }33}1{2 "success": false,3 "message": "Warehouse not found"4}1{2 "success": false,3 "message": "Tenant not found"4}1{2 "success": false,3 "message": "Insufficient permissions"4}Update Warehouse
/warehousing/warehouses/:id?tenant_id={{tenant_id}}1curl --request PUT "$ONDI_BASE_URL/warehousing/warehouses/: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 Distribution Center",7 "code": "WH001-UPDATED",8 "address_id": "{{new_address_id}}",9 "status": "maintenance",10 "total_capacity": 12000,11 "available_capacity": 9000,12 "features": {13 "climate_control": true,14 "security_level": "maximum",15 "dock_doors": 15,16 "hazardous_materials": true,17 "refrigeration": true,18 "cross_docking": true19 },20 "access_mode": "select_users",21 "user_ids": [22 "{{customer_id_1}}",23 "{{customer_id_2}}"24 ]25}'1{2 "name": "Updated Distribution Center",3 "code": "WH001-UPDATED",4 "address_id": "{{new_address_id}}",5 "status": "maintenance",6 "total_capacity": 12000,7 "available_capacity": 9000,8 "features": {9 "climate_control": true,10 "security_level": "maximum",11 "dock_doors": 15,12 "hazardous_materials": true,13 "refrigeration": true,14 "cross_docking": true15 },16 "access_mode": "select_users",17 "user_ids": [18 "{{customer_id_1}}",19 "{{customer_id_2}}"20 ]21}Path parameters
idRequiredUUID of the warehouse to update (required)
Query parameters
tenant_idOptional{{tenant_id}}
UUID of the tenant (required if not in auth)
Request body fields
nameExampleExample field from the request body.
codeExampleExample field from the request body.
address_idExampleExample field from the request body.
statusExampleExample field from the request body.
total_capacityExampleExample field from the request body.
available_capacityExampleExample field from the request body.
featuresExampleExample field from the request body.
features.climate_controlExampleExample field from the request body.
features.security_levelExampleExample field from the request body.
features.dock_doorsExampleExample field from the request body.
features.hazardous_materialsExampleExample field from the request body.
features.refrigerationExampleExample field from the request body.
features.cross_dockingExampleExample field from the request body.
access_modeExampleExample field from the request body.
user_idsExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "message": "Warehouse updated successfully",4 "warehouse": {5 "id": "warehouse-uuid",6 "tenant_id": "tenant-uuid",7 "name": "Updated Distribution Center",8 "code": "WH001-UPDATED",9 "address_id": "new-address-uuid",10 "status": "maintenance",11 "total_capacity": 12000,12 "available_capacity": 9000,13 "features": {14 "climate_control": true,15 "security_level": "maximum",16 "dock_doors": 15,17 "hazardous_materials": true,18 "refrigeration": true,19 "cross_docking": true20 },21 "created_at": "2023-06-01T10:00:00Z",22 "updated_at": "2023-06-02T10:00:00Z",23 "deleted_at": null24 }25}1{2 "success": false,3 "message": "Invalid access mode"4}1{2 "success": false,3 "message": "Customer IDs required for selected access mode"4}1{2 "success": false,3 "message": "Invalid customer IDs",4 "invalid_customer_ids": [5 "user-uuid-not-in-tenant"6 ]7}1{2 "success": false,3 "message": "Address ID cannot be null"4}1{2 "success": false,3 "message": "Warehouse code already exists"4}1{2 "success": false,3 "message": "Invalid feature field: invalid_feature"4}1{2 "success": false,3 "message": "Warehouse not found"4}1{2 "success": false,3 "message": "Address not found"4}1{2 "success": false,3 "message": "Tenant not found"4}1{2 "success": false,3 "message": "Insufficient permissions"4}1{2 "success": false,3 "message": "Internal server error"4}Delete Warehouse
/warehousing/warehouses/:id?tenant_id={{tenant_id}}1curl --request DELETE "$ONDI_BASE_URL/warehousing/warehouses/:id?tenant_id={{tenant_id}}" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json"Path parameters
idRequiredUUID of the warehouse to delete (required)
Query parameters
tenant_idOptional{{tenant_id}}
UUID of the tenant (required if not in auth)
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "message": "Warehouse deleted successfully"4}1{2 "success": false,3 "message": "Warehouse has inventory"4}1{2 "success": false,3 "message": "Warehouse not found"4}1{2 "success": false,3 "message": "Tenant not found"4}1{2 "success": false,3 "message": "Insufficient permissions"4}1{2 "success": false,3 "message": "Internal server error"4}