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.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
nameobject—
name.enstring—
slugstring—
languagesarray<string>—
time_zonestring—
branding_settingsobject—
branding_settings.logostring—
branding_settings.cover_imagestring—
branding_settings.bannersarray<string>—
addressobject—
address.latitudenumber—
address.longitudenumber—
Show 5 more body fields

Additional body parameters

ParameterTypeDescription
address.full_addressstring—
address.citystring—
address.countrystring—
is_manual_modeboolean—
manual_is_openboolean—
Staging
Request
curl
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

201Created
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

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

Query parameters

ParameterTypeDescription
pagestring

Example: 1

limitstring

Example: 10

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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

200OK
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.

Path parameters

ParameterTypeDescription
idRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/restaurant/locations/${ID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
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.

Path parameters

ParameterTypeDescription
idRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
nameobject—
name.enstring—
slugstring—
languagesarray<string>—
time_zonestring—
branding_settingsobject—
branding_settings.logostring—
branding_settings.cover_imagestring—
branding_settings.bannersarray<string>—
activeboolean—
addressobject—
address.latitudenumber—
Show 6 more body fields

Additional body parameters

ParameterTypeDescription
address.longitudenumber—
address.full_addressstring—
address.citystring—
address.countrystring—
is_manual_modeboolean—
manual_is_openboolean—
Staging
Request
curl
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

200OK
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.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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

200OK
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}

Pause Location​

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

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

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/pause" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
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.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/resume" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
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.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
is_manual_modeboolean—
manual_is_openboolean—
Staging
Request
curl
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

200OK
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}