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.

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

idstringRequired
vendor_idstringRequired
vendorPartyRef
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
merchant_namestringNullable

Merchant name, as free text. Required when the vendor's type is card.

doc_typestringRequired
Possible valuestax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenone
doc_numberstringNullable
allocation_numberstringNullable
doc_datestring · dateRequired
due_datestring · dateNullable
accounting_periodstring

Accounting period in YYYY-MM format.

branch_idstringRequired
purchase_typestringNullable
vat_modestringRequired
Possible valueswith_vatexemptno_tax_doc
currencystringRequired

ISO 4217 currency code. Only ILS is currently supported.

Possible valuesILS
totalsobjectRequired
Show 5 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.

deductible_vatstring · money

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

payment_methodstringNullable
payment_statusstring
Possible valuesunpaidpartially_paidpaid
paid_atstring · date-timeNullable
statusstringRequired
Possible valuesdraftpending_approvalapprovedexportedcancelled
sourcestringRequired
Possible valuesmanualrecurringocremailcard_importmigrationapi
linesarray of ExpenseLineRequired
Show 8 child attributesHide child attributes
idstringRequired
category_idstringRequired
purchase_typestringNullable
branch_idstringNullable
amount_before_vatstring · moneyRequired

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

vat_amountstring · moneyRequired

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

descriptionstringNullable
expense_accountstringNullable

Expense account resolved from the account mappings. null when no mapping exists, which blocks approval.

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.

notesstringNullable
approved_bystringNullable
approved_atstring · date-timeNullable
exported_atstring · date-timeNullable
external_refstringNullable
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
deleted_atstring · date-timeNullable
The Expense 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
}

List expenses

GET/expenses
  • Scopebuyer.expenses:read
  • Pro plan or higher
  • Not yet available

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.

branch_idstring
category_idstring
statusstring
Possible valuesdraftpending_approvalapprovedexportedcancelled
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 expenses.
dataarray of ExpenseRequired
Show 30 child attributesHide child attributes
idstringRequired
vendor_idstringRequired
vendorPartyRef
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
merchant_namestringNullable

Merchant name, as free text. Required when the vendor's type is card.

doc_typestringRequired
Possible valuestax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenone
doc_numberstringNullable
allocation_numberstringNullable
doc_datestring · dateRequired
due_datestring · dateNullable
accounting_periodstring

Accounting period in YYYY-MM format.

branch_idstringRequired
purchase_typestringNullable
vat_modestringRequired
Possible valueswith_vatexemptno_tax_doc
currencystringRequired

ISO 4217 currency code. Only ILS is currently supported.

Possible valuesILS
totalsobjectRequired
Show 5 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.

deductible_vatstring · money

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

payment_methodstringNullable
payment_statusstring
Possible valuesunpaidpartially_paidpaid
paid_atstring · date-timeNullable
statusstringRequired
Possible valuesdraftpending_approvalapprovedexportedcancelled
sourcestringRequired
Possible valuesmanualrecurringocremailcard_importmigrationapi
linesarray of ExpenseLineRequired
Show 8 child attributesHide child attributes
idstringRequired
category_idstringRequired
purchase_typestringNullable
branch_idstringNullable
amount_before_vatstring · moneyRequired

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

vat_amountstring · moneyRequired

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

descriptionstringNullable
expense_accountstringNullable

Expense account resolved from the account mappings. null when no mapping exists, which blocks approval.

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.

notesstringNullable
approved_bystringNullable
approved_atstring · date-timeNullable
exported_atstring · date-timeNullable
external_refstringNullable
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
deleted_atstring · date-timeNullable
next_cursorstringNullable
has_morebooleanRequired
GET /expenses
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_…"
Response
{
  "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
}

Create an expense

POST/expenses
  • Scopebuyer.expenses:write
  • Pro plan or higher
  • Not yet available

Create 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

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

vendor_idstringRequired
merchant_namestring

Up to 120 characters

doc_typestringRequired
Possible valuestax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenone
doc_numberstring

Up to 64 characters

allocation_numberstring

Up to 32 characters

doc_datestring · dateRequired
due_datestring · date
accounting_periodstring
branch_idstringRequired
purchase_typestring
vat_modestringRequired
Possible valueswith_vatexemptno_tax_doc
totalsobjectRequired
Show 5 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.

deductible_vatstring · money

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

payment_methodstring
linesarray of ExpenseLineCreateRequired
Show 6 child attributesHide child attributes
category_idstringRequired
purchase_typestring
branch_idstring
amount_before_vatstring · moneyRequired

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

