{"openapi":"3.0.1","info":{"title":"Busy Intervals"},"servers":[{"url":"https://api-third-party-gtm-pp.grubhub.com","description":"preprod"},{"url":"https://api-third-party-gtm.grubhub.com","description":"prod"}],"tags":[{"name":"Models","description":"# PosBusyModeRequest \n <SchemaDefinition schemaRef=\"#/components/schemas/PosBusyModeRequest\"/>\n\n# PosBusyModeResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/PosBusyModeResponse\"/>\n\n# PosBusyInterval \n <SchemaDefinition schemaRef=\"#/components/schemas/PosBusyInterval\"/>\n\n# PosGetBusyModeResponse \n <SchemaDefinition schemaRef=\"#/components/schemas/PosGetBusyModeResponse\"/>\n\n"}],"paths":{"/pos/v1/merchant/{merchant_id}/busy/{busy_interval_id}":{"put":{"tags":["Endpoints"],"summary":"Update an active busy interval","description":"Updates the ETA increase or end time on an existing busy interval for the restaurant.","operationId":"updateBusyMode","parameters":[{"name":"merchant_id","in":"path","description":"The short Grubhub ID for the merchant. Corresponds to a single location.","required":true,"explode":false,"schema":{"type":"string"}},{"name":"busy_interval_id","in":"path","description":"The unique identifier of the busy interval to update.","required":true,"explode":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Updated busy interval parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosBusyModeRequest"},"example":{"eta_increase_seconds":600,"start_time":"2026-05-25T18:00:00Z","end_time":"2026-05-25T19:00:00Z"}}},"required":true},"responses":{"422":{"description":"The request body is missing required fields or is otherwise invalid."},"200":{"description":"Busy interval successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosBusyModeResponse"},"example":{"restaurant_id":"store182","busy_interval_id":"b4a16ee1-0a4f-4f3b-8b86-9f7c9b9a2d6a","eta_increase_seconds":600,"start_time":"2026-05-25T18:00:00Z","end_time":"2026-05-25T19:00:00Z"}}}}}}},"/pos/v1/merchant/{merchant_id}/busy":{"get":{"tags":["Endpoints"],"summary":"Get the current busy interval","description":"Returns whether the restaurant is currently busy and details about the active busy interval.","operationId":"getBusyMode","parameters":[{"name":"merchant_id","in":"path","description":"The short Grubhub ID for the merchant. Corresponds to a single location.","required":true,"explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Current busy interval, if any.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosGetBusyModeResponse"},"example":{"busy":true,"busy_interval":{"busy_interval_id":"b4a16ee1-0a4f-4f3b-8b86-9f7c9b9a2d6a","start_time":"2026-05-25T18:00:00Z","end_time":"2026-05-25T19:00:00Z","eta_increase_seconds":600,"remaining_seconds":1200}}}}}}},"post":{"tags":["Endpoints"],"summary":"Mark restaurant as busy","description":"Marks the restaurant as busy for the time window specified in the request, increasing the displayed ETA for diners.","operationId":"setBusyMode","parameters":[{"name":"merchant_id","in":"path","description":"The short Grubhub ID for the merchant. Corresponds to a single location.","required":true,"explode":false,"schema":{"type":"string"}}],"requestBody":{"description":"Busy interval parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosBusyModeRequest"},"example":{"eta_increase_seconds":600,"start_time":"2026-05-25T18:00:00Z","end_time":"2026-05-25T19:00:00Z"}}},"required":true},"responses":{"422":{"description":"The request body is missing required fields or is otherwise invalid."},"200":{"description":"Busy interval successfully set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosBusyModeResponse"},"example":{"restaurant_id":"store182","busy_interval_id":"b4a16ee1-0a4f-4f3b-8b86-9f7c9b9a2d6a","eta_increase_seconds":600,"start_time":"2026-05-25T18:00:00Z","end_time":"2026-05-25T19:00:00Z"}}}}}},"delete":{"tags":["Endpoints"],"summary":"Clear the active busy interval","description":"Ends the currently active busy interval for the restaurant, if any.","operationId":"deleteActiveBusyMode","parameters":[{"name":"merchant_id","in":"path","description":"The short Grubhub ID for the merchant. Corresponds to a single location.","required":true,"explode":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"Busy interval cleared, or there was no active interval to clear."}}}}},"components":{"schemas":{"PosBusyModeRequest":{"type":"object","properties":{"eta_increase_seconds":{"type":"integer","description":"Additional time, in seconds, to add to the displayed delivery ETA while the restaurant is busy. Must be non-negative; defaults to 0 if omitted.","format":"int64"},"start_time":{"type":"string","description":"When the busy interval begins, as an RFC-3339 / ISO-8601 UTC timestamp.","format":"date-time"},"end_time":{"type":"string","description":"When the busy interval ends, as an RFC-3339 / ISO-8601 UTC timestamp. Must be after start_time.","format":"date-time"}}},"PosBusyModeResponse":{"type":"object","properties":{"restaurant_id":{"type":"string","description":"The short Grubhub ID for the merchant the busy interval applies to."},"busy_interval_id":{"type":"string","description":"Unique identifier of the created busy interval.","format":"uuid"},"eta_increase_seconds":{"type":"integer","description":"Additional time, in seconds, added to the displayed delivery ETA while the restaurant is busy.","format":"int64"},"start_time":{"type":"string","description":"When the busy interval begins, as an RFC-3339 / ISO-8601 UTC timestamp.","format":"date-time"},"end_time":{"type":"string","description":"When the busy interval ends, as an RFC-3339 / ISO-8601 UTC timestamp.","format":"date-time"}}},"PosBusyInterval":{"type":"object","properties":{"busy_interval_id":{"type":"string","description":"Unique identifier of the busy interval.","format":"uuid"},"start_time":{"type":"string","description":"When the busy interval begins, as an RFC-3339 / ISO-8601 UTC timestamp.","format":"date-time"},"end_time":{"type":"string","description":"When the busy interval ends, as an RFC-3339 / ISO-8601 UTC timestamp.","format":"date-time"},"eta_increase_seconds":{"type":"integer","description":"Additional time, in seconds, added to the displayed delivery ETA while the restaurant is busy.","format":"int64"},"remaining_seconds":{"type":"integer","description":"Seconds remaining until the busy interval ends (end_time).","format":"int64"}},"description":"Details of the active busy interval, or null when the restaurant is not busy."},"PosGetBusyModeResponse":{"type":"object","properties":{"busy":{"type":"boolean","description":"Whether the restaurant currently has an active busy interval."},"busy_interval":{"$ref":"#/components/schemas/PosBusyInterval"}}}}}}