Warehouses
5 API calls in this section.
APIs for managing warehouses in the system
List Warehouses
/warehousing/warehousesRetrieves a list of warehouses with optional filtering and pagination. Returns warehouses with their address information.
User must have 'view:tenant' or 'manage:operations:tenant' permission
Response
Returns a paginated list of warehouses
Includes address information for each warehouse
Provides pagination information (total count, current page, limit)
List warehouses with pagination, sorting, column filters and stats.
Query parameters
| Parameter | Type | Description |
|---|---|---|
pageOptional | string | Page number (default: 1) Page number for pagination (default: 1) Example: |
limitOptional | string | Items per page (default: 10) Number of items per page (default: 10) Example: |
statusOptional | string | Legacy: filter by status (active|inactive|maintenance|full) Filter by warehouse status ( |
codeOptional | string | Legacy: exact code filter Filter by warehouse code |
searchOptional | string | Search by name or code (ILIKE) Search warehouses by name or code |
sort_by | string | Sort column: name | code | status | |
sort_order | string | asc or desc (default: desc). Overridden by Example: |
column_filters | string | JSON object. Keys: name (ILIKE), code (ILIKE), status (exact), |
total_capacity_orderOptional | string | Legacy sort: asc|desc (takes precedence over |
available_capacity_orderOptional | string | Legacy sort: asc|desc (takes precedence over |
customer_idOptional | string | Filter by customer access mapping (business |
carrier_code | string | When provided, returns |
tenant_id | string | Tenant ID (optional if in auth token) (required if not in auth): UUID of the tenant |
language | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/warehousing/warehouses?page=1&limit=10&status=&code=&search=&sort_by=&sort_order=desc&column_filters=&total_capacity_order=&available_capacity_order=&customer_id=&tenant_id=&language=en" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "message": "warehouses_retrieved_successfully",4 "warehouses": [5 {6 "id": "uuid",7 "tenant_id": "uuid",8 "name": "Main Distribution Center",9 "code": "WH001",10 "status": "active",11 "access_mode": "all_users",12 "total_capacity": 10000,13 "available_capacity": 7500,14 "created_at": "2025-01-15T08:00:00Z",15 "address": {16 "id": "uuid",17 "full_address": "123 Warehouse Blvd",18 "city": "Metropolis",19 "country": "US",20 "latitude": 40.7128,21 "longitude": -74.00622 }23 }24 ],25 "page": 1,26 "limit": 10,27 "total": 42,28 "stats": {29 "totalWarehouses": 50,30 "activeCount": 35,31 "maintenanceCount": 5,32 "inactiveCount": 10,33 "totalCapacity": 500000,34 "availableCapacity": 32000035 }36}Create Warehouse
/warehousing/warehousesCreates a new warehouse with specified details including address, capacity, access control, and special features.
User must have 'manage:operations:tenant' permission
Business Rules
Warehouse code must be unique within a tenant
Address must exist and belong to the specified tenant
If
total_capacityis provided butavailable_capacityis not,available_capacitywill default tototal_capacityIf features are provided, they must only contain valid feature keys
When
access_modeisselect_users, only mappeduser_idscan access; whenexclude_users, all except provideduser_idscan accessuser_idsmust belong to business users of the tenant; otherwise request fails withinvalid_customer_ids
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth) (required if not in auth): UUID of the tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
name | string | — |
code | string | — |
address_id | string | — |
status | string | — |
total_capacity | number | — |
available_capacity | number | — |
features | object | — |
features.climate_control | boolean | — |
features.security_level | string | — |
features.dock_doors | number | — |
features.hazardous_materials | boolean | — |
features.refrigeration | boolean | — |
Show 3 more body fields
Additional body parameters
| Parameter | Type | Description |
|---|---|---|
features.cross_docking | boolean | — |
access_mode | string | — |
user_ids | array | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/warehousing/warehouses?tenant_id=${TENANT_ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "name": "Main Distribution Center",6 "code": "WH001",7 "address_id": "{{address_id}}",8 "status": "active",9 "total_capacity": 10000,10 "available_capacity": 7500,11 "features": {12 "climate_control": true,13 "security_level": "high",14 "dock_doors": 12,15 "hazardous_materials": false,16 "refrigeration": true,17 "cross_docking": true18 },19 "access_mode": "all_users",20 "user_ids": []21}'Replace {{placeholders}} with your own values before sending.
Other request examples (1)
1{2 "name": "string", // required - name of the warehouse3 "code": "string", // required - unique identifier code4 "address_id": "uuid", // required - reference to an existing address5 "status": "string", // optional - defaults to "active"6 "total_capacity": number, // optional - total storage capacity7 "available_capacity": number, // optional - available storage capacity8 "features": { // optional - special warehouse features9 "climate_control": boolean,10 "security_level": string,11 "dock_doors": number,12 "hazardous_materials": boolean,13 "refrigeration": boolean,14 "cross_docking": boolean15 },16 "access_mode": "all_users|select_users|exclude_users", // optional - defaults to all_users17 "user_ids": ["uuid", ...] // required when access_mode is select_users or exclude_users (business users only)18}Response examples
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}Get Warehouse
/warehousing/warehouses/:idRetrieves detailed information about a specific warehouse, including its address information.
User must have 'view:tenant' or 'manage:operations:tenant' permission
Response
Returns detailed warehouse information
Includes
warehouse.address.titleas the stored localized title object, alongside the existing address fieldsContains feature specifications and capacity information
Frontend integration contract
Read the address label from
warehouse.address.titleusing the frontend's existing localized-object handling. No request fields, actions, IDs, navigation behavior, or error handling changed.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | UUID of the warehouse to retrieve (required) |
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth) (required if not in auth): UUID of the tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/warehousing/warehouses/${ID}?tenant_id=${TENANT_ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json"Response examples
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 "title": {27 "en": "Main Distribution Center"28 },29 "full_address": "123 Warehouse Blvd, Industrial District",30 "city": "Metropolis",31 "country": "US",32 "latitude": 40.7128,33 "longitude": -74.00634 }35 }36}Update Warehouse
/warehousing/warehouses/:idUpdates an existing warehouse with new information. Only the fields included in the request will be updated.
User must have 'manage:operations:tenant' permission
Business Rules
Warehouse must exist and belong to the specified tenant
Address ID cannot be null or empty
If a new address ID is provided, it must exist and belong to the tenant
If code is provided, it must be unique within the tenant (not used by another warehouse)
Only valid feature fields are allowed in the features object
If
access_modeis select/exclude,user_idsare required and must refer to business users in the tenantUpdated timestamp is automatically set to current time
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | UUID of the warehouse to update (required) |
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth) (required if not in auth): UUID of the tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
name | string | — |
code | string | — |
address_id | string | — |
status | string | — |
total_capacity | number | — |
available_capacity | number | — |
features | object | — |
features.climate_control | boolean | — |
features.security_level | string | — |
features.dock_doors | number | — |
features.hazardous_materials | boolean | — |
features.refrigeration | boolean | — |
Show 3 more body fields
Additional body parameters
| Parameter | Type | Description |
|---|---|---|
features.cross_docking | boolean | — |
access_mode | string | — |
user_ids | array<string> | — |
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/warehousing/warehouses/${ID}?tenant_id=${TENANT_ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "name": "Updated Distribution Center",6 "code": "WH001-UPDATED",7 "address_id": "{{new_address_id}}",8 "status": "maintenance",9 "total_capacity": 12000,10 "available_capacity": 9000,11 "features": {12 "climate_control": true,13 "security_level": "maximum",14 "dock_doors": 15,15 "hazardous_materials": true,16 "refrigeration": true,17 "cross_docking": true18 },19 "access_mode": "select_users",20 "user_ids": [21 "{{customer_id_1}}",22 "{{customer_id_2}}"23 ]24}'Replace {{placeholders}} with your own values before sending.
Other request examples (1)
1{2 // All fields are optional for updates except address_id3 "name": "string",4 "code": "string",5 "address_id": "uuid", // Cannot be set to null6 "status": "string",7 "total_capacity": number,8 "available_capacity": number,9 "features": {10 "climate_control": boolean,11 "security_level": string,12 "dock_doors": number,13 "hazardous_materials": boolean,14 "refrigeration": boolean,15 "cross_docking": boolean16 },17 "access_mode": "all_users|select_users|exclude_users", // optional - if provided, validated against enum18 "user_ids": ["uuid", ...] // required when effective access_mode is select_users or exclude_users19}Response examples
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}Delete Warehouse
/warehousing/warehouses/:idPerforms a soft delete of a warehouse by setting the deleted_at timestamp. This maintains referential integrity by not physically removing the record.
User must have 'manage:operations:tenant' permission
Business Rules
Warehouse must exist and belong to the specified tenant
Warehouse cannot be deleted if it has active inventory
Operation performs a soft delete by setting the
deleted_attimestampNo physical deletion of records occurs
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | UUID of the warehouse to delete (required) |
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth) (required if not in auth): UUID of the tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
1curl --globoff --request DELETE "https://staging-api.ondi.io/functions/v1/warehousing/warehouses/${ID}?tenant_id=${TENANT_ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json"Response examples
1{2 "success": true,3 "message": "Warehouse deleted successfully"4}