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.

Documents

Delivery notes, invoices, credit notes and consolidated invoices that you issue to buyers. Create them one at a time or in bulk, and see what each buyer actually received.

The Document object

Attributes

idstringRequired
typestringRequired
Possible valuesdelivery_noteinvoicecredit_noteconsolidated_invoice
numberstringRequired

Document number, as printed by the issuer.

datestring · dateRequired
accounting_periodstring

Accounting period in YYYY-MM format. Defaults to the month of date.

due_datestring · dateNullable
supplierPartyRefRequired
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
buyerPartyRefRequired
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
branchBranchRef
Show 3 child attributesHide child attributes
idstringRequired
namestringRequired
tax_idstringNullable
purchase_typestringNullable
sourcestring
Possible valuespurchaseexpensecardmigration
order_idsarray of string
currencystringRequired

ISO 4217 currency code. Only ILS is currently supported.

Possible valuesILS
totalsTotalsRequired
Show 4 child attributesHide child attributes
before_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

with_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discountstring · money

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

allocation_numberstringNullable

Israeli invoice allocation number. Mandatory for amounts above 5,000 ILS.

linesarray of DocumentLine
Show 14 child attributesHide child attributes
idstringRequired
skustringRequired
namestringRequired
quantitystring · quantityRequired

Decimal quantity as a string, with up to 3 fraction digits.

unitstring
unit_pricestring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discount_pctstringNullable
vat_exemptboolean
totalstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

order_idstringNullable
order_line_idstringNullable
quantity_receivedstring · quantityNullable

Quantity the buyer recorded as received.

purchase_typestringNullable
expense_accountstringNullable
buyer_statusstringRequired

What the buyer has done with the document, such as receiving, disputing or exporting it.

Possible valuespendingreceivedreceived_with_differencesdisputedapproved_for_exportexported
differencesarray of Difference
Show 6 child attributesHide child attributes
line_idstring
skustring
fieldstring
Possible valuesquantityunit_pricemissing_lineextra_line
issuedstring
receivedstring
notestring
payment_statusstring
Possible valuesunpaidpartially_paidpaid
paid_atstring · date-timeNullable
export_statusstring
Possible valuesnot_readyapproved_for_exportexported
exported_atstring · date-timeNullable
filesarray of FileRef
Show 5 child attributesHide child 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.

external_refstringNullable
historyarray of HistoryEntry
Show 4 child attributesHide child attributes
atstring · date-time
actionstring
actorobject
Show 3 child attributesHide child attributes
typestring
Possible valuesuserapi_clientsystem
idstring
namestring
changesobject
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
deleted_atstring · date-timeNullable
The Document object
{
  "id": "5520931",
  "type": "delivery_note",
  "number": "4471",
  "date": "2026-09-14",
  "accounting_period": "2026-09",
  "due_date": null,
  "supplier": {
    "id": "72223",
    "name": "מאפייה אחת עשרה"
  },
  "buyer": {
    "id": "71148",
    "name": "שניצי קפה"
  },
  "branch": {
    "id": "71148-1",
    "name": "שניצי קפה – ראשי",
    "tax_id": "000000000"
  },
  "purchase_type": null,
  "source": "purchase",
  "order_ids": [
    "2335619"
  ],
  "currency": "ILS",
  "totals": {
    "before_vat": "496.40",
    "vat": "89.35",
    "with_vat": "585.75",
    "discount": "0.00"
  },
  "allocation_number": null,
  "lines": [
    {
      "id": "5520931-1",
      "sku": "300",
      "name": "בייבי ג׳בטה לבן",
      "quantity": "1",
      "unit": "carton",
      "unit_price": "80.00",
      "discount_pct": null,
      "vat_exempt": false,
      "total": "80.00",
      "order_id": "2335619",
      "order_line_id": "l1",
      "quantity_received": "1",
      "purchase_type": null,
      "expense_account": null
    },
    {
      "id": "5520931-2",
      "sku": "412",
      "name": "לחמניית חיטה מלאה",
      "quantity": "12",
      "unit": "carton",
      "unit_price": "34.70",
      "discount_pct": null,
      "vat_exempt": false,
      "total": "416.40",
      "order_id": "2335619",
      "order_line_id": "l2",
      "quantity_received": "10",
      "purchase_type": null,
      "expense_account": null
    }
  ],
  "buyer_status": "received_with_differences",
  "differences": [
    {
      "line_id": "5520931-2",
      "sku": "412",
      "field": "quantity",
      "issued": "12",
      "received": "10",
      "note": "התקבלו 10 קרטונים מתוך 12"
    }
  ],
  "payment_status": "unpaid",
  "paid_at": null,
  "export_status": "not_ready",
  "exported_at": null,
  "files": [
    {
      "id": "file_01J9KQ7X4M",
      "name": "delivery-note-4471.pdf",
      "content_type": "application/pdf",
      "size_bytes": 184213,
      "download_url": "https://storage.zester.co.il/signed/f7K2mQ9vT4xB"
    }
  ],
  "external_ref": "DN-2026-4471",
  "history": [
    {
      "at": "2026-09-14T06:12:04+03:00",
      "action": "created",
      "actor": {
        "type": "api_client",
        "id": "cl_01J9KQ7X4M",
        "name": "סנכרון ERP"
      }
    },
    {
      "at": "2026-09-14T09:47:31+03:00",
      "action": "received",
      "actor": {
        "type": "user",
        "id": "u_58213",
        "name": "דנה כהן"
      },
      "changes": {
        "buyer_status": {
          "from": "pending",
          "to": "received_with_differences"
        },
        "lines[1].quantity_received": {
          "from": null,
          "to": "10"
        }
      }
    }
  ],
  "created_at": "2026-09-14T06:12:04+03:00",
  "updated_at": "2026-09-14T09:47:31+03:00",
  "deleted_at": null
}

