Skip to main content

Schedules

10 API calls in this section.

List Location Schedules​

Restaurant Menu / Schedules
GET/restaurant/locations/:locationId/schedules

Returns all schedule windows for a location (weekly recurring windows with optional date ranges).

Path parameters

ParameterTypeDescription
locationIdRequiredstring

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/${LOCATIONID}/schedules" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "id": "{{scheduleId}}",6      "location_id": "{{locationId}}",7      "day_of_week": 1,8      "open_time": "08:00:00",9      "close_time": "12:00:00",10      "start_date": null,11      "end_date": null,12      "active": true13    }14  ]15}

List Location Schedule Exceptions​

Restaurant Menu / Schedules
GET/restaurant/locations/:locationId/schedule-exceptions

Returns all schedule exceptions for a location.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

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/${LOCATIONID}/schedule-exceptions" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "id": "{{exceptionId}}",6      "schedule_id": "{{scheduleId}}",7      "date": "2025-12-25",8      "closed": true,9      "reason": "Holiday",10      "schedule": {11        "location_id": "{{locationId}}",12        "day_of_week": 1,13        "open_time": "08:00:00",14        "close_time": "12:00:00"15      }16    }17  ]18}

Set Location Schedules (replace)​

Restaurant Menu / Schedules
POST/restaurant/locations/:locationId/schedules

Replaces all existing schedules for the location with the provided set. Triggers bump availability_version.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
schedulesarray<object>—
schedules.day_of_weeknumber—
schedules.start_timestring—
schedules.end_timestring—
schedules.start_datenull—
schedules.end_datenull—
schedules.activeboolean—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/schedules" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "schedules": [6    {7      "day_of_week": 1,8      "start_time": "08:00:00",9      "end_time": "12:00:00",10      "start_date": null,11      "end_date": null,12      "active": true13    },14    {15      "day_of_week": 1,16      "start_time": "18:00:00",17      "end_time": "22:00:00",18      "active": true19    },20    {21      "day_of_week": 2,22      "start_time": "08:00:00",23      "end_time": "12:00:00"24    }25  ]26}'

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "id": "{{scheduleId}}",6      "day_of_week": 1,7      "open_time": "08:00:00",8      "close_time": "12:00:00"9    }10  ]11}

Add Location Schedule Exception​

Restaurant Menu / Schedules
POST/restaurant/locations/:locationId/schedule-exceptions

Adds an exception for a specific schedule window on a given date. Either provide schedule_id or the (day_of_week,start_time,end_time) signature.

Path parameters

ParameterTypeDescription
locationIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
datestring—
closedboolean—
reasonstring—
day_of_weeknumber—
start_timestring—
end_timestring—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/locations/${LOCATIONID}/schedule-exceptions" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "date": "2025-12-25",6  "closed": true,7  "reason": "Christmas Day",8  "day_of_week": 1,9  "start_time": "08:00:00",10  "end_time": "12:00:00"11}'

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{exceptionId}}",5    "schedule_id": "{{scheduleId}}",6    "date": "2025-12-25",7    "closed": true,8    "reason": "Christmas Day"9  }10}

Delete Location Schedule Exception​

Restaurant Menu / Schedules
DELETE/restaurant/schedule-exceptions/:exceptionId

Deletes a location schedule exception by id.

Path parameters

ParameterTypeDescription
exceptionIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

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

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{exceptionId}}"5  }6}

List Menu Schedules​

Restaurant Menu / Schedules
GET/restaurant/menus/:menuId/schedules

Returns menu schedule windows (weekly recurring, optional date range).

Path parameters

ParameterTypeDescription
menuIdRequiredstring

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/menus/${MENUID}/schedules" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "id": "{{menuScheduleId}}",6      "menu_id": "{{menuId}}",7      "day_of_week": 1,8      "start_time": "12:00:00",9      "end_time": "16:00:00",10      "active": true11    }12  ]13}

List Menu Schedule Exceptions​

Restaurant Menu / Schedules
GET/restaurant/menus/:menuId/schedule-exceptions

Returns all schedule exceptions for a menu.

Path parameters

ParameterTypeDescription
menuIdRequiredstring

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/menus/${MENUID}/schedule-exceptions" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "id": "{{exceptionId}}",6      "menu_schedule_id": "{{menuScheduleId}}",7      "date": "2025-12-25",8      "closed": true,9      "reason": "Holiday",10      "schedule": {11        "menu_id": "{{menuId}}",12        "day_of_week": 1,13        "start_time": "12:00:00",14        "end_time": "16:00:00"15      }16    }17  ]18}

Set Menu Schedules (replace)​

Restaurant Menu / Schedules
POST/restaurant/menus/:menuId/schedules

Replaces all existing schedules for the menu with the provided set. Triggers bump availability_version via menu-based trigger.

Path parameters

ParameterTypeDescription
menuIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
schedulesarray<object>—
schedules.day_of_weeknumber—
schedules.start_timestring—
schedules.end_timestring—
schedules.activeboolean—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/menus/${MENUID}/schedules" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "schedules": [6    {7      "day_of_week": 1,8      "start_time": "12:00:00",9      "end_time": "16:00:00",10      "active": true11    },12    {13      "day_of_week": 1,14      "start_time": "18:00:00",15      "end_time": "22:00:00",16      "active": true17    }18  ]19}'

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": [4    {5      "id": "{{menuScheduleId}}",6      "day_of_week": 1,7      "start_time": "12:00:00",8      "end_time": "16:00:00"9    }10  ]11}

Add Menu Schedule Exception​

Restaurant Menu / Schedules
POST/restaurant/menus/:menuId/schedule-exceptions

Adds an exception for a specific menu schedule window on a given date. Either provide menu_schedule_id or the (day_of_week,start_time,end_time) signature.

Path parameters

ParameterTypeDescription
menuIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Body parameters

ParameterTypeDescription
datestring—
closedboolean—
reasonstring—
day_of_weeknumber—
start_timestring—
end_timestring—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/restaurant/menus/${MENUID}/schedule-exceptions" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "date": "2025-12-25",6  "closed": true,7  "reason": "Christmas Lunch",8  "day_of_week": 1,9  "start_time": "12:00:00",10  "end_time": "16:00:00"11}'

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{menuExceptionId}}",5    "menu_schedule_id": "{{menuScheduleId}}",6    "date": "2025-12-25",7    "closed": true,8    "reason": "Christmas Lunch"9  }10}

Delete Menu Schedule Exception​

Restaurant Menu / Schedules
DELETE/restaurant/menu-schedule-exceptions/:exceptionId

Deletes a menu schedule exception by id.

Path parameters

ParameterTypeDescription
exceptionIdRequiredstring

Dynamic path value from the request URL.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request DELETE "https://staging-api.ondi.io/functions/v1/restaurant/menu-schedule-exceptions/${EXCEPTIONID}" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "data": {4    "id": "{{menuExceptionId}}"5  }6}