canonical: https://jentic.com/apis/grubhub.com/grubhub

# Grubhub API

The Grubhub API lets restaurant partners and integrators manage their presence on the Grubhub food ordering and delivery marketplace from outside the merchant portal. The 21 endpoints cover restaurant configuration, availability windows, menus and menu items, item-level availability, order intake (confirm, reject, cancel, prep time), delivery tracking, and order plus financial reports. Authentication is bearer-token based, and all calls run under https://api-gtm.grubhub.com/v1. The API is the integration surface used by point-of-sale vendors, virtual brand operators, and ghost-kitchen platforms to keep menus, hours, and order workflows in lockstep with Grubhub.

## For AI agents

Manage Grubhub restaurants, menus, availability, orders, and deliveries from a POS, OMS, or ghost-kitchen platform.

## Scope

Does not handle consumer-side ordering, payment processing, or driver dispatch outside Grubhub's network - use for restaurant partner menu, order, delivery, and report operations only.

## Capabilities

- Update restaurant availability and trading hours so Grubhub stops sending orders when a kitchen is closed
- Push menu and item changes from a master menu source so prices and modifiers stay in sync
- Toggle item-level availability when a 86'd item runs out mid-service
- Confirm, reject, or cancel incoming orders and update prep time so the customer ETA is accurate
- Read delivery status for a specific order or delivery to drive tracking screens in the merchant app
- Generate order and financial reports for reconciliation against the POS settlement
- List orders for a restaurant on a date window for back-office workflows

## Use cases

### POS-to-Grubhub order intake

Bring Grubhub orders into a restaurant POS in real time so the kitchen sees them on the same ticket printer as dine-in and other delivery channels. The integration accepts incoming orders, calls POST `/orders/{orderId}/confirm` to acknowledge, and falls back to POST `/orders/{orderId}/reject` when the kitchen cannot fulfil. PUT `/orders/{orderId}/prep-time` keeps the customer ETA accurate when the kitchen is slammed. Bearer-token auth keeps each restaurant scoped to its own location.

Example prompt: When a new order arrives, call POST `/orders/{orderId}/confirm` with the accepted prep time and write the order to the POS ticket queue.

### Centralised menu management

Push a master menu (items, prices, modifiers, hours) from a multi-location menu management system into Grubhub for every restaurant the brand operates. PUT `/restaurants/{restaurantId}/menus` updates the menu document, PUT `/restaurants/{restaurantId}/menus/{menuId}/items/{itemId}` updates a single item, and PUT `/restaurants/{restaurantId}/menus/{menuId}/items/{itemId}/availability` handles 86's during service without a full menu push. This is the standard pattern for chains with 100+ locations.

Example prompt: On menu update, call PUT `/restaurants/{restaurantId}/menus` for each affected location and confirm the menu is live.

### Reconciliation and payouts

Pull order and financial reports from Grubhub on a daily cadence and reconcile them against the POS settlement and the merchant bank deposit. GET `/restaurants/{restaurantId}/reports/orders` surfaces order-level totals while GET `/restaurants/{restaurantId}/reports/financials` returns the financial summary, and GET `/restaurants/{restaurantId}/orders` backstops disputes by listing the underlying orders. The output flows into the accounting system for monthly close.

Example prompt: Pull GET `/restaurants/{restaurantId}/reports/financials` for yesterday and write the totals into the accounting daybook.

### AI agent integration through Jentic

Expose Grubhub operations to a restaurant ops agent through Jentic so managers can ask things like 'mark item Spicy Tuna as out of stock at the downtown location' or 'reject any pending order from store 42'. The agent searches Jentic for the right intent, loads the operation schema, and executes it. Jentic stores the Grubhub bearer token in its vault so the agent only ever sees a scoped Jentic agent key.

