Food Ordering API
A complete API for building food ordering applications on the ONDC (Open Network for Digital Commerce) network. Covers restaurant discovery, menu browsing, cart management, order placement, tracking, and post-order operations.
Base URL
All endpoint paths in this documentation are relative to the base URL below. The /client prefix is part of the base URL — do not include it in individual paths.
Example: /ret11/auth/token → https://ondc.preprod.highwaydelite.com/client/ret11/auth/token
Most endpoints require a Bearer JWT token in the Authorization header. Obtain a token via POST /ret11/auth/token. Endpoints that do not require auth are noted individually.
Order Flow
The complete order lifecycle follows this sequence:
API Groups
| Group | Endpoints | Description |
|---|---|---|
| Authentication | 1 | Obtain JWT access tokens |
| Search & Discovery | 5 | Categories, nearby restaurants, menus, offers |
| ONDC Transaction | 10 | Full order lifecycle: select → init → order → track → cancel |
| User Addresses | 4 | CRUD operations for saved delivery addresses |
| Cart | 5 | Cart management including customization items |
| Orders | 3 | Order history, details, and ratings |
| IGM Grievances | 5 | Issue & Grievance Management per ONDC spec |
Common Headers
| Header | Value | Notes |
|---|---|---|
| Authorization | Bearer <token> | Required for most endpoints |
| Content-Type | application/json | Required for POST/PATCH/PUT requests |
Key Identifiers
Several IDs flow through the API. Understanding where each comes from prevents confusion:
| ID | Source | Used In |
|---|---|---|
| providerId | nearby-restaurants response | restaurant-details, menu, select, init, cart |
| sellerId | nearby-restaurants response | restaurant-details, menu, select, init, cart |
| itemId | menu response | cart, select, init |
| transactionId | Client-generated UUID | select → init → create-order (same value all three) |
| fulfillmentId | select response | init (per item and in fulfillment object) |
| orderId | create-order response | order-status, status, track, cancel, update, rate, IGM |
Environment Setup
Set your base URL as an environment variable in your API client:
BASE_URL=https://ondc.preprod.highwaydelite.com/client
JWT=your-bearer-token
All example requests in this documentation use {{BASE_URL}} and {{jwt}} placeholders.