Yesh Invoice API: Issuing Invoices and Receipts Automatically From Your System
Back to blog
automation·September 30, 2026·6 min read·By Yehonatan Saadia

Yesh Invoice API: Issuing Invoices and Receipts Automatically From Your System

A developer's guide to connecting a website, store or CRM to Yesh Invoice: the createDocument route, the secret and userkey Authorization header, the DocumentType and statusID codes, DocumentUniqueKey against duplicates, allocation numbers, and why a failed call still returns status 200.

Key takeaways

  • Documents are created with POST https://api.yeshinvoice.co.il/api/v1.1/createDocument and a JSON body.
  • Authentication is an Authorization header holding a JSON object with secret and userkey, not a bearer token.
  • A failed call returns HTTP 200 with Success: false and a Hebrew ErrorMessage, so check Success, not the status code.
  • DocumentType 1 is a quote, 8 a tax invoice and 9 a tax invoice-receipt - a different numbering from other Israeli invoicing APIs.

The Yesh Invoice (יש חשבונית) API lets a website, online store or CRM issue quotes, tax invoices, receipts and invoice-receipts in Yesh Invoice automatically. It is a JSON REST API: you POST to https://api.yeshinvoice.co.il/api/v1.1/createDocument with an Authorization header that carries your secret key and user key, and the response returns the document number and links to the PDF.

Yesh Invoice is an Israeli invoicing service. Its developer documentation at user.yeshinvoice.co.il/api/doc renders only in a browser, so this guide was built from that page as rendered on 30 September 2026 (API version v1.1, last route update listed as 08/03/2026) and checked against live responses from the API.

How does the Yesh Invoice API work?

Every call is a POST with a JSON body to a route under the API base URL. Authentication is not a bearer token: the Authorization header holds a small JSON object with two fields, secret and userkey.

WhatValue
Base URL (v1.1)https://api.yeshinvoice.co.il/api/v1.1/
Older base (v1)https://api.yeshinvoice.co.il/api/v1/, still the documented path for some routes, such as shareDocument
SandboxThe same v1.1 URL, called with the keys of a separate sandbox account
HeadersContent-Type: application/json and Authorization: {"secret":"...","userkey":"..."}
Response{"Success": ..., "ErrorMessage": ..., "ReturnValue": ...}

A sandbox account is opened from the documentation page, and according to the docs it needs no ID number or company registration; it is meant for development and testing only. Beyond documents, the same API covers customers, products, expenses, payment links, card tokens, reports and lead management. Make.com also lists a Yesh Invoice app with modules such as "Creates an Invoice", "Add a Customer" and "Make an API Call", for teams that prefer a no-code scenario.

Why does a failed Yesh Invoice call return 200?

Yesh Invoice reports errors inside the response body, not in the HTTP status. A call to createDocument without credentials returns status 200 with this body:

{"Success":false,"ErrorMessage":"חסר מפתח SECRET KEY","ReturnValue":null}

With a key that is present but wrong, the status is still 200 and the message changes to מפתח SECRET KEY לא חוקי. The error text is Hebrew, so store and log it as UTF-8. An integration that checks only response.ok records every failure as a success and marks an order as invoiced when no invoice exists. The rule: read Success, treat anything other than true as a failure, and keep ErrorMessage for whoever handles the exception.

