API Version: 1.3.8
application/json header (recommended)⚠️ IMPORTANT:
To acquire an API key for testing, you may register (for free, forever) to demo.ezcount.co.il and get an API key and customize your account.
If you want quick and dirty, and you don’t care about the UI/look of the invoices during development, you may use the following testing API key:
f1c85d16fc1acd369a93f0489f4615d93371632d97a9b0a197de6d4dc0da51bf
We’ve built SDKs to make your life much easier. You can now connect with simple copy-paste from the SDK demo.
You may download the SDKs from the following links:
Requirement Notation:
| API Key | Value Type | Req | Comment |
|---|---|---|---|
api_key |
sha256 | V | Your API key |
api_email |
V | Your valid email | |
developer_email |
V | The developer email, we use it to contact the developer/contact person in case of any API problems/updates | |
type |
numeric | V | Document types: 100 – Order (הזמנה) 200 – Delivery (תעודת משלוח) 210 – Return (תעודת החזרה) 300 – Proforma Invoice (חשבונית עסקה) 305 – Tax Invoice (חשבונית מס) 320 – Invoice Receipt (חשבונית מס קבלה) 330 – Credit Invoice (חשבונית זיכוי) 400 – Receipt (קבלה) 405 – Receipt for donation (קבלה על תרומה) 500 – Purchase order (הזמנת רכש) 9999 – Bid (הצעת מחיר) 9998 – Deposit Approval (קבלת פקדון) 9997 – Deposit Release (קבלת פקדון) |
transaction_id |
string/number/uuid | Recommended | VERY Recommended! A system-wide unique identifier that indicates this doc creation. Will help you to mark the document with your own unique ID. Default is document UUID given by the system. If you send the same transaction_id again, we will not create a new doc and instead will give you link to the original doc |
parent |
string | Optional | Parent doc UUID (in case you want to link between 2 documents) |
date |
date (dd/mm/yyyy) | Optional | Document date, current date will be applied if not set |
lang |
string | Optional | ‘he’ for Hebrew doc (this is default) ‘en’ for English Note: According to the Israeli IRS, the original doc must be in ILS and in Hebrew |
main_currency_iso |
string | Optional | Default ‘ILS’. 3 letters of currency ISO (‘USD’/’EUR’/’GBP’ etc…) |
main_currency_rate |
number | Optional | Default 1 (ILS). If you don’t send this field, the system will calculate the currency based on our rate tables. If your currency ISO doesn’t exist in our system, the rate will be mandatory |
create_org_as_foreign |
boolean 0/1 | Optional | Default 0. Use when you have permission to create original documents in English or foreign currency. Israelis can’t create original documents in English or not in ILS, so we create a copy and send a translated copy to the customer |
description |
string | Optional | Document description |
customer_name |
string | V | Customer name |
customer_email |
string | Required* | Required when dont_send_email is not 1 |
customer_crn |
numeric | Optional | The customer company number/ID (ח.פ. בעברית). Required by law when document value is greater than 5,000 ILS |
customer_address |
string | Optional | Customer address |
customer_phone |
string | Optional | Customer phone |
item |
array | !R | Please refer to item table described below for more details |
price_discount |
numeric (negative) | ?R | The discount in currency, the discount must be given in negative value |
vat |
float (positive) | ?R | The document VAT, if not supplied the current VAT will be used |
price_total |
float (positive) | ! | Mandatory in invoice_receipt, should contain the actual total payments. Can be used for adding discount as total, or validating the data. I.e. if the total is 110, and you set this field as 100, we will recalculate the price so total will be 100 and move the remaining to VAT and discount fields |
tax_deduction |
float (positive) | Optional | Amount of tax deduction. Should be positive number in currency (not in percent). Relevant only in documents with payments (receipts/invoice receipt etc…) |
pay_until |
date (dd/mm/yyyy) | Optional | When this document should been paid |
comment |
text | Optional | Comment inside the document |
email_text |
text | Optional | Email additional text |
dont_send_email |
boolean 0/1 | Optional | Default 0. When set, the system will not send email to the client and will only create a document |
send_copy |
boolean 0/1 | ? | Send copy of the document to the owner of the document. The default value can be controlled from system settings |
print_type |
const (‘PDF’,’PRINTER’) | Optional | ‘PDF’ by default. If you want this document to be printed only and not created as a PDF or sent by email, use ‘PRINTER’. You will NOT get any links as response, and your client would have to manually login into the system and click on “print” to print this document |
forceItemsIntoNonItemsDocument |
Boolean 0/1 | Optional | If you want to create a document where the items are not mandatory (like receipt/donation etc…), please add this field in addition to the items array |
auto_balance |
Boolean 0/1 | Optional | In case you are having items & payments, but there is mismatch between them, we will add discount to overcome it. For example: if the total payments is 1.9 and the total items is 2, we will add a discount of 0.1 to the items. And if the total payments is 2 and the total items is 1.9, then we will have a negative discount (extra charge) of 0.1 to the items |
item must be an array of items. For example, if we want to send 2 items, we will send the following array as JSON:
{
"item": [
{
"catalog_number": "MKT1",
"details": "1 kg of Internet",
"amount": 1,
"price": 12.44
},
{
"details": "infinite amount of love",
"amount": 1,
"price": 99,
"vat_type": "INC"
}
]
}
| API Key | Value Type | Required | Comment |
|---|---|---|---|
catalog_number |
String | Optional | May be a numeric as well |
details |
String | V | Item description |
amount |
Float | V | Item quantity |
price |
Float | V | Item price will be rounded to 2 decimal places: 1.454 → 1.45 1.455 → 1.46 1.456 → 1.46 |
currency |
String | Optional | ‘ILS’ is the default Note: use main_currency_iso instead of this field, it will make your life much easier. This field is good only when you have multiple currencies… |
currency_rate |
Float | Optional | Currency rate relative to Israeli Shekel. Will be rounded to 4 decimal places. Used only when main_currency_iso is ILS |
vat_type |
String (PRE/INC/NON) | Optional | PRE – default (Price is before VAT) INC – Price included VAT NON – The document is a mixed document, and this item is a Non VAT item. Please use it only in mixed VAT documents, while in zero VAT documents just send “VAT 0” |
comment |
String | Optional | Open text field, used to add extra data regarding the item |
discount_price |
Float | Optional | If you want to give a discount specific on this line and not on the document, set here a number |
discount_type |
String (PERCENTAGE, NUMBER) | Optional | PERCENTAGE – discount_price must be a number between 1 to 100 NUMBER – discount_price can be any number between 0 to the sum value of the field |
Must be an array of payment with the following values as JSON:
{
"payment": [
{
"payment_type": "1",
"date": "10/10/2010",
"payment": 250
},
{
"payment_type": 3,
"date": "10/10/2010",
"payment": 250,
"cc_type": 0,
"cc_type_name": "ויזה"
}
]
}
!PT[n] – required for payment type n. For example, a field which is required for checks will be marked as !PT2 because checks is payment type 2
| API Key | Value Type | Required | Comment |
|---|---|---|---|
payment_type |
integer | V | The type of the payment: 1 – cash 2 – check 3 – credit card 4 – bank transfer 9 – Other 91 – Paypal |
date |
date (dd/mm/yyyy) | V | The date of the payment, can be different from the document date |
payment_sum |
decimal | V | The actual payment sum |
currency |
String | Optional | ‘ILS’ is the default |
currency_rate |
Float | Optional | Currency rate relative to Israeli Shekel, default is ‘1’ |
checks_bank_account |
any | Optional | Bank account number |
checks_bank_branch |
any | Optional | Bank branch |
checks_bank_name |
any | !PT2 | Bank name (required for checks) |
checks_number |
any | !PT2 | Check number (required for checks) |
bt_bank_account |
any | !PT4 | Bank transfer – bank account |
bt_bank_branch |
any | !PT4 | Bank transfer – bank branch |
bt_bank_name |
any | !PT4 | Bank transfer – bank name |
cc_type |
integer | !PT3 | 0 – not in this list 1 – ישראכרט (Isracart) 2 – ויזה (Visa) 3 – דיינרס (Diners) 4 – אמריקן אקספרס (American express) 6 – לאומי קארד (Leumi card) 99 – מאסטרקארד (Mastercard) |
cc_type_name |
string | !PT3 | The name of the credit card |
cc_number |
numeric | !PT3 | Last 4 digits |
cc_deal_type |
integer | !PT3 | 1 – רגיל (Normal) 2 – תשלומים (Payments) 3 – קרדיט (Credit) 4 – חיוב נדחה (Delayed) 5 – אחר (other) |
cc_num_of_payments |
integer | !PT3 | How many payment total for this CC |
auto_calc_payments |
Boolean (0/1) | Optional | Wizard: If you send this parameter you won’t need to set line for each payment, and we will calculate the payments and the future dates for you. Note: When calculating the payments:
|
cc_payment_num |
integer | !PT3 | This is payment N / payments. If not supplied or set to 0 you will get תשלומים: cc_num_of_payments instead of תשלום cc_payment_num / cc_num_of_payments |
wt_transaction_id |
string | Optional | Paypal transaction id |
wt_payer_account |
string | Optional | Paypal payer account id |
other_payment_type_name |
String | Optional | Payment of type other – name |
API response will be a JSON string
The API will return error number and related message, for example:
{
"errNum": 1,
"errMsg": "api key is malformatted"
}
{
"pdf_link": "https://demo.ezcount.co.il/front/documents/get/0f2a3f82-afe0-41e9-8235-adb5f17bdfb6",
"pdf_link_copy": "https://demo.ezcount.co.il/front/documents/get/0f2a3f82-afe0-41e9-8235-adb5f17bdfb6/copy",
"doc_number": "60002",
"doc_uuid": "0f2a3f82-afe0-41e9-8235-adb5f17bdfb6",
"sent_mails": [
"demo@example.com"
],
"success": true
}
pdf_link – link to the origin document, this link been sent to client if ordered topdf_link_copy – the copy document (העתק נאמן למקור)doc_number – the document numberdoc_uuid – each document in the system has a unique IDsent_mails – the emails this document has been sent toIn order to move to production:
api_key for this accountdev_master_key field and set there your account api_keyhttps://api.ezcount.co.il/api/createDoc...In order to debug your code we’ve built some quick tools:
https://demo.ezcount.co.il to create some documents from the UI. Our UI uses the API, so you will understand easily and more intuitively the API’s full featuresdebug_key parameter with any value you wish to the request URL:https://demo.ezcount.co.il/api/createDoc?debug_key=A1B2C3https://demo.ezcount.co.il/api/getLastAPIRequestData?debug_key=A1B2C3&api_key=[your api key]&developer_email=your_email@demo.comThe methods described here are more advanced and are not part of our code samples and SDKs, but we do maintain them.
It is possible to create a document on behalf of one of the accounts of the company (in case you have multiple businesses under the same user ID)
https://[demo\www].ezcount.co.il/backoffice/accounts?show_hidden_fields=1ua_uuid field to the invoice creation and set the value to be the UUID of the account you want to create on behalf of (XXXX-XXXX-XXXX-XXXXXXXX)