List issued documents

GET/supplier/documents
  • Scopesupplier.documents:read

Query parameters

cursorstring

Opaque cursor returned as next_cursor in a previous response. Pass it to fetch the next page.

limitinteger

Default 50 · Min 1 · Max 200

updated_sincestring · date-time

Return only items whose updated_at is strictly after this timestamp. Use it for incremental sync.

fromstring · date

Start of the date range, inclusive, matched against the document date or the order date.

tostring · date

End of the date range, inclusive.

typearray of string

Comma-separated list of document types to filter by.

Possible valuesdelivery_noteinvoicecredit_noteconsolidated_invoice
buyer_statusstring

What the buyer has done with the document, such as receiving, disputing or exporting it.

Possible valuespendingreceivedreceived_with_differencesdisputedapproved_for_exportexported
expandarray of string

Comma-separated list of related objects to embed in the response, for example lines,supplier,files,history. By default, responses are kept compact.

Responses

200A page of documents.
dataarray of DocumentRequired
Show 28 child attributesHide child attributes
idstringRequired
typestringRequired
Possible valuesdelivery_noteinvoicecredit_noteconsolidated_invoice
numberstringRequired

Document number, as printed by the issuer.

datestring · dateRequired
accounting_periodstring

Accounting period in YYYY-MM format. Defaults to the month of date.

due_datestring · dateNullable
supplierPartyRefRequired
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
buyerPartyRefRequired
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
branchBranchRef
Show 3 child attributesHide child attributes
idstringRequired
namestringRequired
tax_idstringNullable
purchase_typestringNullable
sourcestring
Possible valuespurchaseexpensecardmigration
order_idsarray of string
currencystringRequired

ISO 4217 currency code. Only ILS is currently supported.

Possible valuesILS
totalsTotalsRequired
Show 4 child attributesHide child attributes
before_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

with_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discountstring · money

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

allocation_numberstringNullable

Israeli invoice allocation number. Mandatory for amounts above 5,000 ILS.

linesarray of DocumentLine
Show 14 child attributesHide child attributes
idstringRequired
skustringRequired
namestringRequired
quantitystring · quantityRequired

Decimal quantity as a string, with up to 3 fraction digits.

unitstring
unit_pricestring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discount_pctstringNullable
vat_exemptboolean
totalstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

order_idstringNullable
order_line_idstringNullable
quantity_receivedstring · quantityNullable

