Expenses
Expense documents, which have no products, and card transactions. List, create and update expenses, and import card transactions.
The endpoints in this group are not yet available. This page documents the contract as currently defined.
The Expense object
Attributes
tax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenoneShow 5 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Show 8 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
{
"id": "8830412",
"vendor_id": "72455",
"vendor": {
"id": "72455",
"name": "נקי פלוס"
},
"merchant_name": null,
"doc_type": "tax_invoice",
"doc_number": "NP-20931",
"allocation_number": null,
"doc_date": "2026-09-10",
"due_date": "2026-10-30",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"currency": "ILS",
"totals": {
"before_vat": "845.00",
"vat": "152.10",
"with_vat": "997.10",
"deductible_vat": "152.10"
},
"payment_method": "bank_transfer",
"payment_status": "unpaid",
"paid_at": null,
"status": "approved",
"source": "api",
"lines": [
{
"id": "9934101",
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "620.00",
"vat_amount": "111.60",
"description": "חומרי ניקוי ומסירי שומנים למטבח",
"expense_account": "6100"
},
{
"id": "9934102",
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "225.00",
"vat_amount": "40.50",
"description": "שקיות אשפה ומגבות נייר",
"expense_account": "6100"
}
],
"files": [
{
"id": "file_01J9KW5T2D",
"name": "np-20931.pdf",
"content_type": "application/pdf",
"size_bytes": 96412,
"download_url": "https://files.zester.co.il/d/file_01J9KW5T2D?expires=1789373400&sig=demo"
}
],
"notes": "חשבונית חודשית, סניף ראשי",
"approved_by": "יוסי כהן",
"approved_at": "2026-09-14T09:30:00+03:00",
"exported_at": null,
"external_ref": "ERP-EXP-55120",
"created_at": "2026-09-10T17:05:00+03:00",
"updated_at": "2026-09-14T09:30:00+03:00",
"deleted_at": null
}
/expensesQuery parameters
Opaque cursor returned as next_cursor in a previous response. Pass it to fetch the next page.
Return only items whose updated_at is strictly after this timestamp. Use it for incremental sync.
Start of the date range, inclusive, matched against the document date or the order date.
Responses
200A page of expenses.
Show 30 child attributesHide child attributes
tax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenoneShow 5 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Show 8 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
curl "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses?updated_since=2026-09-10T00:00:00%2B03:00&limit=200&expand=files" \
-H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…"const res = await fetch("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses?updated_since=2026-09-10T00:00:00%2B03:00&limit=200&expand=files", {
method: "GET",
headers: {
Authorization: "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
},
});
const data = await res.json();import requests
res = requests.get(
"https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses?updated_since=2026-09-10T00:00:00%2B03:00&limit=200&expand=files",
headers={
"Authorization": "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
},
)
data = res.json()using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…");
var res = await http.GetAsync("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses?updated_since=2026-09-10T00:00:00%2B03:00&limit=200&expand=files");
var data = await res.Content.ReadAsStringAsync();
{
"data": [
{
"id": "8830356",
"vendor_id": "72901",
"vendor": {
"id": "72901",
"name": "חברת החשמל"
},
"merchant_name": null,
"doc_type": "tax_invoice",
"doc_number": "4402189337",
"allocation_number": null,
"doc_date": "2026-09-03",
"due_date": "2026-09-20",
"accounting_period": "2026-08",
"branch_id": "71148-2",
"purchase_type": "OC",
"vat_mode": "with_vat",
"currency": "ILS",
"totals": {
"before_vat": "1840.00",
"vat": "331.20",
"with_vat": "2171.20",
"deductible_vat": "331.20"
},
"payment_method": "standing_order",
"payment_status": "unpaid",
"paid_at": null,
"status": "exported",
"source": "email",
"lines": [
{
"id": "9933870",
"category_id": "931",
"purchase_type": "OC",
"branch_id": "71148-2",
"amount_before_vat": "1840.00",
"vat_amount": "331.20",
"description": "חשמל אוגוסט 2026",
"expense_account": "6200"
}
],
"files": [
{
"id": "file_01J9GZ1E7M",
"name": "hashmal-2026-08.pdf",
"content_type": "application/pdf",
"size_bytes": 154880,
"download_url": "https://files.zester.co.il/d/file_01J9GZ1E7M?expires=1789373400&sig=demo"
}
],
"notes": null,
"approved_by": "יוסי כהן",
"approved_at": "2026-09-06T10:15:00+03:00",
"exported_at": "2026-09-10T16:45:00+03:00",
"external_ref": null,
"created_at": "2026-09-04T06:12:00+03:00",
"updated_at": "2026-09-10T16:45:00+03:00",
"deleted_at": null
},
{
"id": "8830477",
"vendor_id": "72950",
"vendor": {
"id": "72950",
"name": "כרטיס אשראי עסקי 4417"
},
"merchant_name": "תחנת דלק",
"doc_type": "card_txn",
"doc_number": null,
"allocation_number": null,
"doc_date": "2026-09-11",
"due_date": null,
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"currency": "ILS",
"totals": {
"before_vat": "296.61",
"vat": "53.39",
"with_vat": "350.00",
"deductible_vat": "35.59"
},
"payment_method": "credit_card",
"payment_status": "paid",
"paid_at": "2026-09-11T07:48:00+03:00",
"status": "draft",
"source": "card_import",
"lines": [
{
"id": "9934180",
"category_id": "915",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "296.61",
"vat_amount": "53.39",
"description": null,
"expense_account": "6300"
}
],
"files": [],
"notes": null,
"approved_by": null,
"approved_at": null,
"exported_at": null,
"external_ref": "MESH-TX-20260911-00417",
"created_at": "2026-09-13T02:15:04+03:00",
"updated_at": "2026-09-13T02:15:04+03:00",
"deleted_at": null
},
{
"id": "8830412",
"vendor_id": "72455",
"vendor": {
"id": "72455",
"name": "נקי פלוס"
},
"merchant_name": null,
"doc_type": "tax_invoice",
"doc_number": "NP-20931",
"allocation_number": null,
"doc_date": "2026-09-10",
"due_date": "2026-10-30",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"currency": "ILS",
"totals": {
"before_vat": "845.00",
"vat": "152.10",
"with_vat": "997.10",
"deductible_vat": "152.10"
},
"payment_method": "bank_transfer",
"payment_status": "unpaid",
"paid_at": null,
"status": "approved",
"source": "api",
"lines": [
{
"id": "9934101",
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "620.00",
"vat_amount": "111.60",
"description": "חומרי ניקוי ומסירי שומנים למטבח",
"expense_account": "6100"
},
{
"id": "9934102",
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "225.00",
"vat_amount": "40.50",
"description": "שקיות אשפה ומגבות נייר",
"expense_account": "6100"
}
],
"files": [
{
"id": "file_01J9KW5T2D",
"name": "np-20931.pdf",
"content_type": "application/pdf",
"size_bytes": 96412,
"download_url": "https://files.zester.co.il/d/file_01J9KW5T2D?expires=1789373400&sig=demo"
}
],
"notes": "חשבונית חודשית, סניף ראשי",
"approved_by": "יוסי כהן",
"approved_at": "2026-09-14T09:30:00+03:00",
"exported_at": null,
"external_ref": "ERP-EXP-55120",
"created_at": "2026-09-10T17:05:00+03:00",
"updated_at": "2026-09-14T09:30:00+03:00",
"deleted_at": null
}
],
"next_cursor": null,
"has_more": false
}
/expensesCreate an expense document from an external system. The buyer's blocking rules apply, covering mandatory attachments, allocation numbers above 5,000 ILS and missing account mappings.
Headers
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
tax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenoneShow 5 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Show 6 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Responses
201The created expense, with status set to draft or pending_approval.
tax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenoneShow 5 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Show 8 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
422The request body or query parameters failed validation. See errors[] for each invalid field.
curl -X POST "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses" \
-H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: exp-72455-NP-20931" \
-d '{
"vendor_id": "72455",
"doc_type": "tax_invoice",
"doc_number": "NP-20931",
"doc_date": "2026-09-10",
"due_date": "2026-10-30",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"totals": {
"before_vat": "845.00",
"vat": "152.10",
"with_vat": "997.10",
"deductible_vat": "152.10"
},
"payment_method": "bank_transfer",
"lines": [
{
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "620.00",
"vat_amount": "111.60",
"description": "חומרי ניקוי ומסירי שומנים למטבח"
},
{
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "225.00",
"vat_amount": "40.50",
"description": "שקיות אשפה ומגבות נייר"
}
],
"file_ids": [
"file_01J9KW5T2D"
],
"notes": "חשבונית חודשית, סניף ראשי",
"external_ref": "ERP-EXP-55120",
"submit": true
}'const res = await fetch("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses", {
method: "POST",
headers: {
Authorization: "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
"Content-Type": "application/json",
"Idempotency-Key": "exp-72455-NP-20931",
},
body: JSON.stringify({
"vendor_id": "72455",
"doc_type": "tax_invoice",
"doc_number": "NP-20931",
"doc_date": "2026-09-10",
"due_date": "2026-10-30",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"totals": {
"before_vat": "845.00",
"vat": "152.10",
"with_vat": "997.10",
"deductible_vat": "152.10"
},
"payment_method": "bank_transfer",
"lines": [
{
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "620.00",
"vat_amount": "111.60",
"description": "חומרי ניקוי ומסירי שומנים למטבח"
},
{
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "225.00",
"vat_amount": "40.50",
"description": "שקיות אשפה ומגבות נייר"
}
],
"file_ids": [
"file_01J9KW5T2D"
],
"notes": "חשבונית חודשית, סניף ראשי",
"external_ref": "ERP-EXP-55120",
"submit": true
}),
});
const data = await res.json();import requests
res = requests.post(
"https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses",
headers={
"Authorization": "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
"Idempotency-Key": "exp-72455-NP-20931",
},
json={
"vendor_id": "72455",
"doc_type": "tax_invoice",
"doc_number": "NP-20931",
"doc_date": "2026-09-10",
"due_date": "2026-10-30",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"totals": {
"before_vat": "845.00",
"vat": "152.10",
"with_vat": "997.10",
"deductible_vat": "152.10"
},
"payment_method": "bank_transfer",
"lines": [
{
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "620.00",
"vat_amount": "111.60",
"description": "חומרי ניקוי ומסירי שומנים למטבח"
},
{
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "225.00",
"vat_amount": "40.50",
"description": "שקיות אשפה ומגבות נייר"
}
],
"file_ids": [
"file_01J9KW5T2D"
],
"notes": "חשבונית חודשית, סניף ראשי",
"external_ref": "ERP-EXP-55120",
"submit": True
},
)
data = res.json()using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…");
http.DefaultRequestHeaders.Add("Idempotency-Key", "exp-72455-NP-20931");
var body = new StringContent("""
{
"vendor_id": "72455",
"doc_type": "tax_invoice",
"doc_number": "NP-20931",
"doc_date": "2026-09-10",
"due_date": "2026-10-30",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"totals": {
"before_vat": "845.00",
"vat": "152.10",
"with_vat": "997.10",
"deductible_vat": "152.10"
},
"payment_method": "bank_transfer",
"lines": [
{
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "620.00",
"vat_amount": "111.60",
"description": "חומרי ניקוי ומסירי שומנים למטבח"
},
{
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "225.00",
"vat_amount": "40.50",
"description": "שקיות אשפה ומגבות נייר"
}
],
"file_ids": [
"file_01J9KW5T2D"
],
"notes": "חשבונית חודשית, סניף ראשי",
"external_ref": "ERP-EXP-55120",
"submit": true
}
""", Encoding.UTF8, "application/json");
var res = await http.PostAsync("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses", body);
var data = await res.Content.ReadAsStringAsync();
{
"id": "8830412",
"vendor_id": "72455",
"vendor": {
"id": "72455",
"name": "נקי פלוס"
},
"merchant_name": null,
"doc_type": "tax_invoice",
"doc_number": "NP-20931",
"allocation_number": null,
"doc_date": "2026-09-10",
"due_date": "2026-10-30",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"currency": "ILS",
"totals": {
"before_vat": "845.00",
"vat": "152.10",
"with_vat": "997.10",
"deductible_vat": "152.10"
},
"payment_method": "bank_transfer",
"payment_status": "unpaid",
"paid_at": null,
"status": "pending_approval",
"source": "api",
"lines": [
{
"id": "9934101",
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "620.00",
"vat_amount": "111.60",
"description": "חומרי ניקוי ומסירי שומנים למטבח",
"expense_account": "6100"
},
{
"id": "9934102",
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "225.00",
"vat_amount": "40.50",
"description": "שקיות אשפה ומגבות נייר",
"expense_account": "6100"
}
],
"files": [
{
"id": "file_01J9KW5T2D",
"name": "np-20931.pdf",
"content_type": "application/pdf",
"size_bytes": 96412
}
],
"notes": "חשבונית חודשית, סניף ראשי",
"approved_by": null,
"approved_at": null,
"exported_at": null,
"external_ref": "ERP-EXP-55120",
"created_at": "2026-09-10T17:05:00+03:00",
"updated_at": "2026-09-10T17:05:00+03:00",
"deleted_at": null
}{
"type": "https://developers.zester.co.il/errors/validation_error",
"title": "Validation failed",
"status": 422,
"code": "validation_error",
"detail": "2 fields are invalid",
"request_id": "req_01J9KX3F9A",
"errors": [
{
"field": "doc_number",
"code": "duplicate_document",
"message": "Vendor 72455 already has tax invoice NP-20931 (expense 8830412)"
},
{
"field": "file_ids[0]",
"code": "file_not_found",
"message": "File file_01J9KW5T2D does not exist or has expired"
}
]
}
/expenses/{expense_id}Path parameters
Responses
200The expense.
Headers: ETag
tax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenoneShow 5 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Show 8 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
404The resource does not exist or belongs to another account.
curl "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses/8830412" \
-H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…"const res = await fetch("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses/8830412", {
method: "GET",
headers: {
Authorization: "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
},
});
const data = await res.json();import requests
res = requests.get(
"https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses/8830412",
headers={
"Authorization": "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
},
)
data = res.json()using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…");
var res = await http.GetAsync("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses/8830412");
var data = await res.Content.ReadAsStringAsync();
{
"id": "8830412",
"vendor_id": "72455",
"vendor": {
"id": "72455",
"name": "נקי פלוס"
},
"merchant_name": null,
"doc_type": "tax_invoice",
"doc_number": "NP-20931",
"allocation_number": null,
"doc_date": "2026-09-10",
"due_date": "2026-10-30",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"currency": "ILS",
"totals": {
"before_vat": "845.00",
"vat": "152.10",
"with_vat": "997.10",
"deductible_vat": "152.10"
},
"payment_method": "bank_transfer",
"payment_status": "unpaid",
"paid_at": null,
"status": "approved",
"source": "api",
"lines": [
{
"id": "9934101",
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "620.00",
"vat_amount": "111.60",
"description": "חומרי ניקוי ומסירי שומנים למטבח",
"expense_account": "6100"
},
{
"id": "9934102",
"category_id": "912",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "225.00",
"vat_amount": "40.50",
"description": "שקיות אשפה ומגבות נייר",
"expense_account": "6100"
}
],
"files": [
{
"id": "file_01J9KW5T2D",
"name": "np-20931.pdf",
"content_type": "application/pdf",
"size_bytes": 96412,
"download_url": "https://files.zester.co.il/d/file_01J9KW5T2D?expires=1789373400&sig=demo"
}
],
"notes": "חשבונית חודשית, סניף ראשי",
"approved_by": "יוסי כהן",
"approved_at": "2026-09-14T09:30:00+03:00",
"exported_at": null,
"external_ref": "ERP-EXP-55120",
"created_at": "2026-09-10T17:05:00+03:00",
"updated_at": "2026-09-14T09:30:00+03:00",
"deleted_at": null
}{
"type": "https://developers.zester.co.il/errors/not_found",
"title": "Not found",
"status": 404,
"code": "not_found",
"detail": "Expense 8830412 does not exist or belongs to another account.",
"request_id": "req_01J9KY6C1T"
}
/expenses/{expense_id}Update an expense in draft status. Expenses in any other status cannot be edited. After an expense is exported, create a counter document instead.
Path parameters
Headers
Request body application/json
tax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenoneShow 5 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Show 6 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Responses
200The updated expense.
tax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenoneShow 5 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Show 8 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
409The request conflicts with the current state. The code is conflict, or idempotency_conflict when an Idempotency-Key is reused with a different body.
412The If-Match value does not match the resource's current ETag.
422The request body or query parameters failed validation. See errors[] for each invalid field.
curl -X PATCH "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses/8830477" \
-H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…" \
-H "Content-Type: application/json" \
-d '{
"vendor_id": "72950",
"merchant_name": "תחנת דלק",
"doc_type": "card_txn",
"doc_date": "2026-09-11",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"totals": {
"before_vat": "296.61",
"vat": "53.39",
"with_vat": "350.00",
"deductible_vat": "35.59"
},
"payment_method": "credit_card",
"lines": [
{
"category_id": "915",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "296.61",
"vat_amount": "53.39",
"description": "תדלוק רכב החלוקה"
}
],
"file_ids": [
"file_01J9MC9K4P"
],
"notes": "קבלה מצורפת",
"external_ref": "MESH-TX-20260911-00417",
"submit": true
}'const res = await fetch("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses/8830477", {
method: "PATCH",
headers: {
Authorization: "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
"Content-Type": "application/json",
},
body: JSON.stringify({
"vendor_id": "72950",
"merchant_name": "תחנת דלק",
"doc_type": "card_txn",
"doc_date": "2026-09-11",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"totals": {
"before_vat": "296.61",
"vat": "53.39",
"with_vat": "350.00",
"deductible_vat": "35.59"
},
"payment_method": "credit_card",
"lines": [
{
"category_id": "915",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "296.61",
"vat_amount": "53.39",
"description": "תדלוק רכב החלוקה"
}
],
"file_ids": [
"file_01J9MC9K4P"
],
"notes": "קבלה מצורפת",
"external_ref": "MESH-TX-20260911-00417",
"submit": true
}),
});
const data = await res.json();import requests
res = requests.patch(
"https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses/8830477",
headers={
"Authorization": "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
},
json={
"vendor_id": "72950",
"merchant_name": "תחנת דלק",
"doc_type": "card_txn",
"doc_date": "2026-09-11",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"totals": {
"before_vat": "296.61",
"vat": "53.39",
"with_vat": "350.00",
"deductible_vat": "35.59"
},
"payment_method": "credit_card",
"lines": [
{
"category_id": "915",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "296.61",
"vat_amount": "53.39",
"description": "תדלוק רכב החלוקה"
}
],
"file_ids": [
"file_01J9MC9K4P"
],
"notes": "קבלה מצורפת",
"external_ref": "MESH-TX-20260911-00417",
"submit": True
},
)
data = res.json()using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…");
var body = new StringContent("""
{
"vendor_id": "72950",
"merchant_name": "תחנת דלק",
"doc_type": "card_txn",
"doc_date": "2026-09-11",
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"totals": {
"before_vat": "296.61",
"vat": "53.39",
"with_vat": "350.00",
"deductible_vat": "35.59"
},
"payment_method": "credit_card",
"lines": [
{
"category_id": "915",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "296.61",
"vat_amount": "53.39",
"description": "תדלוק רכב החלוקה"
}
],
"file_ids": [
"file_01J9MC9K4P"
],
"notes": "קבלה מצורפת",
"external_ref": "MESH-TX-20260911-00417",
"submit": true
}
""", Encoding.UTF8, "application/json");
var res = await http.PatchAsync("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses/8830477", body);
var data = await res.Content.ReadAsStringAsync();
{
"id": "8830477",
"vendor_id": "72950",
"vendor": {
"id": "72950",
"name": "כרטיס אשראי עסקי 4417"
},
"merchant_name": "תחנת דלק",
"doc_type": "card_txn",
"doc_number": null,
"allocation_number": null,
"doc_date": "2026-09-11",
"due_date": null,
"accounting_period": "2026-09",
"branch_id": "71148-1",
"purchase_type": "OC",
"vat_mode": "with_vat",
"currency": "ILS",
"totals": {
"before_vat": "296.61",
"vat": "53.39",
"with_vat": "350.00",
"deductible_vat": "35.59"
},
"payment_method": "credit_card",
"payment_status": "paid",
"paid_at": "2026-09-11T07:48:00+03:00",
"status": "pending_approval",
"source": "card_import",
"lines": [
{
"id": "9934180",
"category_id": "915",
"purchase_type": "OC",
"branch_id": "71148-1",
"amount_before_vat": "296.61",
"vat_amount": "53.39",
"description": "תדלוק רכב החלוקה",
"expense_account": "6300"
}
],
"files": [
{
"id": "file_01J9MC9K4P",
"name": "kabala-delek.jpg",
"content_type": "image/jpeg",
"size_bytes": 238115
}
],
"notes": "קבלה מצורפת",
"approved_by": null,
"approved_at": null,
"exported_at": null,
"external_ref": "MESH-TX-20260911-00417",
"created_at": "2026-09-13T02:15:04+03:00",
"updated_at": "2026-09-14T10:02:00+03:00",
"deleted_at": null
}{
"type": "https://developers.zester.co.il/errors/conflict",
"title": "Conflict",
"status": 409,
"code": "conflict",
"detail": "Expense 8830477 is pending_approval. Only draft expenses can be edited.",
"request_id": "req_01J9KZ2P8L"
}{
"type": "https://developers.zester.co.il/errors/precondition_failed",
"title": "Precondition failed",
"status": 412,
"code": "precondition_failed",
"detail": "If-Match \"8830477-v1\" does not match the current version \"8830477-v2\" of expense 8830477. Fetch it again and retry.",
"request_id": "req_01J9KZ7V3S"
}{
"type": "https://developers.zester.co.il/errors/validation_error",
"title": "Validation failed",
"status": 422,
"code": "validation_error",
"detail": "1 field is invalid",
"request_id": "req_01J9M0D4XQ",
"errors": [
{
"field": "merchant_name",
"code": "required_for_card_vendor",
"message": "merchant_name is required when the vendor is a card vendor"
}
]
}
/card-transactionsQuery parameters
Opaque cursor returned as next_cursor in a previous response. Pass it to fetch the next page.
Return only items whose updated_at is strictly after this timestamp. Use it for incremental sync.
Start of the date range, inclusive, matched against the document date or the order date.
Responses
200A page of imported card transactions, each with its linked expense in expense_id.
Show 11 child attributesHide child attributes
ID of the transaction in the card provider's feed. Unique within the account.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
curl "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/card-transactions?updated_since=2026-09-11T00:00:00%2B03:00&limit=200" \
-H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…"const res = await fetch("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/card-transactions?updated_since=2026-09-11T00:00:00%2B03:00&limit=200", {
method: "GET",
headers: {
Authorization: "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
},
});
const data = await res.json();import requests
res = requests.get(
"https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/card-transactions?updated_since=2026-09-11T00:00:00%2B03:00&limit=200",
headers={
"Authorization": "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
},
)
data = res.json()using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…");
var res = await http.GetAsync("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/card-transactions?updated_since=2026-09-11T00:00:00%2B03:00&limit=200");
var data = await res.Content.ReadAsStringAsync();
{
"data": [
{
"id": "4410951",
"external_id": "MESH-TX-20260910-00388",
"card_last4": "4417",
"txn_date": "2026-09-10",
"merchant": "חניון עירוני",
"amount": "18.00",
"currency": "ILS",
"expense_id": null,
"suggested_category_id": "915",
"imported_at": "2026-09-11T02:15:03+03:00",
"updated_at": "2026-09-11T02:15:03+03:00"
},
{
"id": "4410982",
"external_id": "MESH-TX-20260911-00417",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "תחנת דלק",
"amount": "350.00",
"currency": "ILS",
"expense_id": "8830477",
"suggested_category_id": "915",
"imported_at": "2026-09-13T02:15:04+03:00",
"updated_at": "2026-09-13T02:15:04+03:00"
},
{
"id": "4410983",
"external_id": "MESH-TX-20260911-00452",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "חניון עירוני",
"amount": "24.00",
"currency": "ILS",
"expense_id": "8830478",
"suggested_category_id": "915",
"imported_at": "2026-09-13T02:15:05+03:00",
"updated_at": "2026-09-13T02:15:05+03:00"
}
],
"next_cursor": null,
"has_more": false
}
/card-transactions/batchHeaders
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
Up to 500 items
Show 7 child attributesHide child attributes
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
Responses
200A result for each item. Imported transactions create draft expenses, and a transaction whose external_id already exists is reported as skipped.
Show 5 child attributesHide child attributes
curl -X POST "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/card-transactions/batch" \
-H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: mesh-feed-2026-09-13" \
-d '{
"items": [
{
"external_id": "MESH-TX-20260911-00417",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "תחנת דלק",
"amount": "350.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260911-00452",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "חניון עירוני",
"amount": "24.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260910-00388",
"card_last4": "4417",
"txn_date": "2026-09-10",
"merchant": "חניון עירוני",
"amount": "18.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260911-00460",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "נקי פלוס",
"amount": "129.00",
"currency": "ILS",
"vendor_id": "72455"
}
]
}'const res = await fetch("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/card-transactions/batch", {
method: "POST",
headers: {
Authorization: "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
"Content-Type": "application/json",
"Idempotency-Key": "mesh-feed-2026-09-13",
},
body: JSON.stringify({
"items": [
{
"external_id": "MESH-TX-20260911-00417",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "תחנת דלק",
"amount": "350.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260911-00452",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "חניון עירוני",
"amount": "24.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260910-00388",
"card_last4": "4417",
"txn_date": "2026-09-10",
"merchant": "חניון עירוני",
"amount": "18.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260911-00460",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "נקי פלוס",
"amount": "129.00",
"currency": "ILS",
"vendor_id": "72455"
}
]
}),
});
const data = await res.json();import requests
res = requests.post(
"https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/card-transactions/batch",
headers={
"Authorization": "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
"Idempotency-Key": "mesh-feed-2026-09-13",
},
json={
"items": [
{
"external_id": "MESH-TX-20260911-00417",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "תחנת דלק",
"amount": "350.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260911-00452",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "חניון עירוני",
"amount": "24.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260910-00388",
"card_last4": "4417",
"txn_date": "2026-09-10",
"merchant": "חניון עירוני",
"amount": "18.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260911-00460",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "נקי פלוס",
"amount": "129.00",
"currency": "ILS",
"vendor_id": "72455"
}
]
},
)
data = res.json()using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…");
http.DefaultRequestHeaders.Add("Idempotency-Key", "mesh-feed-2026-09-13");
var body = new StringContent("""
{
"items": [
{
"external_id": "MESH-TX-20260911-00417",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "תחנת דלק",
"amount": "350.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260911-00452",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "חניון עירוני",
"amount": "24.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260910-00388",
"card_last4": "4417",
"txn_date": "2026-09-10",
"merchant": "חניון עירוני",
"amount": "18.00",
"currency": "ILS",
"vendor_id": "72950"
},
{
"external_id": "MESH-TX-20260911-00460",
"card_last4": "4417",
"txn_date": "2026-09-11",
"merchant": "נקי פלוס",
"amount": "129.00",
"currency": "ILS",
"vendor_id": "72455"
}
]
}
""", Encoding.UTF8, "application/json");
var res = await http.PostAsync("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/card-transactions/batch", body);
var data = await res.Content.ReadAsStringAsync();
{
"summary": {
"total": 4,
"succeeded": 2,
"failed": 1,
"skipped": 1
},
"items": [
{
"index": 0,
"key": "MESH-TX-20260911-00417",
"status": "created",
"id": "4410982"
},
{
"index": 1,
"key": "MESH-TX-20260911-00452",
"status": "created",
"id": "4410983"
},
{
"index": 2,
"key": "MESH-TX-20260910-00388",
"status": "skipped",
"id": "4410951"
},
{
"index": 3,
"key": "MESH-TX-20260911-00460",
"status": "failed",
"errors": [
{
"field": "items[3].vendor_id",
"code": "vendor_not_card",
"message": "Vendor 72455 is not a card vendor (vendor_type is service)"
}
]
}
]
}