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.

File Upload API

Base path: /api/v1/files

Overview

Uploads user and partner assets. Files are converted to WebP where applicable and a thumbnail is generated for image assets.
Files larger than 10MB may be proxied via S3 multipart upload — the endpoint will return an upload policy in that case.

POST /api/v1/files/upload

Upload a file (images, receipts).
curl --request POST \
  --url https://api.foodsave.kz/api/v1/files/upload \
  -H 'Authorization: Bearer $FOODSAVE_API_KEY' \
  -F "file=@./receipt.jpg"
{
  "fileId": "f-321",
  "url": "https://cdn.foodsave.kz/files/receipt.jpg",
  "contentType": "image/jpeg",
  "size": 102400
}
fileId
string
url
string
thumbnailUrl
string

Errors

CodeMeaningHow to fix
400UNSUPPORTED_MEDIA_TYPEEnsure file is image/pdf and content-type is correct
413PAYLOAD_TOO_LARGESplit upload or use multi-part S3 flow