Quantity the buyer recorded as received.

purchase_typestringNullable
expense_accountstringNullable
buyer_statusstringRequired

What the buyer has done with the document, such as receiving, disputing or exporting it.

Possible valuespendingreceivedreceived_with_differencesdisputedapproved_for_exportexported
differencesarray of Difference
Show 6 child attributesHide child attributes
line_idstring
skustring
fieldstring
Possible valuesquantityunit_pricemissing_lineextra_line
issuedstring
receivedstring
notestring
payment_statusstring
Possible valuesunpaidpartially_paidpaid
paid_atstring · date-timeNullable
export_statusstring
Possible valuesnot_readyapproved_for_exportexported
exported_atstring · date-timeNullable
filesarray of FileRef
Show 5 child attributesHide child 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.

external_refstringNullable
historyarray of HistoryEntry
Show 4 child attributesHide child attributes
atstring · date-time
actionstring
actorobject
Show 3 child attributesHide child attributes
typestring
Possible valuesuserapi_clientsystem
idstring
namestring
changesobject
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
deleted_atstring · date-timeNullable
next_cursorstringNullable
has_morebooleanRequired
GET /supplier/documents
curl "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/supplier/documents?updated_since=2026-09-14T00:00:00%2B03:00&type=delivery_note&buyer_status=received_with_differences&expand=lines&limit=50" \
  -H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…"
Response
{
  "data": [
    {
      "id": "5520931",
      "type": "delivery_note",
      "number": "4471",
      "date": "2026-09-14",
      "accounting_period": "2026-09",
      "due_date": null,
      "supplier": {
        "id": "72223",
        "name": "מאפייה אחת עשרה"
      },
      "buyer": {
        "id": "71148",
        "name": "שניצי קפה"
      },
      "branch": {
        "id": "71148-1",
        "name": "שניצי קפה – ראשי",
        "tax_id": "000000000"
      },
      "purchase_type": null,
      "source": "purchase",
      "order_ids": [
        "2335619"
      ],
      "currency": "ILS",
      "totals": {
        "before_vat": "496.40",
        "vat": "89.35",
        "with_vat": "585.75",
        "discount": "0.00"
      },
      "allocation_number": null,
      "lines": [
        {
          "id": "5520931-1",
          "sku": "300",
          "name": "בייבי ג׳בטה לבן",
          "quantity": "1",
          "unit": "carton",
          "unit_price": "80.00",
          "discount_pct": null,
          "vat_exempt": false,
          "total": "80.00",
          "order_id": "2335619",
          "order_line_id": "l1",
          "quantity_received": "1"
        },
        {
          "id": "5520931-2",
          "sku": "412",
          "name": "לחמניית חיטה מלאה",
          "quantity": "12",
          "unit": "carton",
          "unit_price": "34.70",
          "discount_pct": null,
          "vat_exempt": false,
          "total": "416.40",
          "order_id": "2335619",
          "order_line_id": "l2",
          "quantity_received": "10"
        }
      ],
      "buyer_status": "received_with_differences",
      "differences": [
        {
          "line_id": "5520931-2",
          "sku": "412",
          "field": "quantity",
          "issued": "12",
          "received": "10",
          "note": "התקבלו 10 קרטונים מתוך 12"
        }
      ],
      "payment_status": "unpaid",
      "paid_at": null,
      "export_status": "not_ready",
      "exported_at": null,
      "external_ref": "DN-2026-4471",
      "created_at": "2026-09-14T06:12:04+03:00",
      "updated_at": "2026-09-14T09:47:31+03:00",
      "deleted_at": null
    },
    {
      "id": "5520874",
      "type": "delivery_note",
      "number": "4468",
      "date": "2026-09-13",
      "accounting_period": "2026-09",
      "due_date": null,
      "supplier": {
        "id": "72223",
        "name": "מאפייה אחת עשרה"
      },
      "buyer": {
        "id": "71202",
        "name": "ביסטרו הנמל"
      },
      "branch": {
        "id": "71202-1",
        "name": "ביסטרו הנמל – ראשי",
        "tax_id": "000000000"
      },
      "purchase_type": null,
      "source": "purchase",
      "order_ids": [
        "2335480"
      ],
      "currency": "ILS",
      "totals": {
        "before_vat": "531.60",
        "vat": "95.69",
        "with_vat": "627.29",
        "discount": "14.40"
      },
      "allocation_number": null,
      "lines": [
        {
          "id": "5520874-1",
          "sku": "518",
          "name": "קרואסון חמאה",
          "quantity": "3",
          "unit": "carton",
          "unit_price": "96.00",
          "discount_pct": "5",
          "vat_exempt": false,
          "total": "273.60",
          "order_id": "2335480",
          "order_line_id": "l1",
          "quantity_received": "3"
        },
        {
          "id": "5520874-2",
          "sku": "604",
          "name": "לחם שיפון פרוס",
          "quantity": "20",
          "unit": "unit",
          "unit_price": "12.90",
          "discount_pct": null,
          "vat_exempt": false,
          "total": "258.00",
          "order_id": "2335480",
          "order_line_id": "l2",
          "quantity_received": "0"
        }
      ],
      "buyer_status": "received_with_differences",
      "differences": [
        {
          "line_id": "5520874-2",
          "sku": "604",
          "field": "missing_line",
          "issued": "20",
          "received": "0",
          "note": "לחם השיפון לא הגיע במשלוח"
        }
      ],
      "payment_status": "unpaid",
      "paid_at": null,
      "export_status": "not_ready",
      "exported_at": null,
      "external_ref": "DN-2026-4468",
      "created_at": "2026-09-13T05:48:10+03:00",
      "updated_at": "2026-09-14T08:05:22+03:00",
      "deleted_at": null
    }
  ],
  "next_cursor": null,
  "has_more": false
}

