Skip to main content
Version: 1.0.0

Import Receipts

info

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

MethodDescription
createReceiptImports and updates newreceipts
deleteReceiptDeletes receipt from tables
getReceiptRequest receipt and/or tax receipt from tables
restoreReceiptRestore receipt from tables
cancelReceiptCancel a specific receipt

Create Receipt​

REST APIdocsApi/createRecipt

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

ParametersDescriptionParameter Options/valueDefault
flagwarningsA flag indicating whether to display warningstrue / falsetrue
main_info
Required
stock-
(object name contains data)
See table below
pay_types
Required
Payment methods - 'cheque', 'cash', 'backDeposit', 'credit'See tables below

JSON Body Example​

{
"rows": {
"flagwarnings": true,
"main_info": {
...
},
"pay_types": {
"cheque": {
"chequesArr": [
{
...
}
]
},
"cash": {
...
},
"bankDeposit": {
...
},
"credit": {
...
}
}
}
}

Receipts Data​

The following parameters should be included in a main-info object (see example below)

Name-transTypeDescriptionתיאורDefault
StockIDInteger numberמזהה טבלת stock.
כאשר מעדכנים מסמך, חייבים להעביר מזהה.
i אם שולחים StockID אמצעי התשלום הקיימים ידרסו ע"י מה שנשלח בעדכון.
ID in the stock table.
Required when updating an existing document.
i When sending a StockID, the existing payment methods will be overwritten by what is sent in the update.
0
StockidmatchInteger numberמספר כותרת לסגירה בעת הפקת קבלהDocument (stock) number to be closed/matched when the receipt is issued
doccurr string max (5)
values
מטבעCurrency From company definition
accountkey
Required
string max(15)מפתח חשבוןAccount key
identitystring max(9)ת.ז.IDnull
fullnamestring max(50)שם חשבוןAccount fullname From account definition
addressstring max(100)כתובתAddress From account definition
citystring max(50)עירCity From account definition
phonestring max(30)טלפוןPhone From account definition
remarkstring max(250)הערותRemarks""
DocNumberInteger numberמספר המסמך. הספרור של מסמכים בעלי ספרור קשיח נקבע בעת ההפקהDocument number. When the document numeration isunchangeable, the number is determined when the document is issued. From company definition
documentid
Required
Integer numberסוג מסמך
(לפי הגדרות בטבלת DocumentsDef)
Document type (according to the DocumentDef table)
contactstring max(30)איש קשרcontact""
emailstring max(200)כתובת דוא"ל
שידור כתובת מייל אומר שליחת מקור למייל לא משנה מה מוגדר בחשבון (הפקה לא דיגיטלית או שליחה במייל לאחר תצוגה)
E-Mail address
Sending an email address means the source will be sent to it regardless of what is defined the account (non-digital production or sending by email after display)
""
costcodestring max(8)קוד תמחיר קייםExisting cost center code""
issueStockbooleanהפקת המסמךIssue the documentTRUE
deleteTempif errors found, delete document or nottrue / falsefalse
CopiesInteger numberמספר עותקים להדפסהNumber of print copiesFrom company definition
PrintStyleInteger numberמזהה פורמט הדפסהPrint format IDFrom company definition
Ref3Integer number (max 2,147,483,647)אסמכתא 3Reference-30
sourceTax Float numberסכום ניכוי במקור ע"י לקוחות בש"חWithholding tax amount by customers in NIS0
sourceTaxPrc Float numberאחוז ניכוי במקור ע"י לקוחותWithholding tax percent by customers0
taxSumDlr Float numberסכום ניכוי במקור ע"י לקוחות משוערךEstimated amount of withholding tax by customers0
sourceTaxRate Float numberשער ניכוי במקורWithholding tax rate0
detailsstring max(250)פרטיםDetails""
refInteger numberאסמכתאReference""
valueDateDate string – yyyy-mm-ddתאריךDocument dateCurrent date
dueDateDate string – yyyy-mm-ddתאריך ערךValue dateCurrent date
issueDateDate string – yyyy-mm-ddתאריך הפקהIssue dateCurrent date
agentInteger numberסוכןAgent""
extratext1string max(50)טקסט נוסף 1Extra text 1""
extratext2string max(50)טקסט נוסף 2Extra text 2""
extratext3string max(50)טקסט נוסף 3Extra text 3""
extratext4string max(50)טקסט נוסף 4Extra text 4""
extratext5string max(50)טקסט נוסף 5Extra text 5""
extrasum1Float numberסכום נוסף 1Extra sum 10
extrasum2Float numberסכום נוסף 2Extra sum 20
extrasum3Float numberסכום נוסף 3Extra sum 30
extradate1Date string – yyyy-mm-ddתאריך נוסף 1Extra date 1null
extradate2Date string – yyyy-mm-ddתאריך נוסף 2Extra date 2null
extranum1Integer numberמספר נוסף 1Extra number 10
extranum2Integer numberמספר נוסף 2Extra number 20
note

remark and details (max 250 each) are free text. A rejected character fails the request with numError 237 and a message naming the field. See Field Limits.

Payment Methods​

