Skip to main content

Restaurant Administration

3 API calls in this section.

List Restaurant Locations

System Configuration / Restaurant Administration
GET/system/restaurant/locations?page=1&limit=10&search=&tenant_id=&city=&area=&active_status=&operational_status=&admin_status=&include_empty_tenants=false

Retrieves restaurant locations across tenants for the Ondi admin portal Restaurants page. Results are grouped by tenant and paginated by tenant group. Requires manage:system permission.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/system/restaurant/locations?page=1&limit=10&search=&tenant_id=&city=&area=&active_status=&operational_status=&admin_status=&include_empty_tenants=false" \2  --header "Authorization: Bearer {{access_token}}"

Query parameters

pageOptional
query string

1

Tenant-group page number (default: 1)

limitOptional
query string

10

Tenant groups per page (default: 10, max: 50)

searchOptional
query string

Search by tenant name, tenant slug, location name, location slug, or location code

tenant_idOptional
query string

Filter by exact tenant id

cityOptional
query string

Filter locations by city

areaOptional
query string

Filter locations by area

active_statusOptional
query string

Filter by location active state: active | inactive

operational_statusOptional
query string

Filter by runtime state: open | closed

admin_statusOptional
query string

Filter by governance state: draft | pending_approval | approved | rejected | suspended

include_empty_tenantsOptional
query string

false

When true, returns matching tenants even if they currently have no matching locations

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

Success Response200
Response body
json
1{2  "success": true,3  "message": "Restaurants retrieved successfully",4  "data": {5    "groups": [6      {7        "tenant": {8          "id": "tenant-uuid",9          "name": {10            "en": "Tenant One"11          },12          "slug": "tenant-one",13          "status": "active"14        },15        "summary": {16          "total_locations": 2,17          "active_locations": 2,18          "inactive_locations": 0,19          "open_locations": 1,20          "closed_locations": 121        },22        "locations": [23          {24            "id": "location-uuid",25            "code": 1001,26            "name": {27              "en": "Downtown Branch"28            },29            "slug": "downtown-branch",30            "admin_status": "approved",31            "active": true,32            "is_open": true,33            "city": "Erbil",34            "area": "Ankawa",35            "full_address": "Street 60, Ankawa, Erbil",36            "latitude": 36.23,37            "longitude": 43.98,38            "accept_dining": true,39            "accept_delivery": true,40            "accept_takeout": true,41            "created_at": "2026-03-20T12:00:00Z"42          }43        ]44      }45    ],46    "pagination": {47      "page": 1,48      "limit": 10,49      "total_groups": 25,50      "total_locations": 11851    },52    "filters": {53      "search": "",54      "tenant_id": null,55      "city": null,56      "area": null,57      "active_status": null,58      "operational_status": null,59      "admin_status": null,60      "include_empty_tenants": false61    }62  }63}
Success Response - Empty Result200
Response body
json
1{2  "success": true,3  "message": "Restaurants retrieved successfully",4  "data": {5    "groups": [],6    "pagination": {7      "page": 1,8      "limit": 10,9      "total_groups": 0,10      "total_locations": 011    },12    "filters": {13      "search": "missing-search",14      "tenant_id": null,15      "city": null,16      "area": null,17      "active_status": null,18      "operational_status": null,19      "admin_status": null,20      "include_empty_tenants": false21    }22  }23}
Error - Invalid Parameters400
Response body
json
1{2  "success": false,3  "message": "Must be one of: active, inactive"4}
Error - Insufficient Permissions403
Response body
json
1{2  "success": false,3  "message": "Insufficient Permissions",4  "data": null5}

Get Restaurant Location Detail

System Configuration / Restaurant Administration
GET/system/restaurant/locations/:locationId

Retrieves one restaurant location for the Ondi admin portal detail page. Requires manage:system permission.

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

Path parameters

locationIdRequired
path string

{{location_id}}

Restaurant location id

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