Create a document

POST/supplier/documents
  • Scopesupplier.documents:write

Create a delivery note, invoice, credit note or consolidated invoice. Upload attachments first with POST /files and reference them in file_ids. The Idempotency-Key header is required: use the document number as its value.

Headers

Idempotency-KeystringRequired

Required key for safely retrying the request. Use a stable business key, such as the document number. Sending the same key with the same body within 24 hours returns the original response. Reusing the key with a different body returns 409 with code idempotency_conflict.

Up to 128 characters

Request body application/json

typestringRequired
Possible valuesdelivery_noteinvoicecredit_noteconsolidated_invoice
numberstringRequired

Up to 64 characters

datestring · dateRequired
due_datestring · date
buyer_idstringRequired
branch_idstring

ID of the buyer's branch the document is for. Required when the buyer has more than one branch and order_ids is empty.

order_idsarray of string
currencystring

ISO 4217 currency code. Only ILS is currently supported.

Possible valuesILS
totalsTotalsRequired
Show 4 child attributesHide child attributes
before_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

with_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discountstring · money

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

allocation_numberstring

Up to 32 characters

linesarray of DocumentLineCreateRequired
Show 9 child attributesHide child attributes
skustringRequired
namestring
quantitystring · quantityRequired

Decimal quantity as a string, with up to 3 fraction digits.

unitstring
unit_pricestring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discount_pctstring
vat_exemptboolean

Default false

order_idstring
order_line_idstring
file_idsarray of string
external_refstring

Up to 64 characters

notesstring

Up to 1000 characters

Responses

201The created document.
idstringRequired
typestringRequired
Possible valuesdelivery_noteinvoicecredit_noteconsolidated_invoice
numberstringRequired

Document number, as printed by the issuer.

datestring · dateRequired
accounting_periodstring

Accounting period in YYYY-MM format. Defaults to the month of date.

due_datestring · dateNullable
supplierPartyRefRequired
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
buyerPartyRefRequired
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
branchBranchRef
Show 3 child attributesHide child attributes
idstringRequired
namestringRequired
tax_idstringNullable
purchase_typestringNullable
sourcestring
Possible valuespurchaseexpensecardmigration
order_idsarray of string
currencystringRequired

ISO 4217 currency code. Only ILS is currently supported.

Possible valuesILS
totalsTotalsRequired
Show 4 child attributesHide child attributes
before_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

