Staff
4 API calls in this section.
Add Staff (create + link)
/restaurant/locations/:locationId/staffCreates an auth user (email auto-confirmed), links to location as staff with staff_role (cashier|kitchen_staff), assigns tenant role 'restaurant_staff', and enqueues a credential email containing the restaurant code and 6-digit staff PIN. Password must be exactly 6 numeric digits.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
email | string | — |
password | string | — |
full_name | string | — |
staff_role | string | — |
avatar_url | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/staff" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "email": "[email protected]",6 "password": "123456",7 "full_name": "John Doe",8 "staff_role": "cashier",9 "avatar_url": "https://example.com/avatar.jpg"10}'Response examples
No saved response example. Use Try it to inspect a staging response.
Update Staff (name/avatar/password)
/restaurant/staff/:staffIdUpdates staff user metadata and/or password. Email cannot be updated. Password must be exactly 6 numeric digits.
Path parameters
| Parameter | Type | Description |
|---|---|---|
staffIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
full_name | string | — |
avatar_url | string | — |
password | string | — |
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/restaurant/staff/${STAFFID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "full_name": "John D. Doe",6 "avatar_url": "https://example.com/new-avatar.jpg",7 "password": "654321"8}'Response examples
No saved response example. Use Try it to inspect a staging response.
List Staff (by Location)
/restaurant/locations/:locationId/staffLists staff with pagination and search. Response includes page, limit, total.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Query parameters
| Parameter | Type | Description |
|---|---|---|
search | string | Filter by user Example: |
sort | string | Sort field: Example: |
order | string | asc|desc Example: |
page | string | Example: |
limit | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/staff?search=${SEARCH}&sort=created_at&order=desc&page=1&limit=10" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
Get Staff (by ID)
/restaurant/staff/:staffIdFetches a single staff member (tenant-scoped).
Path parameters
| Parameter | Type | Description |
|---|---|---|
staffIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/staff/${STAFFID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.