The following parameters should be included in a pay_types object (see example below)

Cash​

The following parameters should be included in a cash object (see example below)

Name-transTypeDescriptionתיאורDefault
suf
Required
Float numberהסכום שהתקבלThe amount received
sufDlrFloat numberסכום משוערךReevaluated amount0
currencyDlr
Required for foreign
currency documents
string max(5)
values
מטבע השיערוךThe revaluation currency From company definition
detailsstring max(20)פרטיםdetails""
customerIdDigits only, max 9, with a valid check digit. Not required: taken from the account.ת.ז לקוחcustomer Id
JSON Example for a cash payment
{
"rows": {
"flagwarnings": true,
"main_info": {
"accountKey": "30002",
"documentid": "31",
"issueStock": true
},
"pay_types": {
"cash": {
"suf": "10"
}
}
}
}

Credit​

Manual Credit Payment​

The following parameters should be included in a credit object (see example below)

Name-transTypeDescriptionתיאורDefault
maunualcreditflag booleanדגל המציין האם אשראי ידני / רגיל: 1= ידני 0= רגילA flag indicating whether the credit is manual or regular: 1= manual 0=regular0
creditarr
see example below
array of objectsמערך אובייקטי אשראי לתשלום במספר כרטיסי אשראי; לכל פריט אותם שדות כמו בשורות הבאות בטבלה (למשל suf/suF, last4dig, payments וכו׳)When paying with multiple credit cards, include this array of manual credit objects inside credit; each element uses the same parameters as a single manual credit payment in this table.
masofidsmallintמספר מסוףmasof (terminal) idManual/default terminal
suf
Required
float numberסכוםsum0
fstarstotalfloat numberסכום כוכבים /מיילים /נקודות0
typestring max(50). Must be an existing payment type.סוג תשלוםType of paymentDefault
paymentssmallintמספר תשלומיםNumber of paymentsDefined by card type
firstpaymentfloat numberתשלום ראשוןFirst PaymentCalculated based on number of payments
paymentssumfloat numberתשלום קבועFixed paymentCalculated based on number of payments
fvoucher string max(7)מספר אישורconfirmation number
fshovarinteger numberמספר שוברshovar number0
creditfirmstring max(50)חברת אשראיcredit CompanyDefault
last4dig
Required
string max(4)4 ספרות אחרונותLast 4 digits
fvalidmonthDigits, max 2תוקף חודשvalid monthCurrent month
fvalidyearDigits, max 2תוקף שנהvalid yearCurrent year
fidstring max(60)ת.ז (באשראי ידני)""
detailsstring max(20)פרטיםdetails""
sufdlrfloat numberסכום משוערךReevaluated amount0
currencydlr
Required for foreign currency documents
string max(5)
values
מטבע השערוךThe revaluation currency From company definition
istokenbooleanהפקה ללא חלון תשלוםif true, make a transaction without a payment window
read more about Tokenization
false
JSON Example for a credit payment
{
"rows": {
"flagwarnings": true,
"main_info": {
"accountKey": "30002",
"documentid": "31",
"issueStock": true
},
"pay_types": {
"credit": {
"maunualcreditflag": 1,
"suF": 100,
"fvoucher": 3659,
"last4dig": "6598",
"payments": "3",
"type": "תשלומים",
"firstpayment": 30,
"paymentssum": 35,
"istoken": true
}
}
}
}
JSON Example for payment with multiple credit cards
{
"rows": {

"flagwarnings": false,

"main_info": {

"accountkey": "30013",

"fullname": "Israela Israeli",

"address": "'בית הלל 3'",

"remarks": null,

"documentid": 31,

"issuestock": true,

"printstyle": null

},

"pay_types": {

"credit": {

"maunualcreditflag": 1,

"creditarr": [

{

"maunualcreditflag": 1,

"suf": 50,

"type": "רגיל",

"last4dig": "5678"

},

{

"maunualcreditflag": 1,

"suf": 15,

"type": "רגיל",

"last4dig": "1234"

},

{

"maunualcreditflag": 1,

"suF": 100,

"fvoucher": 3659,

"last4dig": "6598",

"payments": "3",

"type": "תשלומים",

"firstpayment": 30,

"paymentssum": 35

},

{

"maunualcreditflag": 1,

"suF": 100,

"fvoucher": 3659,

"last4dig": "6598",

"payments": "3",

"type": "תשלומים",

"firstpayment": 30,

"paymentssum": 35

}

]

}

}

}
}

Cheque​

The following parameters should be included in a cheque object (see example below)

Name-transTypeDescriptionתיאורDefault
pikadonFlagboolזיכוי קופת שיקים לפיקדון במקום קופת שיקים ברירת מחדל Use deposit instead of regular registryfalse
chequesArr
Required
See table belowמערך של שיקיםArray of cheques

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

