Warehouse Staff
5 API calls in this section.
Endpoints for managing warehouse staff assignments, including assigning users to warehouses with specific roles, listing staff with filtering options, and allowing warehouse staff to manage their own profiles.
List Warehouse Staff
/warehousing/staffRetrieves staff assigned to warehouses with optional filtering. Standalone params (warehouse_id, role, status, user_id, search) are kept for backward compatibility with form-modal callers. New list-page callers use column_filters + sort_by + sort_order. Response includes a stats block for KPI cards.
column_filters example
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth context) Example: |
warehouse_idOptional | string | Legacy: filter by warehouse UUID (optional) |
roleOptional | string | Legacy: filter by role — manager | supervisor | picker | receiver (optional) |
statusOptional | string | Legacy: filter by status — active | inactive | |
user_idOptional | string | Legacy: filter by specific user UUID (optional) |
searchOptional | string | Full-text search across |
sort_by | string | Sort column — Example: |
sort_orderOptional | string | Sort direction — asc | desc (optional, default: desc) Example: |
column_filters | string | JSON object of column filters, AND-combined. Supported keys: |
pageOptional | string | Page number for pagination (optional, default: 1) Example: |
limitOptional | string | Number of items per page (optional, default: 20) Example: |
languageOptional | string | Response language (optional, default: en) Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
More examples
1{2 "warehouse_id": "uuid",3 "role": "manager",4 "status": "active",5 "created_at": {6 "from": "2025-01-01",7 "to": "2025-12-31"8 }9}1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/warehousing/staff?tenant_id=${TENANT_ID}&warehouse_id=&role=&status=&user_id=&search=&sort_by=created_at&sort_order=desc&column_filters=&page=1&limit=20&language=en" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json"Response examples
1{2 "success": true,3 "message": "Warehouse staff retrieved successfully",4 "staff": [5 {6 "id": "staff-uuid-1",7 "tenant_id": "tenant-uuid",8 "warehouse_id": "warehouse-uuid-1",9 "user_id": "user-uuid-1",10 "role": "manager",11 "status": "active",12 "created_at": "2024-06-01T10:00:00Z",13 "updated_at": "2024-06-01T10:00:00Z",14 "warehouse": {15 "id": "warehouse-uuid-1",16 "name": "Main Distribution Center",17 "code": "WH001",18 "address_id": "address-uuid"19 },20 "user": {21 "id": "user-uuid-1",22 "email": "[email protected]",23 "phone": "+15551234567",24 "full_name": "John Doe",25 "first_name": "John",26 "last_name": "Doe",27 "avatar_url": null28 }29 },30 {31 "id": "staff-uuid-2",32 "tenant_id": "tenant-uuid",33 "warehouse_id": "warehouse-uuid-1",34 "user_id": "user-uuid-2",35 "role": "picker",36 "status": "on_leave",37 "created_at": "2024-05-15T08:30:00Z",38 "updated_at": "2024-05-15T08:30:00Z",39 "warehouse": {40 "id": "warehouse-uuid-1",41 "name": "Main Distribution Center",42 "code": "WH001",43 "address_id": "address-uuid"44 },45 "user": {46 "id": "user-uuid-2",47 "email": "[email protected]",48 "phone": "+15559876543",49 "full_name": "Jane Smith",50 "first_name": "Jane",51 "last_name": "Smith",52 "avatar_url": null53 }54 }55 ],56 "stats": {57 "totalStaff": 15,58 "activeCount": 13,59 "inactiveCount": 1,60 "onLeaveCount": 161 },62 "page": 1,63 "limit": 20,64 "total": 1565}Assign User as Warehouse Staff
/warehousing/staffCreates a new staff assignment for a user to a warehouse with a specific role. Verifies that the warehouse and user exist and belong to the specified tenant, and that the user is not already assigned to the warehouse.
User must have 'manage:users:tenant' permission or be a system admin
Business Rules
User must be a member of the specified tenant
Warehouse must exist and belong to the specified tenant
Role must be one of: "manager", "supervisor", "picker", "receiver"
Status must be one of: "active", "inactive", "
on_leave"A user cannot be assigned to the same warehouse more than once
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth context) (required if not in auth context): UUID of the tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
warehouse_id | string | — |
user_id | string | — |
role | string | — |
status | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/warehousing/staff?tenant_id=${TENANT_ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "warehouse_id": "{{warehouse_id}}",6 "user_id": "{{user_id}}",7 "role": "manager",8 "status": "active"9}'Replace {{placeholders}} with your own values before sending.
Other request examples (1)
1{2 "warehouse_id": "uuid", // required - UUID of the warehouse3 "user_id": "uuid", // required - UUID of the user to assign4 "role": "string", // required - Role of the user (e.g., "manager", "supervisor", "picker", "receiver")5 "status": "string" // required - Status of the assignment (e.g., "active", "inactive", "on_leave")6}Response examples
1{2 "success": true,3 "message": "Warehouse staff assigned successfully",4 "Staff": {5 "id": "assignment-uuid",6 "tenant_id": "tenant-uuid",7 "warehouse_id": "warehouse-uuid-1",8 "user_id": "user-uuid-1",9 "role": "manager",10 "status": "active",11 "created_at": "2023-04-15T10:30:00Z",12 "updated_at": "2023-04-15T10:30:00Z",13 "warehouse": {14 "id": "warehouse-uuid-1",15 "name": "Main Distribution Center",16 "code": "WH001"17 },18 "user": {19 "id": "user-uuid-1",20 "first_name": "John",21 "last_name": "Doe",22 "email": "[email protected]"23 }24 }25}Update Warehouse Staff
/warehousing/staff/:idUpdates an existing warehouse staff assignment with new role or status information.
User must have 'manage:users:tenant' permission or be a system admin
Business Rules
Staff assignment must exist and belong to the specified tenant
At least one field (role or status) must be provided for update
If role is provided, it must be one of: "manager", "supervisor", "picker", "receiver"
If status is provided, it must be one of: "active", "inactive", "
on_leave"Updated timestamp is automatically set to current time
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | UUID of the staff assignment to update (required) Example: |
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth context) (required if not in auth context): UUID of the tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
role | string | — |
status | string | — |
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/warehousing/staff/${ID}?tenant_id=${TENANT_ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "role": "supervisor",6 "status": "on_leave"7}'Other request examples (1)
1{2 "role": "string", // optional - New role (e.g., "manager", "supervisor", "picker", "receiver")3 "status": "string" // optional - New status (e.g., "active", "inactive", "on_leave")4}Response examples
1{2 "success": true,3 "message": "Warehouse staff updated successfully",4 "staff": {5 "id": "staff-assignment-uuid",6 "tenant_id": "tenant-uuid",7 "warehouse_id": "warehouse-uuid-1",8 "user_id": "user-uuid-1",9 "role": "supervisor",10 "status": "on_leave",11 "created_at": "2023-01-01T00:00:00Z",12 "updated_at": "2023-04-15T15:30:00Z",13 "warehouse": {14 "id": "warehouse-uuid-1",15 "name": "Main Distribution Center",16 "code": "WH001",17 "address_id": "address-uuid"18 },19 "user": {20 "id": "user-uuid-1",21 "first_name": "John",22 "last_name": "Doe",23 "email": "[email protected]",24 "phone": "+15551234567",25 "avatar_url": null,26 "full_name": "John Doe"27 }28 }29}Get Warehouse Staff by ID (or Own Profile)
/warehousing/staff/:staff_idRetrieves warehouse staff details by ID. If the ID belongs to the current user, it returns as 'profile', otherwise as 'staff'. System automatically detects ownership.
For own profile: any warehouse staff member
For others: requires 'view:tenant' or 'manage:users:tenant' permission
Response
Returns warehouse staff details with user and warehouse information
Uses 'profile' key if viewing own data, 'staff' key if viewing others
Path parameters
| Parameter | Type | Description |
|---|---|---|
staff_idRequired | string | UUID of the warehouse staff record (the API automatically detects if this is your own profile) Example: |
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth context) (required if not in auth context): 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/staff/${STAFF_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": "Profile retrieved successfully",4 "profile": {5 "id": "staff-uuid-1",6 "tenant_id": "tenant-uuid",7 "warehouse_id": "warehouse-uuid-1",8 "user_id": "user-uuid-1",9 "role": "picker",10 "status": "active",11 "created_at": "2023-01-01T00:00:00Z",12 "updated_at": "2023-01-01T00:00:00Z",13 "warehouse": {14 "id": "warehouse-uuid-1",15 "name": "Main Distribution Center",16 "code": "WH001",17 "address_id": "address-uuid"18 },19 "user": {20 "id": "user-uuid-1",21 "first_name": "John",22 "last_name": "Doe",23 "email": "[email protected]",24 "phone": "+15559876543",25 "avatar_url": "https://example.com/avatars/john.jpg",26 "full_name": "John Doe"27 }28 }29}Update Warehouse Staff by ID (or Own Profile)
/warehousing/staff/:staff_idUpdates warehouse staff details by ID. If the ID belongs to the current user, they can update personal info + status. System automatically detects ownership and permissions.
For own profile: any warehouse staff member (can update personal info + status)
For others: requires 'manage:users:tenant' permission (can update role + status only)
Business Rules
System detects if user is updating own profile vs others
Own profile: can update user fields + staff status
Others: admin can update role + status only
Updates both user and
warehouse_stafftables as needed
Path parameters
| Parameter | Type | Description |
|---|---|---|
staff_idRequired | string | UUID of the warehouse staff record (the API automatically detects if this is your own profile) Example: |
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | UUID of the tenant (required if not in auth context) (required if not in auth context): UUID of the tenant Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
first_name | string | — |
last_name | string | — |
phone | string | — |
avatar_url | string | — |
status | string | — |
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/warehousing/staff/${STAFF_ID}?tenant_id=${TENANT_ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "first_name": "John",6 "last_name": "Smith",7 "phone": "+15559876543",8 "avatar_url": "https://example.com/new-avatar.jpg",9 "status": "active"10}'Other request examples (2)
1{2 "first_name": "string", // optional - user's first name3 "last_name": "string", // optional - user's last name4 "phone": "string", // optional - user's phone number5 "avatar_url": "string", // optional - user's avatar URL6 "status": "string" // optional - staff status ("active", "inactive", "on_leave")7}1{2 "role": "string", // optional - staff role3 "status": "string" // optional - staff status4}Response examples
1{2 "success": true,3 "message": "Profile updated successfully",4 "profile": {5 "id": "staff-uuid-1",6 "tenant_id": "tenant-uuid",7 "warehouse_id": "warehouse-uuid-1",8 "user_id": "user-uuid-1",9 "role": "picker",10 "status": "active",11 "created_at": "2023-01-01T00:00:00Z",12 "updated_at": "2023-04-15T16:30:00Z",13 "warehouse": {14 "id": "warehouse-uuid-1",15 "name": "Main Distribution Center",16 "code": "WH001",17 "address_id": "address-uuid"18 },19 "user": {20 "id": "user-uuid-1",21 "first_name": "John",22 "last_name": "Smith",23 "email": "[email protected]",24 "phone": "+15559876543",25 "avatar_url": "https://example.com/avatars/john.jpg",26 "full_name": "John Smith"27 }28 }29}