Accounting
Journal lines from ZesttBox, ready for your ERP. Pull the lines approved for export, then mark them as exported.
The endpoints in this group are not yet available. This page documents the contract as currently defined.
{
"id": "aex_01J9KQ7X4M",
"line_count": 3,
"target": "meshek",
"external_ref": "MSK-2026-09-013",
"exported_at": "2026-09-15T21:40:12+03:00",
"exported_by": {
"client_id": "cl_01J9KQ7X4M",
"client_name": "משק – ממשק הנה״ח"
}
}
/accounting/journal-linesList ZesttBox journal lines (debit, credit and VAT) ready for your ERP, one row per line. Set status to approved_for_export to pull the lines that are ready, then mark them with POST /accounting/exports.
Query 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.
Responses
200A page of journal lines.
Show 27 child attributesHide child attributes
Type of the source document, either a document type or an expense doc_type value.
Account the line posts to: the expense account when side is debit, the vendor's credit account when side is credit, or the input VAT account when side is vat.
Decimal amount as a string, with exactly 2 fraction digits. The currency is set by currency on the parent object.
403The credential is valid but is not allowed to make this request. The code is scope_missing, plan_required, ip_not_allowed or client_suspended.
curl "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/accounting/journal-lines?period=2026-09&status=approved_for_export&branch_id=71148-1&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/accounting/journal-lines?period=2026-09&status=approved_for_export&branch_id=71148-1&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/accounting/journal-lines?period=2026-09&status=approved_for_export&branch_id=71148-1&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/accounting/journal-lines?period=2026-09&status=approved_for_export&branch_id=71148-1&limit=200");
var data = await res.Content.ReadAsStringAsync();
{
"data": [
{
"id": "jl_90311",
"document_id": "5520931",
"document_type": "delivery_note",
"document_number": "4471",
"source": "purchase",
"side": "debit",
"account": "6100",
"counter_account": "2001",
"amount": "496.40",
"currency": "ILS",
"description": "מאפייה אחת עשרה, תעודת משלוח 4471 (הזמנה 2335619), מאפה",
"vendor_id": "72223",
"vendor_tax_id": "000000000",
"branch_id": "71148-1",
"branch_tax_id": "000000000",
"purchase_type": "FC",
"category_id": null,
"reference": "4471",
"allocation_number": null,
"doc_date": "2026-09-14",
"accounting_period": "2026-09",
"movement_type_code": "חס",
"batch_number": "1187",
"status": "approved_for_export",
"export_batch_id": null,
"exported_at": null,
"updated_at": "2026-09-15T09:12:37+03:00"
},
{
"id": "jl_90312",
"document_id": "5520931",
"document_type": "delivery_note",
"document_number": "4471",
"source": "purchase",
"side": "vat",
"account": "1520",
"counter_account": "2001",
"amount": "89.35",
"currency": "ILS",
"description": "מאפייה אחת עשרה, תעודת משלוח 4471, מע״מ תשומות 18%",
"vendor_id": "72223",
"vendor_tax_id": "000000000",
"branch_id": "71148-1",
"branch_tax_id": "000000000",
"purchase_type": "FC",
"category_id": null,
"reference": "4471",
"allocation_number": null,
"doc_date": "2026-09-14",
"accounting_period": "2026-09",
"movement_type_code": "חס",
"batch_number": "1187",
"status": "approved_for_export",
"export_batch_id": null,
"exported_at": null,
"updated_at": "2026-09-15T09:12:37+03:00"
},
{
"id": "jl_90313",
"document_id": "5520931",
"document_type": "delivery_note",
"document_number": "4471",
"source": "purchase",
"side": "credit",
"account": "2001",
"counter_account": "6100",
"amount": "585.75",
"currency": "ILS",
"description": "מאפייה אחת עשרה, תעודת משלוח 4471, זכות ספק",
"vendor_id": "72223",
"vendor_tax_id": "000000000",
"branch_id": "71148-1",
"branch_tax_id": "000000000",
"purchase_type": "FC",
"category_id": null,
"reference": "4471",
"allocation_number": null,
"doc_date": "2026-09-14",
"accounting_period": "2026-09",
"movement_type_code": "חס",
"batch_number": "1187",
"status": "approved_for_export",
"export_batch_id": null,
"exported_at": null,
"updated_at": "2026-09-15T09:12:37+03:00"
}
],
"next_cursor": null,
"has_more": false
}{
"type": "https://developers.zester.co.il/errors/scope_missing",
"title": "Scope missing",
"status": 403,
"code": "scope_missing",
"detail": "This API client does not have the buyer.accounting:read scope. Ask the account admin to grant it in Settings → Developers.",
"instance": "/v2/accounting/journal-lines",
"request_id": "req_01J9KR3B6T"
}
/accounting/exportsSet the given journal lines to exported and record the calling client as exported_by. The response returns the export batch with its export_batch_id.
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
Responses
201The recorded export batch.
409One or more of the lines were already exported.
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/accounting/exports" \
-H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: meshek-export-2026-09-15-01" \
-d '{
"journal_line_ids": [
"jl_90311",
"jl_90312",
"jl_90313"
],
"target": "meshek",
"external_ref": "MSK-2026-09-013"
}'const res = await fetch("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/accounting/exports", {
method: "POST",
headers: {
Authorization: "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
"Content-Type": "application/json",
"Idempotency-Key": "meshek-export-2026-09-15-01",
},
body: JSON.stringify({
"journal_line_ids": [
"jl_90311",
"jl_90312",
"jl_90313"
],
"target": "meshek",
"external_ref": "MSK-2026-09-013"
}),
});
const data = await res.json();import requests
res = requests.post(
"https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/accounting/exports",
headers={
"Authorization": "Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…",
"Idempotency-Key": "meshek-export-2026-09-15-01",
},
json={
"journal_line_ids": [
"jl_90311",
"jl_90312",
"jl_90313"
],
"target": "meshek",
"external_ref": "MSK-2026-09-013"
},
)
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", "meshek-export-2026-09-15-01");
var body = new StringContent("""
{
"journal_line_ids": [
"jl_90311",
"jl_90312",
"jl_90313"
],
"target": "meshek",
"external_ref": "MSK-2026-09-013"
}
""", Encoding.UTF8, "application/json");
var res = await http.PostAsync("https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/accounting/exports", body);
var data = await res.Content.ReadAsStringAsync();
{
"id": "aex_01J9KQ7X4M",
"line_count": 3,
"target": "meshek",
"external_ref": "MSK-2026-09-013",
"exported_at": "2026-09-15T21:40:12+03:00",
"exported_by": {
"client_id": "cl_01J9KQ7X4M",
"client_name": "משק – ממשק הנה״ח"
}
}{
"type": "https://developers.zester.co.il/errors/conflict",
"title": "Lines already exported",
"status": 409,
"code": "conflict",
"detail": "3 of 3 journal lines were already exported in batch aex_01J9KQ7X4M on 2026-09-15. Pull status=approved_for_export again before marking.",
"instance": "/v2/accounting/exports",
"request_id": "req_01J9KR5D2W",
"errors": [
{
"field": "journal_line_ids[0]",
"code": "already_exported",
"message": "jl_90311 was exported in batch aex_01J9KQ7X4M"
},
{
"field": "journal_line_ids[1]",
"code": "already_exported",
"message": "jl_90312 was exported in batch aex_01J9KQ7X4M"
},
{
"field": "journal_line_ids[2]",
"code": "already_exported",
"message": "jl_90313 was exported in batch aex_01J9KQ7X4M"
}
]
}{
"type": "https://developers.zester.co.il/errors/validation_error",
"title": "Validation failed",
"status": 422,
"code": "validation_error",
"detail": "1 field is invalid",
"instance": "/v2/accounting/exports",
"request_id": "req_01J9KS0A7H",
"errors": [
{
"field": "journal_line_ids[2]",
"code": "not_approved_for_export",
"message": "Journal line jl_90313 has status not_ready and cannot be marked as exported"
}
]
}
/accounting/exports/{export_batch_id}Path parameters
Responses
200The export batch.
404The resource does not exist or belongs to another account.
curl "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/accounting/exports/aex_01J9KQ7X4M" \
-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/accounting/exports/aex_01J9KQ7X4M", {
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/accounting/exports/aex_01J9KQ7X4M",
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/accounting/exports/aex_01J9KQ7X4M");
var data = await res.Content.ReadAsStringAsync();
{
"id": "aex_01J9KQ7X4M",
"line_count": 3,
"target": "meshek",
"external_ref": "MSK-2026-09-013",
"exported_at": "2026-09-15T21:40:12+03:00",
"exported_by": {
"client_id": "cl_01J9KQ7X4M",
"client_name": "משק – ממשק הנה״ח"
}
}{
"type": "https://developers.zester.co.il/errors/not_found",
"title": "Not found",
"status": 404,
"code": "not_found",
"detail": "Export batch aex_01J9KQ7X4M does not exist or belongs to another account.",
"instance": "/v2/accounting/exports/aex_01J9KQ7X4M",
"request_id": "req_01J9KS8M3Q"
}