with_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discountstring · money

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

allocation_numberstringNullable

Israeli invoice allocation number. Mandatory for amounts above 5,000 ILS.

linesarray of DocumentLine
Show 14 child attributesHide child attributes
idstringRequired
skustringRequired
namestringRequired
quantitystring · quantityRequired

Decimal quantity as a string, with up to 3 fraction digits.

unitstring
unit_pricestring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discount_pctstringNullable
vat_exemptboolean
totalstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

order_idstringNullable
order_line_idstringNullable
quantity_receivedstring · quantityNullable

Quantity the buyer recorded as received.

purchase_typestringNullable
expense_accountstringNullable
buyer_statusstringRequired

What the buyer has done with the document, such as receiving, disputing or exporting it.

Possible valuespendingreceivedreceived_with_differencesdisputedapproved_for_exportexported
differencesarray of Difference
Show 6 child attributesHide child attributes
line_idstring
skustring
fieldstring
Possible valuesquantityunit_pricemissing_lineextra_line
issuedstring
receivedstring
notestring
payment_statusstring
Possible valuesunpaidpartially_paidpaid
paid_atstring · date-timeNullable
export_statusstring
Possible valuesnot_readyapproved_for_exportexported
exported_atstring · date-timeNullable
filesarray of FileRef
Show 5 child attributesHide child 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.

external_refstringNullable
historyarray of HistoryEntry
Show 4 child attributesHide child attributes
atstring · date-time
actionstring
actorobject
Show 3 child attributesHide child attributes
typestring
Possible valuesuserapi_clientsystem
idstring
namestring
changesobject
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
deleted_atstring · date-timeNullable
409The request conflicts with the current state. The code is conflict, or idempotency_conflict when an Idempotency-Key is reused with a different body.
422The request body or query parameters failed validation. See errors[] for each invalid field.
POST /supplier/documents
curl -X POST "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/supplier/documents" \
  -H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: tm-2026-4471" \
  -d '{
    "type": "delivery_note",
    "number": "4471",
    "date": "2026-09-14",
    "buyer_id": "71148",
    "branch_id": "71148-1",
    "order_ids": [
      "2335619"
    ],
    "currency": "ILS",
    "totals": {
      "before_vat": "496.40",
      "vat": "89.35",
      "with_vat": "585.75"
    },
    "lines": [
      {
        "sku": "300",
        "name": "בייבי ג׳בטה לבן",
        "quantity": "1",
        "unit": "carton",
        "unit_price": "80.00",
        "vat_exempt": false,
        "order_id": "2335619",
        "order_line_id": "l1"
      },
      {
        "sku": "412",
        "name": "לחמניית חיטה מלאה",
        "quantity": "12",
        "unit": "carton",
        "unit_price": "34.70",
        "vat_exempt": false,
        "order_id": "2335619",
        "order_line_id": "l2"
      }
    ],
    "file_ids": [
      "file_01J9KQ7X4M"
    ],
    "external_ref": "DN-2026-4471",
    "notes": "לפרוק בכניסה האחורית עד 07:00"
  }'