Name-transTypeDescriptionתיאורDefault
cheqnumber
Required
Integer number (max 2,147,483,647)מספר שקcheque number
banknumber
Required
string max(2)מספר בנקbank number
branch
Required
Digits only, max 5סניףbranch
bankaccnum
Required
Digits only, max 20מספר חשבון בנקBank account number
valuedatedatetimeתאריךdateתאריך נוכחי
suf
Required
float numberסכוםsum
sufdlrfloat numberסכום משוערךReevaluated amount0
CurrencyDlrstring max(5)
values
מטבעcurrency From account definition
detailsstring max(20)פרטיםsdetails""
customeridDigits only, max 9, with a valid check digitת.ז. לקוחcustomer id From account definition
JSON Example for a cheque payment
{
"rows": {
"flagwarnings": true,
"main_info": {
"accountKey": "30002",
"documentid": "31",
"issueStock": true
},
"pay_types": {
"cheque": {
"chequesArr": [
{
"CheqNumber": "125545",
"BankNumber": "12",
"Branch": "5",
"BankAccNum": "785",
"ValueDate": "2020-01-02",
"Suf": "60",
"SufDlr": "3.56",
"CurrencyDlr": "$",
"Details": ""
},
{
"CheqNumber": "125547",
"BankNumber": "12",
"Branch": "5",
"BankAccNum": "785",
"ValueDate": "2020-01-02",
"Suf": "100",
"SufDlr": "3.56",
"CurrencyDlr": "$",
"Details": ""
}
]
}
}
}
}

Bank Deposit​

The following parameters should be included in a bankDeposit object (see example below)

Name-transTypeDescriptionתיאורDefault
suf
Required
float numberסכוםsum0
sufdlrfloat numberסכום משוערךReevaluated amount0
currencydlr
Required for foreign
currency documents
string max(5)
values
מטבע השערוךThe revaluation currency From account definition
bankacc
Required
string max(15)מספר חשבון בנקBank accoun
duedateDate string – yyyy-mm-ddתאריך ערךdue dateCurrent date
detailsstring max(20)פרטיםdetails""
JSON Example for a bank deposit payment
{
"rows": {
"flagwarnings": true,
"main_info": {
"accountKey": "30002",
"documentid": "31",
"issueStock": true
},
"pay_types": {
"bankDeposit": {
"suf": "14",
"bankAcc": "10002"
}
}
}
}

JSON Example​

{
"rows": {
"flagwarnings": true,
"main_info": {
"accountKey": "30002",
"documentid": "31",
"issueStock": true
},
"pay_types": {
"cheque": {
"chequesArr": [
{
"CheqNumber": "125545",
"BankNumber": "12",
"Branch": "5",
"BankAccNum": "785",
"ValueDate": "2020-01-02",
"Suf": "60",
"SufDlr": "3.56",
"CurrencyDlr": "$",
"Details": ""
},
{
"CheqNumber": "125547",
"BankNumber": "12",
"Branch": "5",
"BankAccNum": "785",
"ValueDate": "2020-01-02",
"Suf": "100",
"SufDlr": "3.56",
"CurrencyDlr": "$",
"Details": ""
},
{
"CheqNumber": "127545",
"BankNumber": "17",
"Branch": "5",
"BankAccNum": "785",
"ValueDate": "2020-01-02",
"Suf": "40",
"SufDlr": "3.56",
"CurrencyDlr": "$",
"Details": ""
}
]
},
"cash": {
"suf": "10"
},
"bankDeposit": {
"suf": "14",
"bankAcc": "10002"
},
"credit": {
"maunualcreditflag": 1,
"suF": 100,
"fvoucher": 3659,
"last4dig": "6598",
"payments": "3",
"type": "תשלומים",
"firstpayment": 30,
"paymentssum": 35
}
}
}
}

Receipts OutputData​

NameOptions
stockidNew stockid
statusCode200 (OK) / 500 (error)
statusFor errors only: “error”
messageError Message / "הקבלה עודכנה למאגר זמני"
docUrldocument url

Delete Receipt​

Deletes receipt from tables

REST APIdocsapi/delReceipt/

ParametersTypeDescription
StockID
Required
Integer numberID in the stock table

JSON Example​

{
"stockID": 626
}

Output Data​

{ 
statusCode: 200,
message: 'המסמך נמחק בהצלחה'
}

Get Receipt​

Request receipt and/or tax receipt from tables

REST APIdocsapi/getReceipt/

ParametersTypeDescription
StockID
Required
Integer numberID in the stock table

JSON Example​

{
"stockID": 626
}

Output Data​

{ 
statusCode: 200,
data: req.data
}

Restore Receipt​

Restore receipt from tables

REST APIdocsapi/restoreDoc/

ParametersTypeDescription
doctype
Required
Integer numberDocument type
(according to the DocumentDef table)
StockID
Required
Integer numberID in the stock table

JSON Example​

{
"stockID": 626,
"doctype": 4
}

Output Data​

Success:

{ 
status: 200 ,
fileName: 'קישור למסמך'
}

Error:

{ 
status:500, message:errors : ""
}

Cancel Receipt​

Cancel a specific receipt

REST API/cancelKabala/cancel/

ParametersTypeDescription
StockID
Required
Integer numberID in the stock table

JSON Example​

{
"stockID": 626
}

Output Data​

{ 
pdf: 'link to document pdf',
}