Success Response200
Response body
json
1{2  "success": true,3  "message": "Restaurant location retrieved successfully",4  "data": {5    "id": "location-uuid",6    "tenant_id": "tenant-uuid",7    "name": {8      "en": "Downtown Branch"9    },10    "slug": "downtown-branch",11    "active": true,12    "admin_status": "approved",13    "approved_by": "admin-user-uuid",14    "approved_at": "2026-03-20T12:05:00Z",15    "admin_notes": "Approved for public access",16    "is_open": true,17    "languages": [18      "en",19      "ar"20    ],21    "time_zone": "Asia/Baghdad",22    "created_at": "2026-03-20T12:00:00Z",23    "updated_at": "2026-03-20T12:10:00Z",24    "code": 1001,25    "latitude": 36.23,26    "longitude": 43.98,27    "address": {28      "city": "Erbil",29      "area": "Ankawa",30      "full_address": "Street 60, Ankawa, Erbil",31      "latitude": 36.23,32      "longitude": 43.9833    },34    "branding_settings": {35      "logo": "https://cdn.example.com/logo.png",36      "cover_image": "https://cdn.example.com/cover.png",37      "banners": []38    },39    "is_manual_mode": false,40    "manual_is_open": true,41    "availability_version": 12,42    "accept_dining": true,43    "accept_delivery": true,44    "accept_takeout": true,45    "tenant": {46      "id": "tenant-uuid",47      "name": {48        "en": "Tenant One"49      },50      "slug": "tenant-one",51      "status": "active"52    }53  }54}
Error - Location Not Found404
Response body
json
1{2  "success": false,3  "message": "Location Not Found",4  "data": null5}
Error - Invalid Location Id400
Response body
json
1{2  "success": false,3  "message": "Invalid UUID"4}
Error - Insufficient Permissions403
Response body
json
1{2  "success": false,3  "message": "Insufficient Permissions",4  "data": null5}

Update Restaurant Location Status

System Configuration / Restaurant Administration
PUT/system/restaurant/locations/:locationId/status

Updates a restaurant location governance status. Allowed transitions: pending_approval → approved, pending_approval → rejected, approved → suspended, suspended → approved. Requires manage:system permission.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/system/restaurant/locations/:locationId/status" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --header "Content-Type: application/json" \5  --data '{6  "status": "approved",7  "notes": "Ready for public launch"8}'
Request body
json
1{2  "status": "approved",3  "notes": "Ready for public launch"4}

Path parameters

locationIdRequired
path string

{{location_id}}

Restaurant location id

Request body fields

statusExample
string

Example field from the request body.

notesExample
string

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response - Approved200
Response body
json
1{2  "success": true,3  "message": "Restaurant location approved successfully",4  "data": {5    "id": "location-uuid",6    "tenant_id": "tenant-uuid",7    "slug": "downtown-branch",8    "admin_status": "approved",9    "approved_by": "admin-user-uuid",10    "approved_at": "2026-03-20T12:05:00Z",11    "admin_notes": "Ready for public launch"12  }13}
Success Response - Suspended200
Response body
json
1{2  "success": true,3  "message": "Restaurant location suspended successfully",4  "data": {5    "id": "location-uuid",6    "tenant_id": "tenant-uuid",7    "slug": "downtown-branch",8    "admin_status": "suspended",9    "approved_by": "admin-user-uuid",10    "approved_at": "2026-03-20T12:05:00Z",11    "admin_notes": "Compliance issue"12  }13}
Success Response - Rejected200
Response body
json
1{2  "success": true,3  "message": "Restaurant location rejected successfully",4  "data": {5    "id": "location-uuid",6    "tenant_id": "tenant-uuid",7    "slug": "downtown-branch",8    "admin_status": "rejected",9    "approved_by": null,10    "approved_at": null,11    "admin_notes": "Does not meet quality standards"12  }13}
Error - Invalid Transition400
Response body
json
1{2  "success": false,3  "message": "Restaurant location status transition is not allowed",4  "data": null5}
Error - Location Not Found404
Response body
json
1{2  "success": false,3  "message": "Location Not Found",4  "data": null5}