Skip to main content
Version: 1.0.0

Import Journal transactions

info

See Field Limits for accepted characters, field-length rules, and error behavior shared by every import endpoint.

NodeJS Example File

JurnalApiExample.js

MethodDescription
tmpBatchImports the transactions to a new or already existing temporary batch
chkBatchChecks if there are errors in the batch
newBatchOpens a new batch and returns the number
issueBatchChecks and inputs the temporary batch into the permanent storage

Import to Temp Batch​

Imports the transactions to a new or already existing temporary batch. You can check for errors or input the batch into the permanent storage (if no errors were found).

REST APIjtransApi/tmpBatch
NodeJStmpJurnalBatch

ParametersDescriptionParameter Options/valueDefault
insertolastbInsert the transactions to the last open temporary batch.
If false, open a new batch.
true
false
false
batchNoInsert the transactions to the temporary batch having this number.
If no such temporary batch exists, open a new batch.
Batch numberNew batch
checkcheck the batch for errors and return the batch statustrue
false
false
issueinput the temporary batch into the permanent storage.true
false
false
rows
Required
trans object arraySee table below
moves
Required
sub-transactions array for each rows arraySee table below

JSON Body Example​

{
...

"rows": [
{
...
"moves": [
{
...
},
{
...
}
]
},
{
...
"moves": [
{
...
}
]
}
]
}

FieldName-trans​

note

Description (max 250), Details and Det2 (max 50) are free text. See Field Limits for the characters that are accepted. This endpoint does not strip nikud; a rejected character fails the batch with a database error.

The following parameters should be included in a rows array (see example below)

FieldName-transTypeתיאורDescriptionDefaults
TransDebID
Required
String (max 15)מפתח חשבון חובה ראשיMain debit account key
TransCredID
Required
String (max 15)מפתח חשבון זכות ראשיMain credit account key
DebNameString (max 50). Ignored: always replaced by the account name.שם חשבון חובה ראשיName of the main debit accountDebName of the TransDebID
CredNameString (max 50). Ignored: always replaced by the account name.שם חשבון זכות ראשיName of the main credit accountCredName of the TransCredID
DescriptionString (max 250)פרטיםDetailsEmpty value
Additional fields
ReferanceInteger number (digits only, non-negative, max 2,147,483,647)אסמכתאReferencenull
Ref2Integer number (digits only, non-negative, max 2,147,483,647)אסמכתא שנייהReference-2null
TransTypeString (max 3)קוד סוג תנועהTransaction type codeEmpty value
CurrencyCodeString (max 5). Must exist in the currencies table.
values
מטבעCurrencyCompanyEC i
ValueDateDate string –dd/mm/yyyyתאריך אסמכתאDateToday date
DueDateDate string – dd/mm/yyyyתאריך ערךDue dateToday date
CostCodeString (max 8). Must be an existing cost code.קוד תמחיר (קוד קיים).Cost-center code (existing code)Empty value
SuFFloat number (max 24 characters)סכום כולל חובה או זכותTotal NIS amount (credit or debit)0
SuFDlrFloat number (max 24 characters)סכום כולל מט"חTotal amount in foreign currency0
Ref3Integer number (digits only, non-negative, max 2,147,483,647)אסמכתא שלישיתReferenc-3null
DatF3Date string – dd/mm/yyyyתאריך נוסףAdditional dateToday date
QuantFloat number (max 24 characters)כמותQuantity0
BranchInteger numberסניףBranchThe branch of the API user, otherwise 1
DetailsString (max 50)הערותRemarksnull
Det2String (max 50)הערות נוספותAdditional remarksnull
Osek874String (max 9)מספר עוסק מורשהVAT registration numberEmpty value
TaxApiNumber Digits only, max 250 digits.מספר הקצאהAllocation numbernull
PdfFileUrl String (max 2048)קישור חיצוני לחשבונית (PDF)Link to an external invoice (PDF)null

Sub-transactions for each transaction​

The following parameters should be included in a moves array (see example below)

Sub-transactionsTypeDescriptionתיאור Defaults
AccountKey String (max 15)מפתח חשבוןAccount key
DebitCredit Debit=1, Credit=0חובה/זכותCredit/Debit
Suf Float number (max 24 characters)סכוםNIS amount0
SufDlrFloat number (max 24 characters)סכום מט"חForeign currency amount0

JSON Example​

{
"insertolastb": true,
"check": true,
"batchNo": 17,
"issue": true,
"rows": [
{
"TransDebID": "30000",
"TransCredID": "40001",
"Description": "חשבוניות חייבות במעמ",
"Referance": "36",
"Ref2": "13",
"Ref3": "13",
"TransType": "חל1",
"ValueDate": "13/12/2021",
"DueDate": "13/12/2021",
"SuF": 1803.97,
"moves": [
{
"AccountKey": "30000",
"DebitCredit": "1",
"SuF": 1803.97
},
{
"AccountKey": "40001",
"DebitCredit": "0",
"SuF": 1541.85
},
{
"AccountKey": "60001",
"DebitCredit": "0",
"SuF": 262.12
}
]
},
{
"TransDebID": "30005",
"TransCredID": "45001",
"Description": "חשבוניות פטורות ממעמ",
"Referance": "9",
"Ref2": "13",
"Ref3": "13",
"TransType": "חלפ",
"ValueDate": "13/12/2021",
"DueDate": "13/12/2021",
"SuF": 291.23,
"moves": [
{
"AccountKey": "30005",
"DebitCredit": "1",
"SuF": 291.23
},
{
"AccountKey": "45001",
"DebitCredit": "0",
"SuF": 291.23
}
]
},
{
"TransDebID": "15001",
"TransCredID": "30000",
"Description": "תקבולים לחשבון מזומן",
"Referance": " 31",
"Ref2": " 13",
"Ref3": " 13",
"ValueDate": "13/12/2021",
"DueDate": "13/12/2021",
"SuF": 1745.50,
"moves": [
{
"AccountKey": "15001",
"DebitCredit": "1",
"SuF": 1745.50
},
{
"AccountKey": "30000",
"DebitCredit": "0",
"SuF": 1745.50
}
]
}
]
}

Check Errors​

Checks if there are errors in the batch

REST APIjtransApi/chkBatch
NodeJSchkJurnalBatch

ParametersDescriptionParameter Options/value
batchNo
Required
The batch number you want to check Batch number

JSON Example​

{
"batchNo": 626
}

Open New Batch​

Opens a new batch and return the number

REST API jtransApi/newBatch
NodeJSnewJurnalBatch

Push to Permanent Storage​

Checks and inputs the temporary batch into the permanent storage.

REST APIjtransApi/issueBatch
NodeJSissueJurnalBatch

ParametersDescriptionParameter Options/value
batchNo
Required
The batch number you want to push Batch number

JSON Example​

{
"batchNo": 626
}

Journal transactions OutputData​

NameOptions
statusCode200 – OK / 500 - Errors
status
batchnoBatch number
batch_issueOK if issued
batch_checkOK / Errors
errorsOK / Errors: "error description" / No Permission