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.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/locations/:locationId/staff" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{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}'
Request body
json
1{2  "email": "staff@example.com",3  "password": "123456",4  "full_name": "John Doe",5  "staff_role": "cashier",6  "avatar_url": "https://example.com/avatar.jpg"7}

Path parameters

locationIdRequired
path string

Request body fields

emailExample
string

Example field from the request body.

passwordExample
string

Example field from the request body.

full_nameExample
string

Example field from the request body.

staff_roleExample
string

Example field from the request body.

avatar_urlExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

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.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/restaurant/staff/:staffId" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "full_name": "John D. Doe",6  "avatar_url": "https://example.com/new-avatar.jpg",7  "password": "654321"8}'
Request body
json
1{2  "full_name": "John D. Doe",3  "avatar_url": "https://example.com/new-avatar.jpg",4  "password": "654321"5}

Path parameters

staffIdRequired
path string

Request body fields

full_nameExample
string

Example field from the request body.

avatar_urlExample
string

Example field from the request body.

passwordExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

List Staff (by Location)

Restaurant Menu / Staff
GET/restaurant/locations/:locationId/staff?search={{search}}&sort=created_at&order=desc&page=1&limit=10

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

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/locations/:locationId/staff?search={{search}}&sort=created_at&order=desc&page=1&limit=10" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

locationIdRequired
path string

Query parameters

searchOptional
query string

{{search}}

Filter by user first_name/last_name/email

sortOptional
query string

created_at

Sort field: created_at|updated_at

orderOptional
query string

desc

asc|desc

pageOptional
query string

1

limitOptional
query string

10

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.

Get Staff (by ID)

Restaurant Menu / Staff
GET/restaurant/staff/:staffId

Fetches a single staff member (tenant-scoped).

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/restaurant/staff/:staffId" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

staffIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

No response example is available for this endpoint yet.