Skip to main content

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 / Warehouse Staff
GET/warehousing/staff

Retrieves 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

ParameterTypeDescription
tenant_idstring

UUID of the tenant (required if not in auth context)

Example: {{tenant_id}}

warehouse_idOptionalstring

Legacy: filter by warehouse UUID (optional)

roleOptionalstring

Legacy: filter by role — manager | supervisor | picker | receiver (optional)

statusOptionalstring

Legacy: filter by status — active | inactive | on_leave (optional)

user_idOptionalstring

Legacy: filter by specific user UUID (optional)

searchOptionalstring

Full-text search across full_name, email, phone (optional)

sort_bystring

Sort column — created_at (only supported value, default: created_at)

Example: created_at

sort_orderOptionalstring

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

Example: desc

column_filtersstring

JSON object of column filters, AND-combined. Supported keys: warehouse_id (exact), role (exact), status (exact), created_at ({from, to} date range). AND-combined with standalone params if same key is present.

pageOptionalstring

Page number for pagination (optional, default: 1)

Example: 1

limitOptionalstring

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

Example: 20

languageOptionalstring

Response language (optional, default: en)

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

More examples
column_filters example
json
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}
Staging
Request
curl
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

200OK
Response body
json
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": "john.doe@example.com",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": "jane.smith@example.com",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 / Warehouse Staff
POST/warehousing/staff

Creates 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

ParameterTypeDescription
tenant_idstring

UUID of the tenant (required if not in auth context) (required if not in auth context): UUID of the tenant

Example: {{tenant_id}}

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
warehouse_idstring—
user_idstring—
rolestring—
statusstring—
Staging
Request
curl
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)
Request example 1
text
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

201Created
Response body
json
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": "john.doe@example.com"23    }24  }25}

Update Warehouse Staff​

Warehousing / Warehouse Staff
PUT/warehousing/staff/:id

Updates 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

ParameterTypeDescription
idRequiredstring

UUID of the staff assignment to update (required)

Example: {{staff_assignment_id}}

Query parameters

ParameterTypeDescription
tenant_idstring

UUID of the tenant (required if not in auth context) (required if not in auth context): UUID of the tenant

Example: {{tenant_id}}

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
rolestring—
statusstring—
Staging
Request
curl
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)
Request example 1
text
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

200OK
Response body
json
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": "john.doe@example.com",24      "phone": "+15551234567",25      "avatar_url": null,26      "full_name": "John Doe"27    }28  }29}

Get Warehouse Staff by ID (or Own Profile)​

Warehousing / Warehouse Staff
GET/warehousing/staff/:staff_id

Retrieves 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

ParameterTypeDescription
staff_idRequiredstring

UUID of the warehouse staff record (the API automatically detects if this is your own profile)

Example: {{staff_id}}

Query parameters

ParameterTypeDescription
tenant_idstring

UUID of the tenant (required if not in auth context) (required if not in auth context): UUID of the tenant

Example: {{tenant_id}}

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Staging
Request
curl
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

200OK
Response body
json
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": "john.doe@example.com",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 / Warehouse Staff
PUT/warehousing/staff/:staff_id

Updates 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_staff tables as needed

Path parameters

ParameterTypeDescription
staff_idRequiredstring

UUID of the warehouse staff record (the API automatically detects if this is your own profile)

Example: {{staff_id}}

Query parameters

ParameterTypeDescription
tenant_idstring

UUID of the tenant (required if not in auth context) (required if not in auth context): UUID of the tenant

Example: {{tenant_id}}

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
first_namestring—
last_namestring—
phonestring—
avatar_urlstring—
statusstring—
Staging
Request
curl
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)
Request example 1
text
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}
Request example 2
text
1{2  "role": "string", // optional - staff role3  "status": "string" // optional - staff status4}

Response examples

200OK
Response body
json
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": "john.doe@example.com",24      "phone": "+15559876543",25      "avatar_url": "https://example.com/avatars/john.jpg",26      "full_name": "John Smith"27    }28  }29}