Skip to main content

Locations

8 API calls in this section.

Create Location

Restaurant Menu / Locations
POST/restaurant/locations

Creates a restaurant location under the tenant in draft status. Address (latitude, longitude, full_address) is required. Optional: is_manual_mode, manual_is_open.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request POST "$ONDI_BASE_URL/restaurant/locations" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{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}'
Request body
json
1{2  "name": {3    "en": "Downtown Diner"4  },5  "slug": "downtown-diner",6  "languages": [7    "en"8  ],9  "time_zone": "UTC",10  "branding_settings": {11    "logo": "https://example.com/logo.png",12    "cover_image": "https://example.com/cover.png",13    "banners": [14      "https://example.com/banner1.png"15    ]16  },17  "address": {18    "latitude": 12.9716,19    "longitude": 77.5946,20    "full_address": "MG Road, Bengaluru, IN",21    "city": "Bengaluru",22    "country": "IN"23  },24  "is_manual_mode": false,25  "manual_is_open": true26}

Request body fields

nameExample
object

Example field from the request body.

name.enExample
string

Example field from the request body.

slugExample
string

Example field from the request body.

languagesExample
array<string>

Example field from the request body.

time_zoneExample
string

Example field from the request body.

branding_settingsExample
object

Example field from the request body.

branding_settings.logoExample
string

Example field from the request body.

branding_settings.cover_imageExample
string

Example field from the request body.

branding_settings.bannersExample
array<string>

Example field from the request body.

addressExample
object

Example field from the request body.

address.latitudeExample
number

Example field from the request body.

address.longitudeExample
number

Example field from the request body.

address.full_addressExample
string

Example field from the request body.

address.cityExample
string

Example field from the request body.

address.countryExample
string

Example field from the request body.

is_manual_modeExample
boolean

Example field from the request body.

manual_is_openExample
boolean

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

201 Created201Created
Response body
json
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 Menu / Locations
GET/restaurant/locations?page=1&limit=10

Lists locations for the tenant with pagination. Includes is_open computed field.

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

Query parameters

pageOptional
query string

1

limitOptional
query string

10

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
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 Menu / Locations
GET/restaurant/locations/:id

Fetch a single location by id. Includes is_open computed field.

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

Path parameters

idRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
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 Menu / Locations
PUT/restaurant/locations/:id

Updates a location. Returns updated location object including availability_version.

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PUT "$ONDI_BASE_URL/restaurant/locations/:id" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{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}'
Request body
json
1{2  "name": {3    "en": "Downtown Diner"4  },5  "slug": "downtown-diner",6  "languages": [7    "en"8  ],9  "time_zone": "UTC",10  "branding_settings": {11    "logo": "https://example.com/logo_updated.png",12    "cover_image": "https://example.com/cover_updated.png",13    "banners": [14      "https://example.com/banner_updated.png"15    ]16  },17  "active": true,18  "address": {19    "latitude": 12.9716,20    "longitude": 77.5946,21    "full_address": "MG Road, Bengaluru, IN",22    "city": "Bengaluru",23    "country": "IN"24  },25  "is_manual_mode": false,26  "manual_is_open": true27}

Path parameters

idRequired
path string

Request body fields

nameExample
object

Example field from the request body.

name.enExample
string

Example field from the request body.

slugExample
string

Example field from the request body.

languagesExample
array<string>

Example field from the request body.

time_zoneExample
string

Example field from the request body.

branding_settingsExample
object

Example field from the request body.

branding_settings.logoExample
string

Example field from the request body.

branding_settings.cover_imageExample
string

Example field from the request body.

branding_settings.bannersExample
array<string>

Example field from the request body.

activeExample
boolean

Example field from the request body.

addressExample
object

Example field from the request body.

address.latitudeExample
number

Example field from the request body.

address.longitudeExample
number

Example field from the request body.

address.full_addressExample
string

Example field from the request body.

address.cityExample
string

Example field from the request body.

address.countryExample
string

Example field from the request body.

is_manual_modeExample
boolean

Example field from the request body.

manual_is_openExample
boolean

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
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 Menu / Locations
POST/restaurant/locations/:locationId/submit-for-approval

Submits a draft restaurant location to system admin review. Changes admin_status from draft to pending_approval.

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/submit-for-approval" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

locationIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
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}
400 Bad Request400Bad Request
Response body
json
1{2  "success": false,3  "message": "Restaurant location cannot be submitted"4}

Pause Location

Restaurant Menu / Locations
POST/restaurant/locations/:locationId/pause

Temporarily pause the location (deactivate current time window). Requires automatic schedule mode.

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/pause" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

locationIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "message": "Location paused successfully"4}

Resume Location

Restaurant Menu / Locations
POST/restaurant/locations/:locationId/resume

Resume the location (reactivate current time window) if manually paused.

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/resume" \2  --header "Authorization: Bearer {{access_token}}"

Path parameters

locationIdRequired
path string

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "message": "Location resumed successfully"4}

Set Location State (manual)

Restaurant Menu / Locations
POST/restaurant/locations/:locationId/state

Operational toggle for the location; bumps availability_version for instant cache invalidation.

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/state" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json" \4  --data '{5  "is_manual_mode": true,6  "manual_is_open": false7}'
Request body
json
1{2  "is_manual_mode": true,3  "manual_is_open": false4}

Path parameters

locationIdRequired
path string

Request body fields

is_manual_modeExample
boolean

Example field from the request body.

manual_is_openExample
boolean

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Responses

200 OK200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{locationId}}",5    "is_manual_mode": true,6    "manual_is_open": false,7    "availability_version": 438  }9}