Response
{
  "id": "5520931",
  "type": "delivery_note",
  "number": "4471",
  "date": "2026-09-14",
  "accounting_period": "2026-09",
  "due_date": null,
  "supplier": {
    "id": "72223",
    "name": "מאפייה אחת עשרה"
  },
  "buyer": {
    "id": "71148",
    "name": "שניצי קפה"
  },
  "branch": {
    "id": "71148-1",
    "name": "שניצי קפה – ראשי",
    "tax_id": "000000000"
  },
  "purchase_type": null,
  "source": "purchase",
  "order_ids": [
    "2335619"
  ],
  "currency": "ILS",
  "totals": {
    "before_vat": "496.40",
    "vat": "89.35",
    "with_vat": "585.75",
    "discount": "0.00"
  },
  "allocation_number": null,
  "lines": [
    {
      "id": "5520931-1",
      "sku": "300",
      "name": "בייבי ג׳בטה לבן",
      "quantity": "1",
      "unit": "carton",
      "unit_price": "80.00",
      "discount_pct": null,
      "vat_exempt": false,
      "total": "80.00",
      "order_id": "2335619",
      "order_line_id": "l1",
      "quantity_received": null
    },
    {
      "id": "5520931-2",
      "sku": "412",
      "name": "לחמניית חיטה מלאה",
      "quantity": "12",
      "unit": "carton",
      "unit_price": "34.70",
      "discount_pct": null,
      "vat_exempt": false,
      "total": "416.40",
      "order_id": "2335619",
      "order_line_id": "l2",
      "quantity_received": null
    }
  ],
  "buyer_status": "pending",
  "differences": [],
  "payment_status": "unpaid",
  "paid_at": null,
  "export_status": "not_ready",
  "exported_at": null,
  "files": [
    {
      "id": "file_01J9KQ7X4M",
      "name": "delivery-note-4471.pdf",
      "content_type": "application/pdf",
      "size_bytes": 184213
    }
  ],
  "external_ref": "DN-2026-4471",
  "created_at": "2026-09-14T06:12:04+03:00",
  "updated_at": "2026-09-14T06:12:04+03:00",
  "deleted_at": null
}

Create documents in bulk

POST/supplier/documents/batch
  • Scopesupplier.documents:write

Create up to 500 documents in one request. The response reports a result for each item, and the request returns 422 only when every item fails.

Headers

Idempotency-KeystringRequired

Required key for safely retrying the request. Use a stable business key, such as the document number. Sending the same key with the same body within 24 hours returns the original response. Reusing the key with a different body returns 409 with code idempotency_conflict.

Up to 128 characters

Request body application/json

itemsarray of DocumentCreateRequired

Up to 500 items

Show 14 child attributesHide child attributes
typestringRequired
Possible valuesdelivery_noteinvoicecredit_noteconsolidated_invoice
numberstringRequired

Up to 64 characters

datestring · dateRequired
due_datestring · date
buyer_idstringRequired
branch_idstring

ID of the buyer's branch the document is for. Required when the buyer has more than one branch and order_ids is empty.

order_idsarray of string
currencystring

ISO 4217 currency code. Only ILS is currently supported.

Possible valuesILS
totalsTotalsRequired
Show 4 child attributesHide child attributes
before_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

with_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discountstring · money

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

allocation_numberstring

Up to 32 characters

linesarray of DocumentLineCreateRequired
Show 9 child attributesHide child attributes
skustringRequired
namestring
quantitystring · quantityRequired

Decimal quantity as a string, with up to 3 fraction digits.

unitstring
unit_pricestring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discount_pctstring
vat_exemptboolean

Default false

order_idstring
order_line_idstring
file_idsarray of string
external_refstring

Up to 64 characters

notesstring

Up to 1000 characters

Responses

200A result for each item. At least one item succeeded.
summaryobjectRequired
Show 4 child attributesHide child attributes
totalinteger
succeededinteger
failedinteger
skippedinteger
itemsarray of BatchItemResultRequired
Show 5 child attributesHide child attributes
indexintegerRequired

Position of the item in the request's items[] array.

keystring

Business key of the item, such as a document number, SKU or external_id.

statusstringRequired
Possible valuescreatedupdatedskippedfailed
idstring

ID of the resource that was created or updated.

errorsarray of ValidationErrorItem
Show 3 child attributesHide child attributes
fieldstringRequired

JSON path of the field that failed validation.

