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.
Box API
Base path: /api/v1/boxes
Overview
Boxes are curated packages with inventory windows, pricing modes and stock controls.
POST /api/v1/boxes
Create a new box listing.
curl --request POST \
--url https://api.foodsave.kz/api/v1/boxes \
-H 'Authorization: Bearer $PARTNER_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"title":"Breakfast box","price":2500,"quantity":12,"pickupWindowStart":"2026-05-10T12:00:00Z","pickupWindowEnd":"2026-05-10T16:00:00Z"}'
const response = await fetch('https://api.foodsave.kz/api/v1/boxes', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PARTNER_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ title: 'Breakfast box', price: 2500, quantity: 12, pickupWindowStart: '2026-05-10T12:00:00Z', pickupWindowEnd: '2026-05-10T16:00:00Z' })
})
console.log(await response.json())
import os
import requests
response = requests.post(
'https://api.foodsave.kz/api/v1/boxes',
headers={'Authorization': f"Bearer {os.environ['PARTNER_TOKEN']}"},
json={'title': 'Breakfast box', 'price': 2500, 'quantity': 12, 'pickupWindowStart': '2026-05-10T12:00:00Z', 'pickupWindowEnd': '2026-05-10T16:00:00Z'}
)
print(response.json())
{ "id":"b-1", "title":"Breakfast box", "quantityAvailable":12, "status":"ACTIVE" }
Boxes with no active orders can be deleted. Once orders exist, the API will reject deletion.
Errors
| Code | Meaning | How to fix |
|---|
| 400 | VALIDATION_ERROR | Check window timestamps and quantity |
PUT /api/v1/boxes/{id}
Update an existing box.
{ "id":"b-1", "title":"Updated box", "quantityAvailable":10, "status":"ACTIVE" }
PATCH /api/v1/boxes/{id}/quantity
Update available quantity.
{ "id":"b-1", "quantityAvailable":7 }
POST /api/v1/boxes/{id}/hide
Hide a box from listing.
{ "id":"b-1", "hidden":true }
GET /api/v1/boxes/{id}
Public box details.
{ "id":"b-1", "title":"Breakfast box", "items": [] }
GET /api/v1/boxes/by-partner/{partnerId}
List boxes by partner.
[{ "id":"b-1", "title":"Breakfast box" }]