Try it · Sandbox

Use a sandbox key. It is kept only for this browser tab and sent only to https://sandbox-api.zester.co.il/v2.

Response
Send the request to see the response.

Files

Upload attachments, then reference them from other resources by file_id. Retrieve a file's metadata and a signed download URL.

The File object

Attributes

idstringRequired
namestringRequired
content_typestring
size_bytesinteger
download_urlstring · uri

Signed URL for downloading the file, valid for about 1 hour. Present only when the request includes expand=files.

purposestring
sha256string
created_atstring · date-time
expires_atstring · date-timeNullable

Time when the file is deleted if nothing references it by then.

The File object
{
  "id": "file_01J9KQ7X4M",
  "name": "delivery-note-4471.pdf",
  "content_type": "application/pdf",
  "size_bytes": 184213,
  "download_url": "https://storage.zester.co.il/signed/f7K2mQ9vT4xB",
  "purpose": "document_attachment",
  "sha256": "473af64451c51f7dd81a20d9ba6b6977c864a3f2da2691e7b87c77a1ed546e2c",
  "created_at": "2026-09-14T06:11:52+03:00",
  "expires_at": null
}

Upload a file

POST/files
  • Scopesupplier.documents:write
  • Scopebuyer.expenses:write

Upload a file as multipart/form-data, up to 25 MB. The response returns a file_id to reference from documents and expenses. Files that are not referenced within 24 hours are deleted.

Request body multipart/form-data

filestring · binaryRequired
purposestring
Possible valuesdocument_attachmentexpense_attachmentproduct_image

Responses

201The stored file.
idstringRequired
namestringRequired
content_typestring
size_bytesinteger
download_urlstring · uri

Signed URL for downloading the file, valid for about 1 hour. Present only when the request includes expand=files.

purposestring
sha256string
created_atstring · date-time
expires_atstring · date-timeNullable

Time when the file is deleted if nothing references it by then.

413The file is larger than 25 MB.
422The request body or query parameters failed validation. See errors[] for each invalid field.
POST /files
curl -X POST "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/files" \
  -H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…" \
  -F "file=@delivery-note-4471.pdf" \
  -F "purpose=document_attachment"
Response
{
  "id": "file_01J9KQ7X4M",
  "name": "delivery-note-4471.pdf",
  "content_type": "application/pdf",
  "size_bytes": 184213,
  "download_url": "https://storage.zester.co.il/signed/a3Rt8LpW2nZe",
  "purpose": "document_attachment",
  "sha256": "473af64451c51f7dd81a20d9ba6b6977c864a3f2da2691e7b87c77a1ed546e2c",
  "created_at": "2026-09-14T06:11:52+03:00",
  "expires_at": "2026-09-15T06:11:52+03:00"
}

Retrieve a file

GET/files/{file_id}
  • ScopeAny API key

Path parameters

file_idstringRequired

Responses

200The file's metadata, with a signed download URL that is valid for 1 hour.
idstringRequired
namestringRequired
content_typestring
size_bytesinteger
download_urlstring · uri

Signed URL for downloading the file, valid for about 1 hour. Present only when the request includes expand=files.

purposestring
sha256string
created_atstring · date-time
expires_atstring · date-timeNullable

Time when the file is deleted if nothing references it by then.

404The resource does not exist or belongs to another account.
GET /files/{file_id}
curl "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/files/file_01J9KQ7X4M" \
  -H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…"
Response
{
  "id": "file_01J9KQ7X4M",
  "name": "delivery-note-4471.pdf",
  "content_type": "application/pdf",
  "size_bytes": 184213,
  "download_url": "https://storage.zester.co.il/signed/f7K2mQ9vT4xB",
  "purpose": "document_attachment",
  "sha256": "473af64451c51f7dd81a20d9ba6b6977c864a3f2da2691e7b87c77a1ed546e2c",
  "created_at": "2026-09-14T06:11:52+03:00",
  "expires_at": null
}