codestringRequired
messagestring
422Every item failed. The body reports the result and errors for each item.
POST /supplier/documents/batch
curl -X POST "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/supplier/documents/batch" \
  -H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: tm-batch-2026-09-14" \
  -d '{
    "items": [
      {
        "type": "delivery_note",
        "number": "4471",
        "date": "2026-09-14",
        "buyer_id": "71148",
        "branch_id": "71148-1",
        "order_ids": [
          "2335619"
        ],
        "currency": "ILS",
        "totals": {
          "before_vat": "496.40",
          "vat": "89.35",
          "with_vat": "585.75"
        },
        "lines": [
          {
            "sku": "300",
            "name": "בייבי ג׳בטה לבן",
            "quantity": "1",
            "unit": "carton",
            "unit_price": "80.00",
            "vat_exempt": false,
            "order_id": "2335619",
            "order_line_id": "l1"
          },
          {
            "sku": "412",
            "name": "לחמניית חיטה מלאה",
            "quantity": "12",
            "unit": "carton",
            "unit_price": "34.70",
            "vat_exempt": false,
            "order_id": "2335619",
            "order_line_id": "l2"
          }
        ],
        "file_ids": [
          "file_01J9KQ7X4M"
        ],
        "external_ref": "DN-2026-4471"
      },
      {
        "type": "invoice",
        "number": "INV-2026-1188",
        "date": "2026-09-14",
        "due_date": "2026-10-30",
        "buyer_id": "71202",
        "branch_id": "71202-1",
        "currency": "ILS",
        "totals": {
          "before_vat": "5610.00",
          "vat": "1009.80",
          "with_vat": "6619.80"
        },
        "lines": [
          {
            "sku": "518",
            "name": "קרואסון חמאה",
            "quantity": "45",
            "unit": "carton",
            "unit_price": "96.00",
            "vat_exempt": false
          },
          {
            "sku": "604",
            "name": "לחם שיפון פרוס",
            "quantity": "100",
            "unit": "unit",
            "unit_price": "12.90",
            "vat_exempt": false
          }
        ],
        "external_ref": "AR-2026-1188",
        "notes": "אספקה לאירוע סוף הקיץ, תנאי תשלום שוטף + 30"
      }
    ]
  }'
Response
{
  "summary": {
    "total": 2,
    "succeeded": 1,
    "failed": 1,
    "skipped": 0
  },
  "items": [
    {
      "index": 0,
      "key": "4471",
      "status": "created",
      "id": "5520931"
    },
    {
      "index": 1,
      "key": "INV-2026-1188",
      "status": "failed",
      "errors": [
        {
          "field": "allocation_number",
          "code": "required",
          "message": "An Israel Tax Authority allocation number is required for invoices above 5,000.00 ILS before VAT"
        }
      ]
    }
  ]
}
GET/supplier/documents/{document_id}
  • Scopesupplier.documents:read

Path parameters

document_idstringRequired

Query parameters

expandarray of string

Comma-separated list of related objects to embed in the response, for example lines,supplier,files,history. By default, responses are kept compact.

Responses

200The document.
idstringRequired
typestringRequired
Possible valuesdelivery_noteinvoicecredit_noteconsolidated_invoice
numberstringRequired

Document number, as printed by the issuer.

datestring · dateRequired
accounting_periodstring

Accounting period in YYYY-MM format. Defaults to the month of date.

due_datestring · dateNullable
supplierPartyRefRequired
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
buyerPartyRefRequired
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
branchBranchRef
Show 3 child attributesHide child attributes
idstringRequired
namestringRequired
tax_idstringNullable
purchase_typestringNullable
sourcestring
Possible valuespurchaseexpensecardmigration
order_idsarray of string
currencystringRequired

ISO 4217 currency code. Only ILS is currently supported.

Possible valuesILS
totalsTotalsRequired
Show 4 child attributesHide child attributes
before_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

with_vatstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discountstring · money

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

allocation_numberstringNullable

Israeli invoice allocation number. Mandatory for amounts above 5,000 ILS.

linesarray of DocumentLine
Show 14 child attributesHide child attributes
idstringRequired
skustringRequired
namestringRequired
quantitystring · quantityRequired

Decimal quantity as a string, with up to 3 fraction digits.

unitstring
unit_pricestring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

discount_pctstringNullable
vat_exemptboolean
totalstring · moneyRequired

Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.

order_idstringNullable
order_line_idstringNullable
quantity_receivedstring · quantityNullable

Quantity the buyer recorded as received.

purchase_typestringNullable
expense_accountstringNullable
buyer_statusstringRequired

What the buyer has done with the document, such as receiving, disputing or exporting it.