Issuing a document from an order, step by step

  1. Open a sandbox account and build against it; switch to the production keys only after a full round trip works.
  2. Set the document header. DocumentType, statusID, CurrencyID and LangID (359 Hebrew, 139 English) are required, along with DateCreated and MaxDate in yyyy-MM-dd HH:mm.
  3. Fill the Customer object. Only Name is required; NameInvoice, NumberID (ת"ז or ח"פ), EmailAddress, Phone, City and CountryCode are optional. Put your own customer id in CustomKey, and pass ID when you already hold the Yesh Invoice customer id (the docs' example sends -1).
  4. Add the items array: Quantity is required, then Price, Name, Sku and vatType, whose default is 4.
  5. For a receipt or invoice-receipt, add payments. Price, TypeID (the payment method code) and DueDate are required; card and bank details go in fields such as CardLastDigits, BankNumber and Reference.
  6. Set DocumentUniqueKey to your order id and POST the body to createDocument.
  7. Check Success. On success, store ReturnValue.id, ReturnValue.docNumber and pdfurl on the order.

The document reaches the customer either at creation time, with SendEmail (plus IncludePDF to attach the file) or SendSMS, or later through shareDocument, which takes the document id. Besides pdfurl (the original), ReturnValue carries copypdfurl (a copy), loyalpdfurl (a true copy), pdf80mm (an 80 mm till slip), a short share link in url and a card payment link in paymenturl.

Which DocumentType and statusID codes does Yesh Invoice use?

DocumentType is a number, and the documentation lists these values:

CodeDocumentHebrew name
1Quoteהצעת מחיר
2Orderהזמנה
3Delivery noteתעודת משלוח
5Proformaחשבון עסקה
6Receiptקבלה
7Purchase orderהזמנת רכש
8Tax invoiceחשבונית מס
9Tax invoice-receiptחשבונית מס/קבלה
10Credit invoiceחשבונית זיכוי
11Donation receiptקבלה לתרומה

There is no code 4, and the numbering does not match other Israeli services: in the Invoice4U API a tax invoice is 1, while in Yesh Invoice 1 is a quote. A mapping copied from another integration issues the wrong document. statusID has its own list: 1 open, 2 closed, 3 cancelled, 4 cancelling document, 5 external document.

What goes wrong in a Yesh Invoice integration

  • Duplicate documents. A timeout on createDocument does not mean nothing was issued. When DocumentUniqueKey is set, the system refuses a second document with the same value and returns an error. The field is limited to 20 characters, so a 36-character UUID has to be shortened to something that stays unique.
  • Two date shapes. The attribute list gives DateCreated as yyyy-MM-dd HH:mm, while the sample body sends yyyy-MM-dd. Use the documented form and confirm it in the sandbox.
  • Copying the sample VAT. vatPercentage defaults to the rate set by Israeli law, but the sample body hard-codes a value. Leave the field out unless you really need to override it.
  • Mixed API versions. createDocument, cancelDocument and approvalIsraelTax are documented under v1.1, shareDocument under v1. Keep the full path per route instead of one shared base.
  • Cancelling. cancelDocument takes the document id and, per the docs, works only for a receipt, donation receipt, tax invoice and tax invoice-receipt. Quotes and orders go through the separate Update Document Status route.
  • Allocation numbers. DontCreateIsraelTaxNumber stops the system requesting an Israeli allocation number, DoNotSendEmailWithoutIsraelTax holds the email when a document has none, and approvalIsraelTax with a docid requests one for an existing document. When a number is required is set by the Tax Authority, not by the API - see the allocation number API.
  • Logging the keys. Both keys ride in the Authorization header, so a debug log of request headers leaks them.

The same pattern against another service is in automating Morning (Green Invoice) through its API, and the wider question of which system talks to which is covered in connecting invoicing software to a CRM.

What to have ready before you start

  • A sandbox account, and the production secret key and user key from the account owner.
  • A decision on which document each sale produces - an invoice-receipt at payment, or a tax invoice first and a receipt later.
  • Customer records with ת"ז or ח"פ where your business needs them.
  • A unique order key of 20 characters or less, and somewhere to store the Yesh Invoice id, docNumber and PDF link against each order.

Sources

#Yesh Invoice#יש חשבונית#Yesh Invoice API#invoicing API#Israel

Frequently asked questions

Does Yesh Invoice have an API?

Yes. Yesh Invoice publishes a JSON REST API, currently version v1.1, at api.yeshinvoice.co.il/api/v1.1/. It covers documents, customers, products, expenses, payment links, card tokens, reports and lead management. Documents are issued with POST createDocument, and a separate sandbox account is available for testing without a registered business.

How do I authenticate to the Yesh Invoice API?

Send an Authorization header whose value is a JSON object with two fields, secret and userkey, next to Content-Type: application/json. It is not a bearer token. A missing key returns HTTP 200 with Success false and the message חסר מפתח SECRET KEY, so a wrong key never shows up as a 401.

How do I stop Yesh Invoice from issuing the same invoice twice?

Set DocumentUniqueKey on every createDocument call to a value tied to the order, such as its id. The system then refuses a second document with the same value and returns an error instead of a new number. The field is limited to 20 characters, so shorten long ids or UUIDs deterministically.

Which DocumentType number is a tax invoice-receipt in Yesh Invoice?

9. A tax invoice is 8, a receipt 6, a credit invoice 10 and a donation receipt 11, while 1 is a quote, 2 an order, 3 a delivery note, 5 a proforma and 7 a purchase order. There is no code 4, and the list differs from other Israeli invoicing APIs, so never reuse another integration's mapping.

Can I test the Yesh Invoice API without a real business?

Yes. The documentation page offers a dedicated sandbox account that, according to Yesh Invoice, needs no ID number or company registration. It is meant only for development and testing. It is called on the same v1.1 base URL, with the sandbox account's own secret and user key, so switching to production is a change of keys.

Keep reading

Related service

Integrations

Make the systems you already pay for talk to each other.

Learn more →←

About the author

Yehonatan Saadia

Freelance automation, web & MVP developer

I'm Yehonatan Saadia, a senior developer who builds business automation, custom websites, and MVPs for small and mid-sized companies across the US, Europe, and Israel. These guides come from real client work, not theory.

Work with me

Have a project like this?

Tell me what you're trying to automate or build. I reply within 24 business hours with a few targeted questions, then we walk through it on a free 30-minute call, with no commitment. You come away with a scope, a timeline and a fixed price - or a straight answer that it isn't worth building.