Empowering Restaurants through Integration

Follow

Merchant Schedules

The merchant schedules component allows you to manage a restaurant's hours of operation. This includes the day-to-day pickup and delivery hours, as well as schedule overrides. Schedule overrides are used to manage holiday hours and intra-day hours changes (e.g., to create a Start/Stop taking orders feature).

Paths

Get Schedule Overrides

GET /pos/v1/merchant/{merchant_id}/schedules/overrides
Description

Retrieve all schedule overrides for a merchant.

Path Parameters
merchant_id
labelRequired
string
The short Grubhub ID for the merchant. Corresponds to a single location.
Responses
200
Successfully retrieved schedule overrides.

Add Schedule Override

POST /pos/v1/merchant/{merchant_id}/schedules/overrides
Description

Add a schedule override for a merchant.

Path Parameters
merchant_id
labelRequired
string
The short Grubhub ID for the merchant. Corresponds to a single location.
Body
body
labelRequired
The schedule override to add.
Responses
200
Successfully added the schedule override
409
UNKNOWN
Conflict, Schedule Override overlaps existing override or there are impacted orders, schedule update was skipped. Impacted orders ids are returned.

Delete Schedule Override

DELETE /pos/v1/merchant/{merchant_id}/schedules/overrides
Description

Cancels and existing schedule override. Has the effect of updating the end time of the override.

Path Parameters
merchant_id
labelRequired
string
The short Grubhub ID of the merchant. Corresponds to a single location.
Body
body
labelRequired
Reference to the override to be deleted.
Responses
204
Void
Override successfully deleted.
409
UNKNOWN
Conflict, Schedule Override overlaps existing override or there are impacted orders, schedule update was skipped. Impacted orders ids are returned.

Create/Update merchant schedule

PUT /pos/v1/merchant/{merchant_id}/schedules/repeating
Description

Creates a merchant schedule if one doesn't exist when updating delivery and pickup schedules.

Path Parameters
merchant_id
labelRequired
String
The short Grubhub ID for the merchant. Corresponds to a single location.
Body
request
labelRequired
The hours per day of the week that this restaurant can accept delivery or pickup orders.
Responses
200
Successfully updated merchant schedule
Example
// example of a 200 UPDATE response

{
  "merchant_id": "fb00c570-2600-11ec-804a-73ca63d7e65e",
  "schedule_id": "3plQwGA7Ee2QwUdkYwyxCg",
  "name": "PICKUP",
  "version_id": "3plQwGA7Ee2QwUdkYwyxCg",
  "repeating_schedule_content": {
      "type": "WEEKLY",
      "rules": [
          {
              "days_of_week": [
                  "MONDAY"
              ],
              "start_time": "07:00:00.000",
              "end_time": "01:30:00.000"
          },
          {
              "days_of_week": [
                  "TUESDAY"
              ],
              "start_time": "07:00:00.000",
              "end_time": "01:30:00.000"
          },
          {
              "days_of_week": [
                  "WEDNESDAY"
              ],
              "start_time": "07:00:00.000",
              "end_time": "01:30:00.000"
          },
          {
              "days_of_week": [
                  "THURSDAY"
              ],
              "start_time": "07:00:00.000",
              "end_time": "01:30:00.000"
          },
          {
              "days_of_week": [
                  "FRIDAY"
              ],
              "start_time": "07:00:00.000",
              "end_time": "01:30:00.000"
          },
          {
              "days_of_week": [
                  "SATURDAY"
              ],
              "start_time": "08:00:00.000",
              "end_time": "01:30:00.000"
          },
          {
              "days_of_week": [
                  "SUNDAY"
              ],
              "start_time": "07:00:00.000",
              "end_time": "01:30:00.000"
          }
      ]
  },
  "metadata": {
      "updated_by": "Brendan Moy (bmoy@grubhub.com)",
      "update_date": "2023-01-30T15:16:08.097Z"
  }
}        

Get the delivery schedule

GET /pos/v1/merchant/{merchant_id}/schedules/delivery
Description

Returns the full weekly delivery hours for the specified restaurant.

Path Parameters
merchant_id
labelRequired
string
The short Grubhub ID for the merchant. Corresponds to a single location.
Responses
200
Successfully retrieved repeating schedule.

Get the pickup schedule

GET /pos/v1/merchant/{merchant_id}/schedules/pickup
Description

Returns the full weekly pickup hours for the specified restaurant.

Path Parameters
merchant_id
labelRequired
string
The short Grubhub ID for the merchant. Corresponds to a single location.
Responses
200
Successfully retrieved repeating schedule.

Update a delivery schedule

