Skip to main content

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"}'
{ "id":"b-1", "title":"Breakfast box", "quantityAvailable":12, "status":"ACTIVE" }
id
string
status
string
quantityAvailable
number
Boxes with no active orders can be deleted. Once orders exist, the API will reject deletion.

Errors

CodeMeaningHow to fix
400VALIDATION_ERRORCheck 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" }]