Locations
8 API calls in this section.
Create Location
/restaurant/locationsCreates a restaurant location under the tenant in draft status. Address (latitude, longitude, full_address) is required. Optional: is_manual_mode, manual_is_open.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
name | object | — |
name.en | string | — |
slug | string | — |
languages | array<string> | — |
time_zone | string | — |
branding_settings | object | — |
branding_settings.logo | string | — |
branding_settings.cover_image | string | — |
branding_settings.banners | array<string> | — |
address | object | — |
address.latitude | number | — |
address.longitude | number | — |
Show 5 more body fields
Additional body parameters
| Parameter | Type | Description |
|---|---|---|
address.full_address | string | — |
address.city | string | — |
address.country | string | — |
is_manual_mode | boolean | — |
manual_is_open | boolean | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "name": {6 "en": "Downtown Diner"7 },8 "slug": "downtown-diner",9 "languages": [10 "en"11 ],12 "time_zone": "UTC",13 "branding_settings": {14 "logo": "https://example.com/logo.png",15 "cover_image": "https://example.com/cover.png",16 "banners": [17 "https://example.com/banner1.png"18 ]19 },20 "address": {21 "latitude": 12.9716,22 "longitude": 77.5946,23 "full_address": "MG Road, Bengaluru, IN",24 "city": "Bengaluru",25 "country": "IN"26 },27 "is_manual_mode": false,28 "manual_is_open": true29}'Response examples
1{2 "success": true,3 "data": {4 "id": "{{locationId}}",5 "tenant_id": "{{tenantId}}",6 "name": {7 "en": "Downtown Diner"8 },9 "slug": "downtown-diner",10 "active": true,11 "admin_status": "draft",12 "languages": [13 "en"14 ],15 "time_zone": "UTC",16 "branding_settings": {17 "logo": "https://example.com/logo.png",18 "cover_image": "https://example.com/cover.png",19 "banners": [20 "https://example.com/banner1.png"21 ]22 },23 "address": {24 "latitude": 12.9716,25 "longitude": 77.5946,26 "full_address": "MG Road, Bengaluru, IN"27 },28 "is_manual_mode": false,29 "manual_is_open": true,30 "availability_version": 1,31 "created_at": "2025-11-10T10:00:00Z"32 }33}List Locations
/restaurant/locationsLists locations for the tenant with pagination. Includes is_open computed field.
Query parameters
| Parameter | Type | Description |
|---|---|---|
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?page=1&limit=10" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "data": [4 {5 "id": "{{locationId}}",6 "name": {7 "en": "Downtown Diner"8 },9 "slug": "downtown-diner",10 "active": true,11 "admin_status": "draft",12 "languages": [13 "en"14 ],15 "time_zone": "UTC",16 "is_open": true,17 "availability_version": 118 }19 ],20 "page": 1,21 "limit": 10,22 "total": 123}Get Location
/restaurant/locations/:idFetch a single location by id. Includes is_open computed field.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | 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/locations/${ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "data": {4 "id": "{{locationId}}",5 "tenant_id": "{{tenantId}}",6 "name": {7 "en": "Downtown Diner"8 },9 "slug": "downtown-diner",10 "active": true,11 "admin_status": "draft",12 "languages": [13 "en"14 ],15 "time_zone": "UTC",16 "address": {17 "latitude": 12.9716,18 "longitude": 77.5946,19 "full_address": "MG Road, Bengaluru, IN"20 },21 "is_manual_mode": false,22 "manual_is_open": true,23 "is_open": true,24 "availability_version": 125 }26}Update Location
/restaurant/locations/:idUpdates a location. Returns updated location object including availability_version.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
name | object | — |
name.en | string | — |
slug | string | — |
languages | array<string> | — |
time_zone | string | — |
branding_settings | object | — |
branding_settings.logo | string | — |
branding_settings.cover_image | string | — |
branding_settings.banners | array<string> | — |
active | boolean | — |
address | object | — |
address.latitude | number | — |
Show 6 more body fields
Additional body parameters
| Parameter | Type | Description |
|---|---|---|
address.longitude | number | — |
address.full_address | string | — |
address.city | string | — |
address.country | string | — |
is_manual_mode | boolean | — |
manual_is_open | boolean | — |
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/restaurant/locations/${ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "name": {6 "en": "Downtown Diner"7 },8 "slug": "downtown-diner",9 "languages": [10 "en"11 ],12 "time_zone": "UTC",13 "branding_settings": {14 "logo": "https://example.com/logo_updated.png",15 "cover_image": "https://example.com/cover_updated.png",16 "banners": [17 "https://example.com/banner_updated.png"18 ]19 },20 "active": true,21 "address": {22 "latitude": 12.9716,23 "longitude": 77.5946,24 "full_address": "MG Road, Bengaluru, IN",25 "city": "Bengaluru",26 "country": "IN"27 },28 "is_manual_mode": false,29 "manual_is_open": true30}'Response examples
1{2 "success": true,3 "data": {4 "id": "{{locationId}}",5 "name": {6 "en": "Downtown Diner"7 },8 "slug": "downtown-diner",9 "active": true,10 "admin_status": "draft",11 "languages": [12 "en"13 ],14 "time_zone": "UTC",15 "is_manual_mode": false,16 "manual_is_open": true,17 "is_open": true,18 "availability_version": 219 }20}Submit Location For Approval
/restaurant/locations/:locationId/submit-for-approvalSubmits a draft restaurant location to system admin review. Changes admin_status from draft to pending_approval.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/submit-for-approval" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "data": {4 "id": "{{locationId}}",5 "tenant_id": "{{tenantId}}",6 "slug": "downtown-diner",7 "admin_status": "pending_approval"8 },9 "message": "Restaurant location submitted for approval"10}Pause Location
/restaurant/locations/:locationId/pauseTemporarily pause the location (deactivate current time window). Requires automatic schedule mode.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/pause" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "message": "Location paused successfully"4}Resume Location
/restaurant/locations/:locationId/resumeResume the location (reactivate current time window) if manually paused.
Path parameters
| Parameter | Type | Description |
|---|---|---|
locationIdRequired | string | Dynamic path value from the request URL. |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/resume" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "message": "Location resumed successfully"4}Set Location State (manual)
/restaurant/locations/:locationId/stateOperational toggle for the location; bumps availability_version for instant cache invalidation.
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 |
|---|---|---|
is_manual_mode | boolean | — |
manual_is_open | boolean | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/state" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "is_manual_mode": true,6 "manual_is_open": false7}'Response examples
1{2 "success": true,3 "data": {4 "id": "{{locationId}}",5 "is_manual_mode": true,6 "manual_is_open": false,7 "availability_version": 438 }9}