הנהלת ספרים ישראלית כשירות: מספור רציף, PDF חתום, מבנה אחיד ומספרי הקצאה, מאחורי REST נקי. התוכנה רשומה במרשם התוכנות של רשות המסים, כך שהמסמך שהקוד שלכם מפיק הוא מסמך חשבונאי לכל דבר.
BASE=https://api.billos.co.il/v1 # draft a ₪350 invoice/receipt, paid by card curl -X POST $BASE/businesses/$BID/documents \ -H "X-Api-Key: bk_live_..." -H "Idempotency-Key: order-1001" \ -d '{ "docType": 320, "priceMode": "gross", "party": { "name": "דנה לוי", "phone": "0521111111" }, "lines": [{ "description": "איפור ערב", "quantity": 1, "unitPriceExVat": 35000 }], "payments": [{ "method": 3, "amount": 35000 }] }' # issue: the legal number is assigned and the PDF is signed curl -X POST $BASE/businesses/$BID/documents/$DOC/issue \ -H "X-Api-Key: bk_live_..."
const BASE = 'https://api.billos.co.il/v1' const billos = (path, body) => fetch(BASE + path, { method: 'POST', headers: { 'X-Api-Key': KEY, 'Content-Type': 'application/json' }, body: JSON.stringify(body), }).then((r) => r.json()) const { document } = await billos(`/businesses/${bid}/documents`, { docType: 320, priceMode: 'gross', party: { name: 'דנה לוי', phone: '0521111111' }, lines: [{ description: 'איפור ערב', quantity: 1, unitPriceExVat: 35000 }], payments: [{ method: 3, amount: 35000 }], }) const issued = await billos( `/businesses/${bid}/documents/${document.id}/issue`) issued.document.docNumber // 1042
import os, requests API = "https://api.billos.co.il/v1" H = {"X-Api-Key": os.environ["BILLOS_KEY"]} doc = requests.post(f"{API}/businesses/{bid}/documents", headers=H, json={ "docType": 320, "priceMode": "gross", "party": {"name": "דנה לוי", "phone": "0521111111"}, "lines": [{"description": "איפור ערב", "quantity": 1, "unitPriceExVat": 35000}], "payments": [{"method": 3, "amount": 35000}], }).json()["document"] url = f"{API}/businesses/{bid}/documents/{doc['id']}/issue" issued = requests.post(url, headers=H).json() print(issued["document"]["docNumber"]) # 1042
$ npm i -g billos $ billos login a code appears; approve it in the console, the key arrives here $ billos invoice --customer "דנה לוי" --amount 350 --type invoice-receipt חשבונית מס/קבלה 1042 · ₪350.00 · דנה לוי $ billos docs --json | jq '.documents[0].docNumber' 1042
// Claude, Cursor, or anything that speaks MCP. Nine tools, the same key, the same ledger. { "mcpServers": { "billos": { "url": "https://api.billos.co.il/mcp", "headers": { "X-Api-Key": "bk_live_..." } } } } // "תוציא קבלה על 350 שקל לדנה לוי" → create_document → חשבונית מס/קבלה 1042
{ "document": { "id": "doc_k3t8…", "docNumber": 1042,
"status": "issued", "totalIncVat": 35000, "vatAmount": 5339 } }
{ "id": "del_8f2…", "event": "document.issued", "mode": "live",
"data": { "documentId": "doc_k3t8…", "docNumber": 1042,
"totalIncVat": 35000, "partyName": "דנה לוי" } }
עסק נפתח פעם אחת. אחריו כל מסמך הוא טיוטה שאפשר לתקן חופשי, ואז הפקה: המספר החוקי מוקצה, הקובץ נחתם ומוקפא. אין עריכה אחרי הפקה; התיקון היחיד הוא זיכוי, וכך גם החוק רוצה.
שם, ע.מ (נבדק בספרת ביקורת) וסוג העוסק. מכאן נגזרים סוגי המסמכים המותרים ושיעור המע״מ.
{ "name": "סטודיו נועה",
"taxId": "123456782",
"dealerType": "murshe" }
לקוח, שורות ותקבולים באגורות. עם Idempotency-Key אותה הזמנה לא תפתח שני מסמכים. תצוגה מקדימה זמינה בכל שלב.
{ "docType": 320,
"priceMode": "gross",
"lines": [{ "description": "…",
"unitPriceExVat": 35000 }],
"payments": [{ "method": 3,
"amount": 35000 }] }
המספר הרציף הבא, חתימה, קובץ מקור והעתק. מכאן המסמך קפוא במסד הנתונים עצמו, ותיקון הוא זיכוי מקושר.
→ { "docNumber": 1042,
"status": "issued" }
POST …/prints { "kind": "origin" }
POST …/credit-note
כל מה שרואה חשבון מבקש בסוף שנה כבר קיים כנקודת קצה. מה שהאפליקציה של BillOS עושה, ה-API עושה, כי זה אותו ספר.
חשבונית מס, חשבונית מס/קבלה, קבלה וזיכוי, בקודים של רשות המסים. מחירים כולל או לפני מע״מ, הנחת מסמך, ניכוי במקור. מקור נמסר פעם אחת; הדפסה חוזרת היא העתק מאותו צילום קפוא.
ספר תקבולים ותשלומים: קבלת ספק כטיוטה, רישום בלתי הפיך, תיקון בסטורנו. שולחים בייטים של צילום קבלה ומקבלים טיוטה ממולאת: ספק, סכום, מע״מ, תאריך, מס' מסמך.
document.issued, pdf_ready, allocation_assigned, expense.recorded, export.completed, business.status_changed. חתימה בסגנון Stripe, מזהה משלוח לדדופ, ניסיונות חוזרים עם backoff.
מפתח bk_test_ עונה ממסד נתונים נפרד: אותו URL, אותן תשובות, אותם קודי שגיאה. PDF עם סימן מים, בלי חתימה, בלי רשות המסים. כל תשובה אומרת מאיפה היא באה.
קובץ OPENFRMT 1.31 לביקורת, דוח רציפות מספור, גיבוי יזום עם אינדקס ו-sha256 לכל קובץ, ו-CSV קריא לרואה החשבון. הפלטים שהוראות ניהול ספרים דורשות, בקריאה.
מספרי הקצאה מרשות המסים לעסקאות מעל הסף, אוטומטית אחרי ההפקה. העסק מאשר פעם אחת בדפדפן; המספר נכנס למסמך, וגם ל-webhook, כשהוא מגיע.
המפתח שלכם פותח את שלושתם. סוכן AI שמוציא קבלה ב-MCP עובר דרך אותם גבולות, אותן תקרות ואותו ספר כמו קריאת REST, ומה שאפשר ליצור אפשר גם לתקן.
JSON, אגורות שלמות, Idempotency-Key, OpenAPI 3 מלא.
GET /v1/businesses POST /v1/businesses/:bid/documents POST /v1/businesses/:bid/documents/:id/issue POST /v1/businesses/:bid/documents/:id/prints POST /v1/businesses/:bid/expenses/ocr POST /v1/webhooks GET /v1/usage → docs.billos.co.il/openapi.json
תשעה כלים, פעלים עסקיים ולא מראה של נתיבים.
list_businesses create_document issues + returns the PDF link cancel_document the credit note, the only undo find_or_create_customer list_customers list_documents record_expense a draft on a pending account list_expenses financial_summary → https://api.billos.co.il/mcp
אפס תלויות, שקלים בקצה, --json לכל פקודה.
$ billos login $ billos use biz_… $ billos invoice --customer "שם" --amount 350 $ billos cancel doc_… --reason "…" $ billos expense --supplier "שם" --amount 118 --vat 18 $ billos docs --from 2026-01-01 --json | jq $ billos usage → npm i -g billos
הוראות ניהול ספרים אינן מדריך למשתמש שלכם. הן מומשו כאן, במסד הנתונים ובקבצים עצמם, ולא בהנחיה למפתח.
הרשמה מהקונסול, אימות ב-SMS, ומפתח בדיקה על המסך. מפתח live מונפק אחרי אישור קצר שלנו, כי הוא מפיק מסמכים אמיתיים בספרים אמיתיים.