Issue documents from any system

The ChatInvoice API lets a website, shop, CRM or any other system issue legally valid Israeli accounting documents on behalf of a business — quotes, invoices, receipts and credit notes — with sequential numbering, a digitally signed PDF, a tax-authority allocation number when required, and delivery to the customer per the business settings.

Base URL
https://api.chat-invoice.co.il/v1
Auth
Authorization: Bearer ci_live_…
Format
JSON · dates YYYY-MM-DD (Israel time) · amounts in ILS, 2 decimals
Spec
OpenAPI 3.1 · Reference · Errors

01Quick start

  1. Create a key in the app: Settings → Connections → API → “Create key”. It is shown once — store it server-side.
  2. Check the connection and see what the business may issue:
    curl https://api.chat-invoice.co.il/v1/me -H "Authorization: Bearer $CHATINVOICE_API_KEY"
  3. Issue a quote for a new customer:
curl -X POST https://api.chat-invoice.co.il/v1/documents \
  -H "Authorization: Bearer $CHATINVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: crm-8812" \
  -d '{"type":"quote","customer":{"name":"ישראל ישראלי בע\"מ","tax_id":"515123456","email":"billing@example.co.il","phone":"0501234567"},"items":[{"description":"הובלת דירה 4 חדרים","quantity":1,"unit_price":2500},{"description":"אריזה","quantity":10,"unit_price":45}],"title":"הצעה למעבר דירה","notes":"תוקף ההצעה 14 יום","external_ref":"crm-8812"}'
const res = await fetch("https://api.chat-invoice.co.il/v1/documents", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.CHATINVOICE_API_KEY,
    "Content-Type": "application/json",
    "Idempotency-Key": "crm-8812",
  },
  body: JSON.stringify({
    "type": "quote",
    "customer": {
      "name": "ישראל ישראלי בע\"מ",
      "tax_id": "515123456",
      "email": "billing@example.co.il",
      "phone": "0501234567"
    },
    "items": [
      {
        "description": "הובלת דירה 4 חדרים",
        "quantity": 1,
        "unit_price": 2500
      },
      {
        "description": "אריזה",
        "quantity": 10,
        "unit_price": 45
      }
    ],
    "title": "הצעה למעבר דירה",
    "notes": "תוקף ההצעה 14 יום",
    "external_ref": "crm-8812"
  }),
});
const doc = await res.json();
if (!res.ok) throw new Error(doc.error.code + ": " + doc.error.message);
console.log(doc.number, doc.view_url, doc.pdf_url);
import os, requests

r = requests.post(
    "https://api.chat-invoice.co.il/v1/documents",
    headers={
        "Authorization": f"Bearer {os.environ['CHATINVOICE_API_KEY']}",
        "Idempotency-Key": "crm-8812",
    },
    json={
        "type": "quote",
        "customer": {
            "name": "ישראל ישראלי בע\"מ",
            "tax_id": "515123456",
            "email": "billing@example.co.il",
            "phone": "0501234567"
        },
        "items": [
            {
                "description": "הובלת דירה 4 חדרים",
                "quantity": 1,
                "unit_price": 2500
            },
            {
                "description": "אריזה",
                "quantity": 10,
                "unit_price": 45
            }
        ],
        "title": "הצעה למעבר דירה",
        "notes": "תוקף ההצעה 14 יום",
        "external_ref": "crm-8812"
    },
    timeout=90,
)
doc = r.json()
if not r.ok:
    raise RuntimeError(f"{doc['error']['code']}: {doc['error']['message']}")
print(doc["number"], doc["view_url"], doc["pdf_url"])
$ch = curl_init("https://api.chat-invoice.co.il/v1/documents");
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer " . getenv("CHATINVOICE_API_KEY"),
    "Content-Type: application/json",
    "Idempotency-Key: crm-8812",
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "type" => "quote",
    "customer" => [
      "name" => "ישראל ישראלי בע\"מ",
      "tax_id" => "515123456",
      "email" => "billing@example.co.il",
      "phone" => "0501234567"
    ],
    "items" => [
      [
        "description" => "הובלת דירה 4 חדרים",
        "quantity" => 1,
        "unit_price" => 2500
      ],
      [
        "description" => "אריזה",
        "quantity" => 10,
        "unit_price" => 45
      ]
    ],
    "title" => "הצעה למעבר דירה",
    "notes" => "תוקף ההצעה 14 יום",
    "external_ref" => "crm-8812"
  ], JSON_UNESCAPED_UNICODE),
]);
$doc = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) { throw new Exception($doc["error"]["code"]); }
echo $doc["number"], " ", $doc["view_url"];

The 201 response carries the document number, the totals as computed, a view link and a PDF link:

{
  "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "public_id": "RFayPUSCNKnD",
  "type": "quote",
  "number": 1328,
  "status": "open",
  "date": "2026-09-07",
  "due_date": null,
  "external_ref": "crm-8812",
  "customer": {
    "id": "3f9c2a1e-6b7d-4c8e-9f0a-1b2c3d4e5f60",
    "name": "ישראל ישראלי בע\"מ",
    "tax_id": "515123456"
  },
  "totals": {
    "subtotal": 2500,
    "discount": 0,
    "vat": 450,
    "vat_rate": 18,
    "total": 2950,
    "paid": 0,
    "currency": "ILS"
  },
  "allocation_number": null,
  "allocation": {
    "status": "not_required",
    "number": null,
    "reason": null
  },
  "delivery": {
    "status": "disabled",
    "channel": null,
    "scheduled_for": null
  },
  "view_url": "https://doc.chat-invoice.co.il/view/RFayPUSCNKnD",
  "pdf_url": "https://doc.chat-invoice.co.il/pdf/RFayPUSCNKnD",
  "based_on": null,
  "cancelled_at": null,
  "created_at": "2026-09-07T10:21:44.120Z"
}

A paid tax invoice receipt for an existing customer (customer.id), with a total check:

{
  "type": "tax_invoice_receipt",
  "customer": {
    "id": "3f9c2a1e-6b7d-4c8e-9f0a-1b2c3d4e5f60"
  },
  "items": [
    {
      "description": "שירות חודשי — ספטמבר",
      "quantity": 1,
      "unit_price": 590
    }
  ],
  "payments": [
    {
      "method": "bank_transfer",
      "amount": 590,
      "reference": "778812"
    }
  ],
  "expected_total": 590,
  "external_ref": "order-10021"
}

02Authentication & security

03What a business may issue

The legal type of the business decides which documents are lawful. An exempt dealer (osek patur), an NPO or a public institution does not issue tax invoices — it issues a receipt for a payment and a proforma invoice as a payment request. Such a request gets 422 legal_type_forbidden and no number is consumed. GET /v1/document-types returns only what this business may issue.

typeHebrewEnglishpaymentsdiscountexempt dealer / NPO
quoteהצעת מחירQuotenot allowedyesyes
orderהזמנהOrdernot allowedyesyes
delivery_noteתעודת משלוחDelivery notenot allowedyesyes
return_noteהחזרה מלקוחReturn notenot allowedyesyes
proformaחשבונית עסקהProforma invoicenot allowedyesyes
tax_invoiceחשבונית מסTax invoicenot allowedyesno
tax_invoice_receiptחשבונית מס/קבלהTax invoice receiptrequiredyesno
receiptקבלהReceiptrequirednoyes
credit_noteחשבונית זיכויCredit notenot allowedyesno
donation_receiptקבלה על תרומהDonation receiptrequirednoyes
What you never send: document numbers, VAT rate, VAT exemption, allocation numbers, status, final totals. All of these come from the business settings and Israeli law — an unknown field is rejected with 400.

04Amounts, VAT and payments

methodעבריתextra fields
cashמזומן
bank_transferהעברה בנקאיתreference
credit_cardכרטיס אשראיcard_last_digits, card_type
checkהמחאהcheck_number, check_date, bank_code, branch, account
bit · paybox · paypal · apple_pay · google_payביט · פייבוקס · PayPal · Apple Pay · Google Payreference

05Allocation number (חשבונית ישראל)

A tax invoice, tax invoice receipt or credit note above ₪5,000 net (before VAT) needs an allocation number from the Israel Tax Authority for the customer to reclaim VAT. When the business is connected (tax_authority_connected in /v1/me) we request the number automatically after issuing and bake it into the PDF.

06Delivery to the customer

If the business has auto-send enabled (Settings → Automation), every document issued through the API is sent to the customer on the configured channel — WhatsApp, email or both — exactly like a chat-issued document, including quiet hours (a document issued at night goes out in the morning). delivery.status reports: queued · deferred_quiet_hours (+scheduled_for) · no_recipient (no phone/email on the card) · disabled · suppressed · send_failed.

Prefer to send yourself? Pass "send": false and use view_url (hosted page) or pdf_url (file). The accountant copy follows the business settings regardless.

07Cancel & credit

An issued document is never deleted — its number stays in the book.

{
  "type": "credit_note",
  "based_on": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "customer": {
    "id": "3f9c2a1e-6b7d-4c8e-9f0a-1b2c3d4e5f60"
  },
  "items": [
    {
      "description": "זיכוי — שירות חודשי ספטמבר",
      "quantity": 1,
      "unit_price": 590
    }
  ]
}

08Limits, subscription, versioning

09Errors

Every error has the same shape: a stable code, a message, a hint on what to do, and a retryable flag:

{
  "error": {
    "code": "legal_type_forbidden",
    "message": "This business type may not issue the requested document type.",
    "message_he": "סוג העוסק אינו רשאי להפיק מסמך מסוג זה.",
    "hint": "GET /v1/document-types lists what this business may issue. An exempt dealer (osek patur) issues receipts / proforma invoices instead of tax invoices.",
    "retryable": false,
    "doc_url": "https://api.chat-invoice.co.il/docs/errors#legal_type_forbidden"
  },
  "request_id": "5f1c9b2e-0d4a-4b1e-9d1c-2f7a1b3c4d5e"
}

Full catalog: /docs/errors · as JSON: GET /v1/errors.

ChatInvoice · API v1.0 · updated 2026-09-07 · openapi.yaml · llms.txt