A menu schedule is an array of shifts, as described in the merchant schedule, a shift object is as follows:

{
    "day"	: 1,
    "startTime"	: "08:30",
    "endTime"	: "21:00",
}
Property Name Value Description
id integer The id of the shift
day integer Required if weekly shift – The day of the week as such: Sunday = 0, Monday = 1, …, Saturday = 6
date string Required if holiday shift – The date of the year in YYYY-mm-dd format
startTime string Required – The time the shift begins in HH:mm format
endTime string Required – The time the shift ends in HH:mm format. The endTime must come after startTime. In the case of a shift going past midnight, set the end time to 24:00, then create a new shift for the second day starting at 00:00.

A schedule object is as follows:

{
	"id"	: 1,
	"name"	: "Lunch Specials",
	"hours"	: [
		{
			"day"	: 1,
			"startTime"	: "11:30",
			"endTime"	: "14:30"
		},
		{
			"day"	: 2,
			"startTime"	: "11:30",
			"endTime"	: "14:30"
		},
		{
			"day"	: 3,
			"startTime"	: "11:30",
			"endTime"	: "14:30"
		},
		{
			"day"	: 4,
			"startTime"	: "11:30",
			"endTime"	: "14:30"
		},
		{
			"day"	: 5,
			"startTime"	: "11:30",
			"endTime"	: "14:30"
		}
	]
}
Property Name Value Description
id integer The id of the schedule
name string The name of the schedule
hours Shift[] Required – An array of shift objects

You can get the menu schedules available either by retrieving the entire menu, which includes schedules, or making a get request specifically for menu schedules:

GET /merchant/admin/menu/schedule?merchantId=1234

The menu schedule endpoint only accepts one schedule per api call. When updating a schedule, individual shifts can not be updated, thus you must re-submit all hours for that schedule. To get existing schedules, you must make a GET call on the menu endpoint, see the menu documentation.

POST /merchant/admin/menu/schedule

{
	"merchantId"  : "1234",
	"schedule"	: {
	"name"	: "Lunch Specials",
	"hours"	: [
		{
			"day"	: 1,
			"startTime"	: "11:30",
			"endTime"	: "14:30"
		},
		{
			"day"	: 2,
			"startTime"	: "11:30",
			"endTime"	: "14:30"
		},
		{
			"day"	: 3,
			"startTime"	: "11:30",
			"endTime"	: "14:30"
		},
		{
			"day"	: 4,
			"startTime"	: "11:30",
			"endTime"	: "14:30"
		},
		{
			"day"	: 5,
			"startTime"	: "11:30",
			"endTime"	: "14:30"
		}
	]
        }
}

Updates can be used to update either the hours or the name of the schedule.

PUT /merchant/admin/menu/schedule

{
	"merchantId"  : "1234",
	"schedule"	: {
	    "id"        : 1,
	    "name"	: "Daily Lunch Specials"
        }
}

Deletion should rarely be necessary, as any changes to menu schedules should be handled via updates. If you require a menu schedule to be deleted, please contact your account manager to discuss the issue.