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.
| What | Value |
|---|---|
| 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 |
| Sandbox | The same v1.1 URL, called with the keys of a separate sandbox account |
| Headers | Content-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
- Open a sandbox account and build against it; switch to the production keys only after a full round trip works.
- Set the document header.
DocumentType,statusID,CurrencyIDandLangID(359 Hebrew, 139 English) are required, along withDateCreatedandMaxDateinyyyy-MM-dd HH:mm. - Fill the
Customerobject. OnlyNameis required;NameInvoice,NumberID(ת"ז or ח"פ),EmailAddress,Phone,CityandCountryCodeare optional. Put your own customer id inCustomKey, and passIDwhen you already hold the Yesh Invoice customer id (the docs' example sends -1). - Add the
itemsarray:Quantityis required, thenPrice,Name,SkuandvatType, whose default is 4. - For a receipt or invoice-receipt, add
payments.Price,TypeID(the payment method code) andDueDateare required; card and bank details go in fields such asCardLastDigits,BankNumberandReference. - Set
DocumentUniqueKeyto your order id and POST the body tocreateDocument. - Check
Success. On success, storeReturnValue.id,ReturnValue.docNumberandpdfurlon 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:
| Code | Document | Hebrew name |
|---|---|---|
| 1 | Quote | הצעת מחיר |
| 2 | Order | הזמנה |
| 3 | Delivery note | תעודת משלוח |
| 5 | Proforma | חשבון עסקה |
| 6 | Receipt | קבלה |
| 7 | Purchase order | הזמנת רכש |
| 8 | Tax invoice | חשבונית מס |
| 9 | Tax invoice-receipt | חשבונית מס/קבלה |
| 10 | Credit invoice | חשבונית זיכוי |
| 11 | Donation 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
createDocumentdoes not mean nothing was issued. WhenDocumentUniqueKeyis 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
DateCreatedasyyyy-MM-dd HH:mm, while the sample body sendsyyyy-MM-dd. Use the documented form and confirm it in the sandbox. - Copying the sample VAT.
vatPercentagedefaults 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,cancelDocumentandapprovalIsraelTaxare documented under v1.1,shareDocumentunder v1. Keep the full path per route instead of one shared base. - Cancelling.
cancelDocumenttakes the documentidand, 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.
DontCreateIsraelTaxNumberstops the system requesting an Israeli allocation number,DoNotSendEmailWithoutIsraelTaxholds the email when a document has none, andapprovalIsraelTaxwith adocidrequests 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
Authorizationheader, 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,docNumberand PDF link against each order.
Sources
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.
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 meHave 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.
