Documentation Index
Fetch the complete documentation index at: https://docs.foodsave.kz/llms.txt
Use this file to discover all available pages before exploring further.
Order API
Base path: /api/v1/orders
Overview
Create and manage customer orders. Creation is idempotent when Idempotency-Key is supplied.
The create endpoint rejects duplicate payloads for 24 hours when the same idempotency key is reused.
POST /api/v1/orders
Create a new order.
curl --request POST \
--url https://api.foodsave.kz/api/v1/orders \
-H 'Authorization: Bearer $USER_TOKEN' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: uuid-1234' \
-d '{"items":[{"menuItemId":"m-1","qty":2}],"totalAmount":1250,"partnerId":"p-432","address":"Тестовая 1"}'
const response = await fetch('https://api.foodsave.kz/api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.USER_TOKEN}`,
'Content-Type': 'application/json',
'Idempotency-Key': 'uuid-1234'
},
body: JSON.stringify({ items: [{ menuItemId: 'm-1', qty: 2 }], totalAmount: 1250, partnerId: 'p-432', address: 'Тестовая 1' })
})
console.log(await response.json())
import os
import requests
response = requests.post(
'https://api.foodsave.kz/api/v1/orders',
headers={
'Authorization': f"Bearer {os.environ['USER_TOKEN']}",
'Idempotency-Key': 'uuid-1234'
},
json={'items': [{'menuItemId': 'm-1', 'qty': 2}], 'totalAmount': 1250, 'partnerId': 'p-432', 'address': 'Тестовая 1'}
)
print(response.json())
{
"orderId": "o-1001",
"status": "ACCEPTED",
"estimatedReadyAt": "2026-05-10T13:20:00Z"
}
Errors
| Code | Meaning | How to fix |
|---|
| 400 | VALIDATION_ERROR | Check item ids and totalAmount |
| 401 | UNAUTHORIZED | Provide valid customer token |
| 409 | DUPLICATE | Duplicate idempotency key — change key |
GET /api/v1/orders/{id}
Retrieve a single order by id.
{ "orderId": "o-1001", "status": "ACCEPTED" }