vat_amountstring · money

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

descriptionstring

Up to 200 characters

file_idsarray of string
notesstring

Up to 1000 characters

external_refstring

Up to 64 characters

submitboolean

Whether to move the expense out of draft. When true, it moves to pending_approval or approved, depending on the buyer's rules. Defaults to false.

Default false

Responses

201The created expense, with status set to draft or pending_approval.
idstringRequired
vendor_idstringRequired
vendorPartyRef
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
merchant_namestringNullable

Merchant name, as free text. Required when the vendor's type is card.

doc_typestringRequired
Possible valuestax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenone
doc_numberstringNullable
allocation_numberstringNullable
doc_datestring · dateRequired
due_datestring · dateNullable
accounting_periodstring

Accounting period in YYYY-MM format.

branch_idstringRequired
purchase_typestringNullable
vat_modestringRequired
Possible valueswith_vatexemptno_tax_doc
currencystringRequired

ISO 4217 currency code. Only ILS is currently supported.

Possible valuesILS
totalsobjectRequired
Show 5 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.

deductible_vatstring · money

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

payment_methodstringNullable
payment_statusstring
Possible valuesunpaidpartially_paidpaid
paid_atstring · date-timeNullable
statusstringRequired
Possible valuesdraftpending_approvalapprovedexportedcancelled
sourcestringRequired
Possible valuesmanualrecurringocremailcard_importmigrationapi
linesarray of ExpenseLineRequired
Show 8 child attributesHide child attributes
idstringRequired
category_idstringRequired
purchase_typestringNullable
branch_idstringNullable
amount_before_vatstring · moneyRequired

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

vat_amountstring · moneyRequired

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

descriptionstringNullable
expense_accountstringNullable

Expense account resolved from the account mappings. null when no mapping exists, which blocks approval.

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.

notesstringNullable
approved_bystringNullable
approved_atstring · date-timeNullable
exported_atstring · date-timeNullable
external_refstringNullable
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
deleted_atstring · date-timeNullable
422The request body or query parameters failed validation. See errors[] for each invalid field.
POST /expenses
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
  }'
Response
{
  "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
}

Retrieve an expense

GET/expenses/{expense_id}
  • Scopebuyer.expenses:read
  • Pro plan or higher
  • Not yet available

Path parameters

expense_idstringRequired

Responses

200The expense.

Headers: ETag

idstringRequired
vendor_idstringRequired
vendorPartyRef
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
merchant_namestringNullable

Merchant name, as free text. Required when the vendor's type is card.

doc_typestringRequired
Possible valuestax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenone
doc_numberstringNullable
allocation_numberstringNullable
doc_datestring · dateRequired
due_datestring · dateNullable
accounting_periodstring

Accounting period in YYYY-MM format.

branch_idstringRequired
purchase_typestringNullable
vat_modestringRequired
Possible valueswith_vatexemptno_tax_doc
currencystringRequired

ISO 4217 currency code. Only ILS is currently supported.

Possible valuesILS
totalsobjectRequired
Show 5 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.

deductible_vatstring · money

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

payment_methodstringNullable
payment_statusstring
Possible valuesunpaidpartially_paidpaid
paid_atstring · date-timeNullable
statusstringRequired
Possible valuesdraftpending_approvalapprovedexportedcancelled
sourcestringRequired
Possible valuesmanualrecurringocremailcard_importmigrationapi
linesarray of ExpenseLineRequired
Show 8 child attributesHide child attributes
idstringRequired
category_idstringRequired
purchase_typestringNullable
branch_idstringNullable
amount_before_vatstring · moneyRequired

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

vat_amountstring · moneyRequired

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

descriptionstringNullable
expense_accountstringNullable

Expense account resolved from the account mappings. null when no mapping exists, which blocks approval.

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.

notesstringNullable
approved_bystringNullable
approved_atstring · date-timeNullable
exported_atstring · date-timeNullable
external_refstringNullable
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
deleted_atstring · date-timeNullable
404The resource does not exist or belongs to another account.
GET /expenses/{expense_id}
curl "https://sandbox-api.zester.co.il/v2https://api.zester.co.il/v2/expenses/8830412" \
  -H "Authorization: Bearer zk_test_XXXXXXXX_…zk_live_XXXXXXXX_…"
Response
{
  "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
}

Update a draft expense

PATCH/expenses/{expense_id}
  • Scopebuyer.expenses:write
  • Pro plan or higher
  • Not yet available

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

expense_idstringRequired

Headers

If-Matchstring

