Restaurant Ordering Starter Kit
Restaurant Ordering Mock API for Frontend Development
The Restaurant Ordering Starter Kit is a ready-made mock REST API for food delivery and takeaway interfaces. It returns realistic JSON for restaurants, a menu with categories and extras, a basket, orders, a delivery estimate and a customer login, so you can build menu, basket and order screens before an ordering backend exists. It requires the Starter plan or higher, and you can edit every response after launching.
What you can build
Build the menu, basket and order screens
These screens follow a customer from browsing a menu to tracking an order, using the kit's real endpoints.
Restaurant and menu browsing
GET /restaurants returns restaurants with cuisine, rating and delivery time, GET /menu/categories returns the menu sections, and GET /menu returns items with price, availability and a vegetarian flag.
- GET
/restaurants - GET
/menu/categories - GET
/menu
- GET
Menu item with extras
GET /menu/items/item_001 returns one item with its optional extras and their prices, for an item modal. Only item_001 has a detail endpoint.
- GET
/menu/items/item_001
- GET
Basket
GET /cart returns basket items with quantity and line total plus subtotal, delivery fee and total, and POST /cart/items returns 201 with the updated item count for the add-to-basket button.
- GET
/cart - POST
/cart/items
- GET
Placing and tracking an order
POST /orders returns 201 with an order reference and an estimated delivery time, and GET /orders/order_001 returns an order with its status and delivery progress for a tracking screen.
- POST
/orders - GET
/orders/order_001
- POST
Delivery estimate and sign-in
GET /delivery/estimate returns availability, minutes, fee and minimum order for a checkout summary, and POST /auth/login returns a customer and a token.
- GET
/delivery/estimate - POST
/auth/login
- GET
Endpoint reference
All 10 Restaurant Ordering endpoints
This list is generated from the kit itself. Paths match exactly, so only these paths exist after you launch it.
| Method | Path | Status | What it returns |
|---|---|---|---|
| GET | /restaurants | 200 | List restaurants. Returns restaurants available for ordering. |
| GET | /menu | 200 | Restaurant menu. Returns available menu items. |
| GET | /menu/categories | 200 | Menu categories. Returns grouped food categories. |
| GET | /menu/items/item_001 | 200 | Menu item detail. Returns one menu item with optional extras. |
| GET | /cart | 200 | Shopping basket. Returns the current restaurant basket. |
| POST | /cart/items | 201 | Add basket item. Simulates adding a food item to the basket. |
| POST | /orders | 201 | Place order. Simulates placing a restaurant order. |
| GET | /orders/order_001 | 200 | Order detail. Returns a restaurant order and delivery status. |
| POST | /auth/login | 200 | Customer login. Simulates successful customer authentication. |
| GET | /delivery/estimate | 200 | Delivery estimate. Returns an estimated delivery time and fee. |
Example responses
What the endpoints return
These are real responses from the kit. They are abbreviated: lists show their first item with the number of omitted items, and long text is shortened. The launched endpoint returns the full response.
Restaurant menu
{
"data": [
{
"id": "item_001",
"name": "Classic Cheeseburger",
"description": "Beef burger, cheddar, lettuce, tomato and house sauce.",
"category_id": "category_burgers",
"price": 11.95,
"currency": "GBP",
"available": true,
"vegetarian": false,
"image_url": "https://images.example.com/menu/cheeseburger.jpg"
}
// ... 2 more items in the full response
]
}Shopping basket
{
"data": {
"items": [
{
"id": "item_001",
"name": "Classic Cheeseburger",
"description": "Beef burger, cheddar, lettuce, tomato and house sauce.",
"category_id": "category_burgers",
"price": 11.95,
"currency": "GBP",
"available": true,
"vegetarian": false,
"image_url": "https://images.example.com/menu/cheeseburger.jpg",
"quantity": 2,
"line_total": 23.9
}
],
"subtotal": 23.9,
"delivery_fee": 1.99,
"total": 25.89,
"currency": "GBP"
}
}Place order
{
"success": true,
"data": {
"id": "order_001",
"reference": "FG-58342",
"status": "confirmed",
"total": 25.89,
"currency": "GBP",
"estimated_delivery_at": "2026-08-09T15:45:00Z"
}
}Call the endpoints
curl and fetch examples
These URLs only work after you launch the kit, because the kit then exists in your own project. Replace YOUR_PROJECT_KEY with the project key shown in your dashboard.
curl -i \
https://apis.getforgeapi.com/YOUR_PROJECT_KEY/menucurl -i \
-X POST \
-H "Content-Type: application/json" \
-d '{"item_id":"item_002","quantity":1}' \
https://apis.getforgeapi.com/YOUR_PROJECT_KEY/cart/itemsconst API_BASE_URL = "https://apis.getforgeapi.com/YOUR_PROJECT_KEY";
const response = await fetch(API_BASE_URL + "/menu");
if (!response.ok) {
throw new Error("Request failed with status " + response.status);
}
const json = await response.json();
// json.data is the array of menu items.More request examples are in Calling endpoints.
Frontend example
A React menu with a basket total
This component lists menu items, adds one to the basket, and shows the basket total. The basket response is fixed, so the total does not change when you add an item. Use it to build the interface states, and let your real backend supply the changing values later.
import { useEffect, useState } from "react";
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL;
async function apiGet<T>(path: string): Promise<T> {
const response = await fetch(API_BASE_URL + path);
if (!response.ok) {
throw new Error("GET " + path + " failed with status " + response.status);
}
return response.json() as Promise<T>;
}
async function apiPost<T>(path: string, body: unknown): Promise<T> {
const response = await fetch(API_BASE_URL + path, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body),
});
if (!response.ok) {
throw new Error("POST " + path + " failed with status " + response.status);
}
return response.json() as Promise<T>;
}
type MenuItem = {
id: string;
name: string;
price: number;
currency: string;
available: boolean;
};
type Basket = { subtotal: number; delivery_fee: number; total: number };
export function Menu() {
const [items, setItems] = useState<MenuItem[]>([]);
const [basket, setBasket] = useState<Basket | null>(null);
const [error, setError] = useState("");
useEffect(() => {
apiGet<{ data: MenuItem[] }>("/menu")
.then((json) => setItems(json.data))
.catch(() => setError("Could not load the menu."));
apiGet<{ data: Basket }>("/cart")
.then((json) => setBasket(json.data))
.catch(() => setError("Could not load the basket."));
}, []);
async function addToBasket(item: MenuItem) {
try {
await apiPost("/cart/items", { item_id: item.id, quantity: 1 });
} catch {
setError("Could not add that item.");
}
}
if (error) return <p>{error}</p>;
return (
<div>
<ul>
{items.map((item) => (
<li key={item.id}>
{item.name} - {item.currency} {item.price}
<button disabled={!item.available} onClick={() => addToBasket(item)}>
Add
</button>
</li>
))}
</ul>
{basket ? <p>Basket total: {basket.total}</p> : null}
</div>
);
}Keep the base URL in an environment variable such as VITE_API_BASE_URL or NEXT_PUBLIC_API_BASE_URL. When your real backend is ready, change that value; if it keeps the same paths and response shapes, your components do not need to change. The Create a REST API Online tutorial walks through that handover.
Accurate expectations
What this mock does and does not do
Every Starter Kit
- Responses are static. Each endpoint returns the JSON configured for it, so the same request always gets the same response.
- Paths match exactly. Only the paths listed in the endpoint reference exist, and there are no automatic dynamic route parameters.
- There is no automatic filtering, sorting or pagination. Query strings are not used to choose a response, so adding ?page=2 returns the same response.
- Nothing is saved. POST, PUT, PATCH and DELETE endpoints return the response configured for them, and request bodies are not stored.
- Response delays and required request headers are available on paid plans. You can edit an endpoint's JSON and status code after launching the kit.
The Restaurant Ordering kit
- GET /delivery/estimate returns one fixed postcode and result. It does not calculate anything from the address you send.
- Detail endpoints exist for one menu item (item_001) and one order (order_001). Other ids are not recognised.
- POST /cart/items and POST /orders return their configured 201 responses but change nothing, so GET /cart and the order detail stay the same.
Project and endpoint limits depend on your plan. See API limits for the current allowances.
Related Starter Kits and guides
Looking for a different kit? Browse all ready-made mock APIs.
Frequently asked questions
Restaurant Ordering Starter Kit questions
Which plan do I need for the Restaurant Ordering kit?
The Restaurant Ordering kit requires the Starter plan or higher. You can start with a free account and upgrade later. See the pricing page for the current plans.
Is there a free kit with a basket and orders?
The E-Commerce Starter Kit demo includes a cart and an order list and can be launched without an account. It is a shop rather than a restaurant, but the screens work in a similar way.
Does POST /orders place a real order?
No. It returns the confirmed order configured for it with a 201 status. Nothing is stored or sent to a restaurant.
Does the delivery estimate use my postcode?
No. GET /delivery/estimate returns one fixed result. Edit the JSON of the endpoint in your project to show a different postcode, time or fee.
Build against Restaurant Ordering today
Requires the Starter plan or higher. Launch the kit, call its hosted URLs and edit the responses to match your frontend.