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.
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}'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
locationIdRequiredRequest body fields
emailExampleExample field from the request body.
passwordExampleExample field from the request body.
full_nameExampleExample field from the request body.
staff_roleExampleExample field from the request body.
avatar_urlExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.
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.
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}'1{2 "full_name": "John D. Doe",3 "avatar_url": "https://example.com/new-avatar.jpg",4 "password": "654321"5}Path parameters
staffIdRequiredRequest body fields
full_nameExampleExample field from the request body.
avatar_urlExampleExample field from the request body.
passwordExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.
List Staff (by Location)
/restaurant/locations/:locationId/staff?search={{search}}&sort=created_at&order=desc&page=1&limit=10Lists staff with pagination and search. Response includes page, limit, total.
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
locationIdRequiredQuery parameters
searchOptional{{search}}
Filter by user first_name/last_name/email
sortOptionalcreated_at
Sort field: created_at|updated_at
orderOptionaldesc
asc|desc
pageOptional1
limitOptional10
Headers
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.
Get Staff (by ID)
/restaurant/staff/:staffIdFetches a single staff member (tenant-scoped).
1curl --request GET "$ONDI_BASE_URL/restaurant/staff/:staffId" \2 --header "Authorization: Bearer {{access_token}}"Path parameters
staffIdRequiredHeaders
AuthorizationOptionalBearer {{access_token}}
Responses
No response example is available for this endpoint yet.