Possible valuespendingreceivedreceived_with_differencesdisputedapproved_for_exportexported
differencesarray of Difference
Show 6 child attributesHide child attributes
line_idstring
skustring
fieldstring
Possible valuesquantityunit_pricemissing_lineextra_line
issuedstring
receivedstring
notestring
payment_statusstring
Possible valuesunpaidpartially_paidpaid
paid_atstring · date-timeNullable
export_statusstring
Possible valuesnot_readyapproved_for_exportexported
exported_atstring · date-timeNullable
filesarray of FileRef
Show 5 child attributesHide child 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.

external_refstringNullable
historyarray of HistoryEntry
Show 4 child attributesHide child attributes
atstring · date-time
actionstring
actorobject
Show 3 child attributesHide child attributes
typestring
Possible valuesuserapi_clientsystem
idstring
namestring
changesobject
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
deleted_atstring · date-timeNullable
404The resource does not exist or belongs to another account.
GET /supplier/documents/{document_id}
curl "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/supplier/documents/5520931?expand=lines,files,history" \
  -H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…"
Response
{
  "id": "5520931",
  "type": "delivery_note",
  "number": "4471",
  "date": "2026-09-14",
  "accounting_period": "2026-09",
  "due_date": null,
  "supplier": {
    "id": "72223",
    "name": "מאפייה אחת עשרה"
  },
  "buyer": {
    "id": "71148",
    "name": "שניצי קפה"
  },
  "branch": {
    "id": "71148-1",
    "name": "שניצי קפה – ראשי",
    "tax_id": "000000000"
  },
  "purchase_type": null,
  "source": "purchase",
  "order_ids": [
    "2335619"
  ],
  "currency": "ILS",
  "totals": {
    "before_vat": "496.40",
    "vat": "89.35",
    "with_vat": "585.75",
    "discount": "0.00"
  },
  "allocation_number": null,
  "lines": [
    {
      "id": "5520931-1",
      "sku": "300",
      "name": "בייבי ג׳בטה לבן",
      "quantity": "1",
      "unit": "carton",
      "unit_price": "80.00",
      "discount_pct": null,
      "vat_exempt": false,
      "total": "80.00",
      "order_id": "2335619",
      "order_line_id": "l1",
      "quantity_received": "1",
      "purchase_type": null,
      "expense_account": null
    },
    {
      "id": "5520931-2",
      "sku": "412",
      "name": "לחמניית חיטה מלאה",
      "quantity": "12",
      "unit": "carton",
      "unit_price": "34.70",
      "discount_pct": null,
      "vat_exempt": false,
      "total": "416.40",
      "order_id": "2335619",
      "order_line_id": "l2",
      "quantity_received": "10",
      "purchase_type": null,
      "expense_account": null
    }
  ],
  "buyer_status": "received_with_differences",
  "differences": [
    {
      "line_id": "5520931-2",
      "sku": "412",
      "field": "quantity",
      "issued": "12",
      "received": "10",
      "note": "התקבלו 10 קרטונים מתוך 12"
    }
  ],
  "payment_status": "unpaid",
  "paid_at": null,
  "export_status": "not_ready",
  "exported_at": null,
  "files": [
    {
      "id": "file_01J9KQ7X4M",
      "name": "delivery-note-4471.pdf",
      "content_type": "application/pdf",
      "size_bytes": 184213,
      "download_url": "https://storage.zester.co.il/signed/f7K2mQ9vT4xB"
    }
  ],
  "external_ref": "DN-2026-4471",
  "history": [
    {
      "at": "2026-09-14T06:12:04+03:00",
      "action": "created",
      "actor": {
        "type": "api_client",
        "id": "cl_01J9KQ7X4M",
        "name": "סנכרון ERP"
      }
    },
    {
      "at": "2026-09-14T09:47:31+03:00",
      "action": "received",
      "actor": {
        "type": "user",
        "id": "u_58213",
        "name": "דנה כהן"
      },
      "changes": {
        "buyer_status": {
          "from": "pending",
          "to": "received_with_differences"
        },
        "lines[1].quantity_received": {
          "from": null,
          "to": "10"
        }
      }
    }
  ],
  "created_at": "2026-09-14T06:12:04+03:00",
  "updated_at": "2026-09-14T09:47:31+03:00",
  "deleted_at": null
}