A food-delivery order lifecycle for testing state machines: restaurants and menus, orders with server-computed totals and Idempotency-Key, status from placed to delivered, cancellation windows, courier tracking and webhook-style events with duplicates.
Base URL: https://funapi.dev/api/delivery/v1 · 8 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
restaurants and menus
GET /delivery/v1/restaurants — Restaurants, filterable by cuisine and open status · Responds with 200 400 Link to this endpointorder lifecycle
POST /delivery/v1/orders — Place an order — totals, tax and fee computed server-side; supports Idempotency-Key · Responds with 201 409 422 Link to this endpointGET /delivery/v1/orders/{id} — Order status — ETag changes on every transition; poll with If-None-Match · Responds with 200 304 404 Link to this endpointPOST /delivery/v1/orders/{id}/advance — Move an order to its next status (admin) — simulates the kitchen and courier (requires Bearer auth) · Responds with 200 403 404 409 Link to this endpointPOST /delivery/v1/orders/{id}/cancel — Cancel — allowed until the courier picks the order up · Responds with 200 404 409 Link to this endpointGET /delivery/v1/orders/{id}/tracking — Courier location and ETA once picked up · Responds with 200 404 Link to this endpointwebhook-style events
GET /delivery/v1/events — Webhook-style event envelopes; duplicate=true repeats one, order=reverse shuffles · Responds with 200 Link to this endpointThe Food Delivery API is a small order-lifecycle service of the kind every delivery, ride-hailing or logistics app is built around: restaurants with menus, orders whose totals, tax and fees are computed by the server, a status that moves from placed to delivered, a cancellation window that closes when the courier picks the food up, live courier tracking and webhook-style events that arrive duplicated and out of order.
GET https://funapi.dev/api/delivery/v1/restaurants — Restaurants, filterable by cuisine and open status. No token, no signup:
curl -i https://funapi.dev/api/delivery/v1/restaurants
Response: 200 OK
{
"data": [
{
"id": 1,
"name": "Golden Wok",
"cuisine": "chinese",
"rating": 4,
"deliveryFee": 2.99,
"open": true,
"menuItems": 3
},
{
"id": 2,
"name": "Pizzeria Uno Due",
"cuisine": "italian",
"rating": 4.2,
"deliveryFee": 3.99,
"open": true,
"menuItems": 3
},
{
"id": 3,
"name": "Taco Norte",
"cuisine": "mexican",
"rating": 4.4,
"deliveryFee": 4.99,
"open": true,
"menuItems": 3
},
{
"id": 4,
"name": "Bento Lab",
"cuisine": "japanese",
"rating": 4.6,
"deliveryFee": 5.99,
"open": true,
"menuItems": 3
},
{
"id": 5,
"name": "Green Bowl",
"cuisine": "salads",
"rating": 4,
"deliveryFee": 6.99,
"open": false,
"menuItems": 3
}
]
}
Last updated