create document
Payload Params
| Element Name | Data Type | Mandatory | Note (default value in bold) |
|---|---|---|---|
| terminal_name | String | Yes | Terminal for which a document is created |
| document_date | Date | No | Current date. Format yyyy-mm-dd |
| document_type | String | No | IR |
| document_currency_code | String | No | ILS |
| vat_percent | Decimal | No | Terminal setting or BOI to document date |
| action | Integer | No | 1 |
| client_company | String | No | my company |
| client_name | String | No | Client name or contact person |
| client_id | String | No | Numeric |
| client_email | String | No | Client email address |
| client_address_line_1 | String | No | Client address line 1 |
| client_address_line_2 | String | No | Client address line 2 |
| client_city | String | No | jerusalem |
| client_country_code | String | No | IL |
| client_zip | String | No | Numeric |
| items | Array | See notes | Array of item documents, depending on document type |
| payments | Array | See notes | Array of payment documents, depending on document type |
| document_language | String | No | heb |
| response_language | String | No | eng |
| related_document_number | Integer | No | |
| relation_type | Integer | See notes | Mandatory if related_document_number is sent or not empty |
| client_receipt_paid_for | String | No | optional, the product or service name, use only when generating a receipt only (RE) |
| created_by_user | String | No | Reference to external username, user_id or any other identifying data (will not be shown on invoice) |
| created_by_system | String | No | Reference to external system identifying data |
Item Params
| Element Name | Data Type | Mandatory | Note (default value in bold) |
|---|---|---|---|
| code | String | No | |
| name | String | Yes | |
| type | String | No | I |
| units_number | Decimal | No | 1 |
| unit_type | Integer | No | 1 |
| unit_price | Decimal | Yes | |
| price_type | String | No | G |
| currency_code | String | No | ILS |
| to_doc_currency_exchange_rate | Decimal | See note | Mandatory if currency code different from document currency |
Payment Params
| Element Name | Data Type | Mandatory | Note (default value in bold) |
|---|---|---|---|
| payment_method | Integer | Yes | |
| payment_date | Date | No | Current date. Format yyyy-mm-dd |
| cc_last_4_digits | String | No | |
| cc_credit_term | Integer | No | |
| cc_installments_number | Integer | No | |
| cc_brand | Integer | No | |
| bank | String | No | |
| bank_branch | String | No | |
| bank_account | String | No | |
| cheque_number | String | No | |
| paypal_account | String | No | |
| paypal_transaction_number | String | No | |
| other_description | String | No | |
| amount | Decimal | Yes | |
| currency_code | String | No | ILS |
| to_doc_currency_exchange_rate | Decimal | See notes | Mandatory if currency code different from document currency |
| txnindex | Integer | No | Add a transaction index to the document |
| canceldoc | String | No | Indicates if the credit document is for a cancelled transaction |
JSON Example
{
"terminal_name": "terminalname",
"document_date": "2021-01-01",
"document_type": "IR",
"action": 1,
"document_language": "heb",
"document_currency_code": "ILS",
"vat_percent": 17,
"client_company": "Test Ltd",
"client_id":"123456789",
"client_name": "Test",
"client_email": "test@test.com",
"client_address_line_1": "test line 1",
"client_address_line_2": "test line 2",
"client_zip": "4545451",
"client_city":"City",
"client_country_code": "IL",
"items": [
{
"type": "I",
"code": "321",
"name": "A",
"price_type": "G",
"unit_price": 70.25,
"units_number": 1,
"unit_type": 1,
"currency_code": "ILS",
"to_doc_currency_exchange_rate": 1
},
{
"type": "I",
"code": "111",
"name": "B",
"price_type": "G",
"unit_price": 30,
"units_number": 1,
"unit_type": 2,
"currency_code": "ILS",
"to_doc_currency_exchange_rate": 1
}
],
"payments": [
{
"payment_method": 1,
"payment_date": "2024-07-06",
"cc_last_4_digits": 1533,
"cc_credit_term": 1,
"cc_brand": 1,
"amount": 100.25,
"currency_code": "ILS"
}
]
}
Request
Headers
{{app_key}}{{new_timestamp}}{{nonce}}{{access_key}}application/jsonBody
application/jsonTerminal for which a document is created
yyyy-mm-dd2024-01-20`eng` English, `heb` Hebrew
heb[Currency table detail](https://docs.tranzila.com/docs/invoices/erwyy1y8szn0h-params-table#currencies)
ILS`1` Debit, `3` Credit
117Numeric
Client email address
Numeric
`eng` English, `heb` Hebrew
engArray of payment documents, depending on document type. </br> Different payment methods require different fields, [as detailed here.](https://docs.tranzila.com/docs/invoices/erwyy1y8szn0h-params-table#payment-fields-requirement-by-payment-method)
Array of item documents, depending on document type
This parameter allows you to add a transaction index to the document. It can be used to correlate the document with transactions in the Reports API.
12345This parameter indicates whether the document is a credit document for a cancelled transaction. If set to `Y`, the created document's number will be reflected in the report response under the `txnfdnumber` parameter.
^[YN]$"Y"Reference to external system identifying data
Mandatory if related_document_number is sent or not empty </br> [Guidelines for parameters](https://docs.tranzila.com/docs/invoices/erwyy1y8szn0h-params-table#document-relation-types)
1Reference to external username, user id or any other identifying data (will not be shown on invoice)
Responses
Document creation response (success or error)
Success Response
When an invoice PDF is successfully created:
status_code: 0= Successstatus_msg: "Success"or"הצלחה"- Document details including unique
retrieval_keyfor PDF access
Error Response
When document creation fails:
status_code: <error_code>(see error codes section)status_msg: <error_message>
All responses return HTTP 200 - check status_code field to determine success/failure.
Response body
1{
2 "status_code": 0,
3 "status_msg": "הצלחה",
4 "enquiry_key": "14451a5f",
5 "document": {
6 "id": "6995",
7 "number": "1000010",
8 "assignment_number": null,
9 "total_charge_amount": 11.9,
10 "currency": "ILS",
11 "created_at": "2025-04-06 14:12:09",
12 "retrieval_key": "ODIyMWM2NGYwZWU1NjAzMzI3NzU2NDMzZDMwZTE4YzU2NTViMDAxNTFiZGE3ZGRjMDU3MzkyYmEyMWQ0MjY1Y2ZjZjM3ZmM5ZTIzNTI3YTQ0YTBkOGI5MjdjYjE4YTg5OGU5NWIyMDFjZWY4NDc1NDk0YmMwYTg3ZmYyMzk5MjgxM0EzUENxNmovUm8xUUJsMk5rK1VnVGtDK0lJZkFEZVpNOXlqbWd3NXVIZU5SZXo4MFU5aEpqV1JMY29sVFFsTVI2NGxBUHFKU0MzbnVOTldPZWhKZz09"
13 }
14}
15