Example prompt: Through Jentic, search 'confirm a Grubhub order', load the operation, and execute it for the order id arriving in the queue.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/restaurants/{restaurantId}` | Get restaurant configuration |
| PUT | `/restaurants/{restaurantId}/menus` | Update menus for a restaurant |
| PUT | `/restaurants/{restaurantId}/menus/{menuId}/items/{itemId}/availability` | Toggle item-level availability |
| POST | `/orders/{orderId}/confirm` | Confirm an inbound order |
| POST | `/orders/{orderId}/reject` | Reject an order |
| PUT | `/orders/{orderId}/prep-time` | Update the prep time on an order |
| GET | `/restaurants/{restaurantId}/reports/financials` | Pull financial reports for reconciliation |

## Key resources

- **restaurants** — Restaurant configuration and availability windows
- **menus and items** — Menu documents, individual items, and item-level availability
- **orders** — Inbound orders with confirm, reject, cancel, and prep-time controls
- **deliveries** — Delivery status reads and updates for tracking displays
- **reports** — Order and financial reports for reconciliation

## Why Jentic

- **Setup:** Wiring the Grubhub API by hand means handling its bearer auth against the api-gtm.grubhub.com host and managing menu, order, and report pagination and retries across many restaurants yourself. Through Jentic you install once, import Grubhub from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Grubhub puts the restaurant id and order id in the URL path (`/restaurants/{restaurantId}/...`, `/orders/{orderId}/...`), so a rule can pin your agent to one restaurant or one order: it can update that restaurant's menu and item availability and nothing else. You choose the operations it may call, so rejecting an order is not included unless you add it.
- **Credential handling:** Your Grubhub bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context, which matters for multi-location and multi-brand operators.
- **Discovery method:** Agents search Jentic by intent such as 'confirm a Grubhub order' or 'update item availability', and Jentic returns the matching operation with its input schema, including the required restaurantId, orderId, and itemId, so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Postmates API** — On-demand delivery API for restaurants and stores
- **Shopify API** — E-commerce platform for online stores
- **Square API** — Restaurant point-of-sale and payments platform

## FAQ

### What authentication does the Grubhub API use?

Grubhub uses bearer-token authentication. Partner integrations exchange OAuth-style credentials for a bearer token and send it as Authorization: Bearer <token> on every request. Through Jentic the bearer token lives in the vault and the agent calls Jentic with a scoped agent key (ak_*) rather than the raw Grubhub token.

### Can I confirm and reject orders programmatically?

Yes. POST `/orders/{orderId}/confirm` acknowledges an order, POST `/orders/{orderId}/reject` sends a rejection, and POST `/orders/{orderId}/cancel` handles cancellations. PUT `/orders/{orderId}/prep-time` updates the customer ETA when the kitchen revises the time required.

### What are the rate limits for the Grubhub API?

Grubhub does not encode hard limits in the public spec. Their gateway throttles at the partner level; back off on HTTP 429 responses and stagger menu pushes across locations rather than firing them simultaneously.

### How do I update item availability quickly through Jentic?

Install Jentic with pip install jentic, search for 'update Grubhub item availability', load the matching operation, and execute it with the restaurant id, menu id, item id, and availability flag. Jentic resolves the call to PUT `/restaurants/{restaurantId}/menus/{menuId}/items/{itemId}/availability.`

### Can I pull financial reports for accounting reconciliation?

Yes. GET `/restaurants/{restaurantId}/reports/financials` returns the financial summary for a restaurant over a date window, and GET `/restaurants/{restaurantId}/reports/orders` returns the underlying order-level data. Together they support a daily reconciliation against bank deposits.

### How do I track a delivery for an order in flight?

Call GET `/orders/{orderId}/delivery-status` for the order or GET `/deliveries/{deliveryId}` when you have the delivery id. POST `/deliveries/{deliveryId}/update` lets a partner driver app push status updates back into Grubhub.

### Can I limit what my agent is allowed to do with the Grubhub API?

Yes. Because you run Jentic One yourself, your own rules decide which Grubhub operations and credentials the agent may use. Grubhub carries the restaurant id and order id in the URL path (`/restaurants/{restaurantId}/...`, `/orders/{orderId}/...`), so you can pin the agent to a single restaurant or order and allow only the calls you intend, such as updating a menu and toggling item availability with PUT `/restaurants/{restaurantId}/menus/{menuId}/items/{itemId}/availability.` Operations you do not grant, like POST `/orders/{orderId}/reject`, stay off limits unless you add them.