PUT /pos/v1/merchant/{merchant_id}/schedules/delivery/{schedule_version}
Description

Replaces the weekly schedule of when a merchant is available to accept delivery orders.

Path Parameters
merchant_id
labelRequired
String
The short Grubhub ID for the merchant. Corresponds to a single location.
schedule_version
labelRequired
String
The ID of the schedule version that you want to update.
Body
request
labelRequired
The hours per day of the week that this restaurant can accept delivery orders.
Responses
200
Successfully updated delivery schedule
409
List<UUID>
Conflict, Schedule Override overlaps existing override or there are impacted orders, schedule update was skipped. Impacted orders ids are returned.
Example
{
	"intervals": [{
			"repeating_schedule_rule": "SUNDAY",
			"start": "00:45:00.000",
			"end": "20:45:00.000"
		},
		{
			"repeating_schedule_rule": "MONDAY",
			"start": "00:45:00.000",
			"end": "20:45:00.000"
		},
		{
			"repeating_schedule_rule": "TUESDAY",
			"start": "00:45:00.000",
			"end": "20:45:00.000"
		},
		{
			"repeating_schedule_rule": "WEDNESDAY",
			"start": "00:45:00.000",
			"end": "20:45:00.000"
		},
		{
			"repeating_schedule_rule": "THURSDAY",
			"start": "00:45:00.000",
			"end": "20:45:00.000"
		},
		{
			"repeating_schedule_rule": "FRIDAY",
			"start": "00:45:00.000",
			"end": "20:45:00.000"
		}
	]
}

Update a pickup schedule

PUT /pos/v1/merchant/{merchant_id}/schedules/pickup/{schedule_version}
Description

Replaces the weekly schedule of when a merchant is available to accept delivery orders.

Path Parameters
merchant_id
labelRequired
String
The short Grubhub ID for the merchant. Corresponds to a single location.
schedule_version
labelRequired
String
The ID of the schedule version that you want to update.
Body
request
labelRequired
The hours per day of the week that this restaurant can accept pickup orders.
Responses
200
Successfully updated pickup schedule
409
List<UUID>
Conflict, Schedule Override overlaps existing override or there are impacted orders, schedule update was skipped. Impacted orders ids are returned.

Stop online orders

POST /pos/v1/merchant/{merchant_id}/schedules/closenow
Description

Immediately stops taking Grubhub orders. The restaurant will remain listed on the site, but will be shown as closed/not taking orders, overriding any regular or custom schedules, including schedule overrides. This will only affect the status of the restaurant on Grubhub; the POS will still be able to process in-store orders.

Path Parameters
merchant_id
labelRequired
string
The short Grubhub ID of the merchant. Corresponds to a single location.
Responses
404
UNKNOWN
Merchant or repeating schedule was not found
503
UNKNOWN
Service requires reconciliation to be enabled

Start receiving online orders

POST /pos/v1/merchant/{merchant_id}/schedules/opennow
Description

Immediately makes the restaurant available for Grubhub orders. If the restaurant was closed, whether during a regular or custom schedule, from a previous closeNow call, or because of a schedule override, the restaurant will become immediately available on Grubhub. This will only affect the status of the restaurant on Grubhub; in-store orders will be unaffected.

Path Parameters
merchant_id
labelRequired
string
The short Grubhub ID of the merchant. Corresponds to a single location.
Responses
404
UNKNOWN
Merchant or repeating schedule was not found
503
UNKNOWN
Service requires reconciliation to be enabled

Models

Day of Week

Day of week schedule applies to type: string enum:

  • MONDAY
  • TUESDAY
  • WEDNESDAY
  • THURSDAY
  • FRIDAY
  • SATURDAY
  • SUNDAY

Delete Schedule Override Request

Request body for deleting a schedule override.

Properties
current_end_time
label_outlineOptional
LocalDateTime
Current end time of the override to be deleted. Used as reference for the override.
type
label_outlineOptional
Whether the override to be deleted is a AVAILABLE or UNAVAILABLE.

FullSchedule

Complete schedule information about the restaurant, including the status of any alternate schedules or overrides.

