Create a new document
Creates a new accounting document (invoice, receipt, tax invoice, etc.) with line items and automatic calculations.
Document Types:
- INVOICE (חשבונית): Standard invoice without VAT
- RECEIPT (קבלה): Payment receipt
- TAX_INVOICE (חשבונית מס): Tax invoice with VAT
- TAX_INVOICE_RECEIPT (חשבונית מס קבלה): Combined tax invoice and receipt (most common in Israel)
- QUOTE (הצעת מחיר): Price quotation
- CREDIT_NOTE (זיכוי): Credit note for refunds/corrections
- DEAL_BILL (חשבון עסקה): Deal bill for osek pator (not charging VAT)
Document Workflow:
- DRAFT: Editable, no document number assigned, can be modified freely
- ISSUED: Immutable, document number assigned, PDF generated, sent to client
- CANCELED: Marked as void, document number preserved for audit trail
VAT Calculation Modes:
- EXCLUSIVE: VAT added on top of line item prices (most common for B2B)
- INCLUSIVE: VAT included in line item prices (common for B2C)
- NONE: No VAT applied (for exempt transactions or private clients)
Required Fields:
- businessId: Multi-tenant scoping
- clientId: Client this document is issued to
- docType: Document type (invoice, receipt, etc.)
- issueDate: Document issue date
- items: At least one line item with description, quantity, unitPrice
Automatic Calculations:
- Line item subtotals: quantity × unitPrice × (1 - discountPercent/100)
- Line item VAT: subtotal × (vatRate / 100) if VAT applicable
- Document subtotal: Sum of all line item subtotals
- Document VAT total: Sum of all line item VAT amounts
- Grand total: subtotal + vatTotal
Example Use Case: Creating a tax invoice receipt for consulting services: "ייעוץ עסקי - 10 שעות" @ ₪150/hour = ₪1,500 subtotal
- 17% VAT (₪255) = ₪1,755 total
Creating Credit Notes (חשבונית זיכוי)
Credit notes are used to reverse or partially refund issued invoices. They follow special rules per Israeli Tax Authority requirements.
Credit Note Requirements:
docType: "CREDIT_NOTE"originalDocumentId: REQUIRED - UUID of the original invoice being credited- Line items should have NEGATIVE amounts (or positive amounts will be converted to negative on finalization)
- The original invoice must be finalized (ISSUED status)
Credit Note Types:
-
Full Credit (ביטול מלא):
- Credit the entire invoice amount
- Use same line items as original with negative quantities/amounts
-
Partial Credit (זיכוי חלקי):
- Credit specific amount or specific items
- Create line items for only the items being credited
Credit Note with Refund vs Non-Refund:
metadata.isRefund: true- Money returned to customer (affects Bank account in journal)metadata.isRefund: false- Reduces Accounts Receivable (customer debt reduced)
Example - Full Credit Note:
{ "businessId": "xxx", "clientId": "yyy", "docType": "CREDIT_NOTE", "originalDocumentId": "original-invoice-uuid", "issueDate": "2025-01-20", "items": [ { "description": "ייעוץ עסקי - 10 שעות (זיכוי)", "quantity": -10, "unitPrice": 150, "vatApplicable": true } ], "notes": "Credit note for invoice #123. Reason: Service cancellation"}Example - Partial Credit Note:
{ "businessId": "xxx", "clientId": "yyy", "docType": "CREDIT_NOTE", "originalDocumentId": "original-invoice-uuid", "issueDate": "2025-01-20", "items": [ { "description": "Partial refund - 3 hours", "quantity": -3, "unitPrice": 150, "vatApplicable": true } ], "notes": "Partial credit for 3 hours. Reason: Service adjustment"}Journal Entry Created:
- DR 4000 (Revenue) - reduces revenue
- DR 2200 (VAT Payable) - reduces VAT liability
- CR 1300 (AR) - if non-refund
- CR 1100 (Bank) - if refund
Validations:
- Original document must be ISSUED (finalized)
- Cannot credit a credit note
- Cannot credit canceled documents
- Credit amount cannot exceed original invoice balance
Business API key, e.g. vuz_ab12cdef... Created via Settings → Integrations → API Keys. Unlike partner keys, a public API key's STRING does not encode its environment — isolation instead comes from a completely separate sandbox database: a key minted on the Sandbox server (above) only ever reads/writes sandbox data and can never see or affect production, regardless of what the key looks like.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/documents" \ -H "Content-Type: application/json" \ -d '{ "businessId": "660e8400-e29b-41d4-a716-446655440000", "docType": "tax_invoice_receipt", "issueDate": "2025-01-15", "subTotal": 2700, "vatTotal": 486, "grandTotal": 3086 }'{ "id": "880e8400-e29b-41d4-a716-446655440000", "createdAt": "2025-11-09T09:31:07.507Z", "updatedAt": "2025-11-09T09:31:07.523Z", "deletedAt": null, "docType": "quote", "docNumber": null, "status": "draft", "issueDate": "2025-11-09", "issueTime": "14:32:07", "documentDate": "2025-11-05", "dueDate": "2025-12-09", "documentDatePeriodClosed": true, "backdateAckAt": "2019-08-24T14:15:22Z", "backdateAckByUserId": "7009be0c-f167-48ba-92d0-be39eb8a403b", "paymentTermsId": "990e8400-e29b-41d4-a716-446655440000", "paymentTermsText": "שוטף + 30", "currency": "ILS", "fxRate": null, "vatMode": "exclusive", "vatRateDefault": 17, "subTotal": "150.00", "vatTotal": "25.50", "grandTotal": "175.50", "clientName": null, "clientTaxId": null, "clientAddress": null, "notes": null, "metadata": null, "originalDocumentId": null, "parentDocumentId": null, "cancelledByDocumentId": null, "pdfPath": null, "publicSlug": "j3AxtCjwHS", "isPublicEnabled": true, "clientPhoneSnapshot": "+972522456789", "branchId": "string", "branchName": "string", "parentClientName": "string", "signedAt": null, "signatureImagePath": null, "signatureName": null, "signatureNote": null, "outstandingAmount": null, "paidAt": null, "paymentStatus": "UNPAID", "documentBalance": 1000, "totalPaymentsReceived": 0, "totalCreditsApplied": 0, "roundingAdjustment": -0.01, "paymentStatusUpdatedAt": null, "paymentLinkUrl": "https://pay.vuz.co.il/abc123def456", "paymentLinkId": "990e8400-e29b-41d4-a716-446655440000", "paymentLinkStatus": "active", "paymentLinkExpiresAt": "2025-12-25T00:00:00.000Z", "isClosed": false, "closedAt": null, "closedBy": null, "isInteractive": false, "interactiveStatus": "negotiation", "publicToken": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6", "publicTokenExpiresAt": "2025-12-25T00:00:00.000Z", "negotiationVersion": 1, "business": { "id": "50596d36-8006-4aeb-a29e-ca78edddb2df", "businessName": "אקו דב", "ownerPhone": "972527253023", "vatRate": 18, "currency": "ILS", "vatNumber": "300160629", "logoPath": null, "address": null, "email": "naor@echo-dev.co.il", "businessMeta": { "logoUrl": "/uploads/logos/fd32d6f3-f790-4999-b30a-df360993123b.jpg" }, "userId": "45b9de13-426f-45f8-98f8-a8a8961acf34", "isActive": true, "isOnTrial": true, "trialEndDate": "2025-11-11" }, "businessId": "50596d36-8006-4aeb-a29e-ca78edddb2df", "client": { "id": "3c3e3b30-924b-4a9f-9fbc-516010d36427", "name": "אקסיומה", "type": "company_ltd", "email": "yosi@exioma.co.il", "phone": "0522456789", "address": "צנחנים 1 רעננה", "vatNumber": "111111111", "contactPerson": "יוסי בוכניק", "notes": "", "isActive": true, "userId": "45b9de13-426f-45f8-98f8-a8a8961acf34", "businessId": "50596d36-8006-4aeb-a29e-ca78edddb2df" }, "clientId": "3c3e3b30-924b-4a9f-9fbc-516010d36427", "createdBy": null, "updatedBy": null, "origin": "web", "originName": "vuz", "items": [ { "id": "990e8400-e29b-41d4-a716-446655440000", "lineNo": 1, "description": "ייעוץ עסקי - 10 שעות", "quantity": "10.000", "unit": "שעות", "unitPrice": "150.00", "discountPercent": "0.00", "vatApplicable": true, "vatRate": 17, "lineSubTotal": "150.00", "lineVatTotal": "25.50", "lineGrandTotal": "175.50", "createdAt": "2025-11-09T09:31:07.518Z", "updatedAt": "2025-11-09T09:31:07.518Z", "deletedAt": null, "documentId": "25cd5cfb-8e24-4dd6-b564-0b3c06cb9056" } ], "payments": [ { "id": "990e8400-e29b-41d4-a716-446655440000", "paymentMethod": "cash", "paymentProvider": "string", "amount": 500, "paymentDate": "2025-11-09", "notes": "Payment for invoice #123", "referenceNumber": "REF-12345", "bankNumber": "12", "branchNumber": "456", "accountNumber": "123456789", "checkNumber": "123456", "dueDate": "2025-02-15", "creditCompanyCode": 2, "cardName": "Visa", "cardLastDigits": "1234", "creditTransactionType": 1, "numberOfInstallments": 3, "tranzilaTransactionId": "6982", "tranzilaAuthCode": "0672865" } ], "aiSummaryData": {}}