The ETag value from a previous GET of the resource. If it no longer matches the current ETag, the request fails with 412.

Request body application/json

vendor_idstringRequired
merchant_namestring

Up to 120 characters

doc_typestringRequired
Possible valuestax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenone
doc_numberstring

Up to 64 characters

allocation_numberstring

Up to 32 characters

doc_datestring · dateRequired
due_datestring · date
accounting_periodstring
branch_idstringRequired
purchase_typestring
vat_modestringRequired
Possible valueswith_vatexemptno_tax_doc
totalsobjectRequired
Show 5 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.

deductible_vatstring · money

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

payment_methodstring
linesarray of ExpenseLineCreateRequired
Show 6 child attributesHide child attributes
category_idstringRequired
purchase_typestring
branch_idstring
amount_before_vatstring · moneyRequired

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

vat_amountstring · money

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

descriptionstring

Up to 200 characters

file_idsarray of string
notesstring

Up to 1000 characters

external_refstring

Up to 64 characters

submitboolean

Whether to move the expense out of draft. When true, it moves to pending_approval or approved, depending on the buyer's rules. Defaults to false.

Default false

Responses

200The updated expense.
idstringRequired
vendor_idstringRequired
vendorPartyRef
Show 2 child attributesHide child attributes
idstringRequired
namestringRequired
merchant_namestringNullable

Merchant name, as free text. Required when the vendor's type is card.

doc_typestringRequired
Possible valuestax_invoiceinvoice_receiptreceiptpayment_requestcharge_noticecard_txncredit_notenone
doc_numberstringNullable
allocation_numberstringNullable
doc_datestring · dateRequired
due_datestring · dateNullable
accounting_periodstring

Accounting period in YYYY-MM format.

branch_idstringRequired
purchase_typestringNullable
vat_modestringRequired
Possible valueswith_vatexemptno_tax_doc
currencystringRequired

ISO 4217 currency code. Only ILS is currently supported.

Possible valuesILS
totalsobjectRequired
Show 5 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.

deductible_vatstring · money

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

payment_methodstringNullable
payment_statusstring
Possible valuesunpaidpartially_paidpaid
paid_atstring · date-timeNullable
statusstringRequired
Possible valuesdraftpending_approvalapprovedexportedcancelled
sourcestringRequired
Possible valuesmanualrecurringocremailcard_importmigrationapi
linesarray of ExpenseLineRequired
Show 8 child attributesHide child attributes
idstringRequired
category_idstringRequired
purchase_typestringNullable
branch_idstringNullable
amount_before_vatstring · moneyRequired

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

vat_amountstring · moneyRequired

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

descriptionstringNullable
expense_accountstringNullable

Expense account resolved from the account mappings. null when no mapping exists, which blocks approval.

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.

notesstringNullable
approved_bystringNullable
approved_atstring · date-timeNullable
exported_atstring · date-timeNullable
external_refstringNullable
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.
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.
PATCH /expenses/{expense_id}
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
  }'
Response
{
  "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
}

List card transactions

GET/card-transactions
  • Scopebuyer.expenses:read
  • Pro plan or higher
  • Not yet available

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.

matchedboolean

Set to true for transactions with a linked expense, or false for transactions without one.

Responses

200A page of imported card transactions, each with its linked expense in expense_id.
dataarray of CardTransactionRequired
Show 11 child attributesHide child attributes
idstringRequired
external_idstringRequired

ID of the transaction in the card provider's feed. Unique within the account.

card_last4string
txn_datestring · dateRequired
merchantstringRequired
amountstring · moneyRequired

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

currencystringRequired
expense_idstringNullable
suggested_category_idstringNullable
imported_atstring · date-time
updated_atstring · date-time
next_cursorstringNullable
has_morebooleanRequired
GET /card-transactions
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_…"
Response
{
  "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
}

Import card transactions

POST/card-transactions/batch
  • Scopebuyer.expenses:write
  • Pro plan or higher
  • Not yet available

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 CardTransactionCreateRequired

Up to 500 items

Show 7 child attributesHide child attributes
external_idstringRequired
card_last4string
txn_datestring · dateRequired
merchantstringRequired
amountstring · moneyRequired

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

currencystringRequired

Default "ILS"

vendor_idstring

ID of the card vendor, a vendor whose type is card. Defaults to the account's default card vendor.

Responses

200A result for each item. Imported transactions create draft expenses, and a transaction whose external_id already exists is reported as skipped.
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
POST /card-transactions/batch
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"
      }
    ]
  }'
Response
{
  "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)"
        }
      ]
    }
  ]
}