Properties
statuses
label_outlineOptional
A map of all schedule types (`DELIVERY`, `PICKUP`, etc.) and their current open/close status.
today_schedule
label_outlineOptional
The schedule currently in effect if open or today's schedule if closed.
overrides_in_effect
label_outlineOptional
The schedules overrides that currently apply to the various schedule types in effect for this restaurant.
mass_overrides_in_effect
label_outlineOptional
The schedule overrides that apply to this and several other merchants, usually of the same restaurant group.
repeating_schedules_in_effect
label_outlineOptional
Any repeating weekly schedules in effect for this merchant.
custom_schedules_in_effect
label_outlineOptional
Any custom, temporary schedules currently in place. These will take precedence over a repeating schedule of the same type.
all_schedule_overrides
label_outlineOptional
All previous, current, and future schedule overrides associated with this merchant.
all_mass_overrides
label_outlineOptional
All mass schedule overrides that have or could affect this restaurant's schedule.
all_repeating_schedules
label_outlineOptional
All weekly repeating schedules associated with this restaurant. These are used as the default schedule when no custom schedules, or unavailable/available overrides are in effect.
all_custom_schedules
label_outlineOptional
All custom schedules associated with this restaurant. These are temporary schedules that change the working hours for the restaurant for things like holiday or summer hours.
managed_delivery_schedule
label_outlineOptional
The managed delivery schedules for the region that includes this restaurant's address.

MassScheduleOverride

Information about a blackout that applies to multiple merchants; used for groups of restaurants to halt online orders or pause ordering during a disaster (Grubhub administrative use only).

Properties
id
label_outlineOptional
UUID
The identifier of the mass override itself.
merchant_ids
label_outlineOptional
Set
The IDs of the restaurants affected by this mass blackout.
metadata
label_outlineOptional
String
Additional text associated with the mass override.
start_time_utc
label_outlineOptional
DateTime
The date and time when this mass override begins in the UTC (Coordinated Universal Time) time zone.
end_time_utc
label_outlineOptional
DateTime
The date and time when this mass override ends in the UTC (Coordinated Universal Time) time zone.
start_time_local
label_outlineOptional
DateTime
The date and time when this mass override begins in the restaurant's local time zone.
end_time_local
label_outlineOptional
DateTime
The date and time when this mass override ends in the restaurant's local time zone.

Merchant Repeating Schedule

The repeating weekly schedule of a merchant.

Properties
merchant_id
labelRequired
string
The short Grubhub ID for the merchant.
schedule_id
labelRequired
UUID
The ID of this schedule
name
labelRequired
The type of this repeating schedule
version_id
label_outlineOptional
UUID
The ID of the version of this schedule which changes upon updates to the schedule
metadata
label_outlineOptional
The metadata associated to the repeating schedule
repeating_schedule_content
labelRequired
The repeating schedule for the merchant

PosMerchantRepeatingIntervalRequest

The schedule of a single day of the week within a schedule update request.

Properties
repeating_schedule_rule
label_outlineOptional
List<DayOfWeek>
The day of the week that this interval request applies to.
start
label_outlineOptional
The time in the restaurant's timezone when the schedule starts.
end
label_outlineOptional
The time in the restaurant's timezone when the schedule ends.

PosUpdateRepeatingScheduleRequest

A schedule update request payload intended to modify a restaurant's available delivery or pickup hours.

Properties
source
label_outlineOptional
String
The source of the creation or update of the repeating schedule.
intervals
label_outlineOptional
The schedule of a single day of the week within a schedule update request.

PosUpsertRepeatingScheduleRequest

A schedule update request payload intended to update a restaurant's available delivery or pickup hours.

Properties
source
label_outlineOptional
String
The source of the creation or update of the repeating schedule.
intervals
labelRequired
The schedule of a single day of the week within a schedule update request.
schedule_type
labelRequired
The repeating schedule type

Repeating Schedule

Repeating weekly schedule of a merchant

Properties
name
label_outlineOptional
string
Name used for internal identification
type
labelRequired
Weekly is currently the only option
rules
labelRequired
A set of non-overlapping time periods

Repeating Schedule Metadata

The metadata associated to a specific repeating schedule

Properties
source
labelRequired
string
The source of the creation or update of the repeating schedule
created_by
label_outlineOptional
string
The creator of the schedule
updated_by
label_outlineOptional
string
The last credential to update the schedule
create_date
label_outlineOptional
DateTime
The creation date of the schedule in UTC
update_date
label_outlineOptional
DateTime
The last update date of the schedule in UTC
description
label_outlineOptional
string
The description for the schedule

Repeating Schedule Rule

Rule that describes time period of the schedule

Properties
days_of_week
labelRequired
List<DayOfWeek>
Day of week schedule applies to
start_time
labelRequired
LocalDateTime
The time in the restaurant's timezone when the schedule starts.
end_time
labelRequired
LocalDateTime
The time in the restaurant's timezone when the schedule ends.

Repeating Schedule Rule Interval

Interval defining start and end time of the schedule

Properties
start_time
labelRequired
LocalDateTime
The time in the restaurant's timezone when the schedule starts.
end_time
labelRequired
LocalDateTime
The time in the restaurant's timezone when the schedule ends.

