Skip to main content

Staff

4 API calls in this section.

Add Staff (create + link)​

Restaurant Menu / Staff
POST/restaurant/locations/:locationId/staff

Creates 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

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
emailstring—
passwordstring—
full_namestring—
staff_rolestring—
avatar_urlstring—
Staging
Request
curl
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": "staff@example.com",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 Menu / Staff
PUT/restaurant/staff/:staffId

Updates staff user metadata and/or password. Email cannot be updated. Password must be exactly 6 numeric digits.

Path parameters

ParameterTypeDescription
staffIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
full_namestring—
avatar_urlstring—
passwordstring—
Staging
Request
curl
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 Menu / Staff
GET/restaurant/locations/:locationId/staff

Lists staff with pagination and search. Response includes page, limit, total.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Query parameters

ParameterTypeDescription
searchstring

Filter by user first_name/last_name/email

Example: {{search}}

sortstring

Sort field: created_at|updated_at

Example: created_at

orderstring

asc|desc

Example: desc

pagestring

Example: 1

limitstring

Example: 10

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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 Menu / Staff
GET/restaurant/staff/:staffId

Fetches a single staff member (tenant-scoped).

Path parameters

ParameterTypeDescription
staffIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

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