Repeating Schedule Type

Type of upsert repeating schedule type i.e. DELIVERY and PICKUP

Type

string

Possible Values
  • DELIVERY
  • PICKUP

Schedule Name

A type of merchant schedule for accepting different types of orders on Grubhub. At present, GROUP and CATERING are not in use.

Type

string

Possible Values
  • DELIVERY
  • PICKUP
  • GROUP
  • CATERING

Schedule Override

Schedule Override for a merchant. Schedule overrides are ad hoc modifications to a restaurant's normal hours of operation on Grubhub.

Properties
schedule_id
label_outlineOptional
UUID
The ID of this schedule
merchant_id
labelRequired
string
The short Grubhub ID for the merchant.
name
labelRequired
The type of merchant schedule to modify. At present, the default ScheduleName of ScheduleOverride is DELIVERY, but PICKUP is also allowed.
type
labelRequired
The type of override.
metadata
label_outlineOptional
Metadata about the override.
local_start_time
labelRequired
LocalDateTime
The time in the restaurant's timezone when the override duration starts.
local_end_time
labelRequired
LocalDateTime
The time in the restaurant's timezone when the override duration ends.
start_time_utc
labelRequired
DateTime
The UTC time when the override duration starts.
end_time_utc
labelRequired
DateTime
The UTC time when the override duration ends.

Schedule Override Metadata

Metadata about a schedule override.

Properties
created_by
label_outlineOptional
string
The creator the schedule override.
updated_by
label_outlineOptional
string
The Grubhub system that updated the schedule override.
create_date
label_outlineOptional
DateTime
When the schedule override was created.
update_date
label_outlineOptional
DateTime
When the schedule override was last updated.
legacy_id
label_outlineOptional
string
The ID of the schedule override in Grubhub legacy systems.
description
label_outlineOptional
string
A description for the schedule override.
source
labelRequired
string
The Grubhub system that was the source of creating the schedule override.

Schedule Override Request

Request body for creating a new schedule override. You must specify both a start or end, or neither. You must include the field schedule_name or by default it will be set to DELIVERY.

Properties
start
label_outlineOptional
LocalDateTime
Start time of the override duration in the restaurant's local time. If you do not specify a start and end, then the override will take effect immediately.
end
label_outlineOptional
LocalDateTime
End time of the override duration in the restaurant's local time. If you do not specify a start and end, then the override will take effect immediately.
type
labelRequired
Whether the override is to be a AVAILABLE or UNAVAILABLE.
schedule_name
label_outlineOptional
Type of Schedule.
Example
{ 
  "start":"2022-09-15T12:00:00.000", 
  "end":"2022-09-15T15:00:00.000", 
  "type":"UNAVAILABLE", 
  "schedule_name":"PICKUP" 
}

Schedule Override Type

Type of schedule override. "UNAVAILABLE" is a duration when the restaurant should be closed, when normally they would be open. "AVAILABLE" is a duration when the restaurant should be open, when normally they would be closed.

Type

string

Possible Values
  • BLACKOUT (Deprecated) - Use UNAVAILABLE instead
  • WHITEIN (Deprecated) - Use AVAILABLE instead
  • UNAVAILABLE
  • AVAILABLE

Schedule Type

Type of repeating schedule, Weekly is currently the only option

Type

string

Possible Values
  • WEEKLY

ScheduleStatus

An enumeration of the statuses that describe the current availability of a restaurant on Grubhub. The statuses OPEN and TEMPORARY_AVAILABLE indicate that a restaurant can accept orders; all other indicate that it cannot.

Type

string

Possible Values
  • PAUSED
  • OPEN
  • CLOSED
  • TEMPORARY_AVAILABLE
  • TEMPORARY_UNAVAILABLE
  • WHITED_IN (Deprecated) - Use TEMPORARY_AVAILABLE instead
  • BLACKED_OUT (Deprecated) - Use TEMPORARY_UNAVAILABLE instead
  • GHD_BLACKED_OUT (Deprecated)
  • MASS_BLACKED_OUT (Deprecated)

TypeSchedule

A collection of the types of schedules for a restaurant, the date on which they begin, and the number of days in each schedule's period. Together, this collection defines the outlines of a restaurant's pickup and delivery schedules.

Note that the first field, name, is used as the index of the collection.

Properties
name
label_outlineOptional
The schedule type for which the first date and days in period apply. Used as the index value for this collection.
first_date
label_outlineOptional
LocalDate
The date on which this schedule begins.
number_of_days_in_period
label_outlineOptional
Integer
The number of days before this schedule repeats or expires.