Import Tax Receipts
Create Tax Receipt
REST API | docsApi/createInvRecipt |
The following parameters should be included in a data
object (see example below)
Parameters | Description | Parameter Options/value | Default |
---|---|---|---|
flagwarnings | A flag indicating whether to display warnings | true / false | true |
main_info Required | stock- (object name contains data) | See table below | |
moves Required | object array sub-transactions | See table below | |
Payment Required | Payment methods - 'cheque', 'cash', 'backDeposit', 'credit' | See tables below |
JSON Body Example
{
"data": {
"main_info": {
...
},
"moves": [
{
...
}
],
"Payment": {
"cash": {
...
},
"credit": {
...
},
"bankDeposit": {
...
},
"cheque": {
"chequesArr": [
{
...
},
{
...
}
]
}
}
}
}
FieldName-stock
The following parameters should be included in a main-info
object (see example below)
FieldName-stock | Type | Description | תיאור | Default |
---|---|---|---|---|
StockID | Integer number | מזהה טבלת stock. כאשר מעדכנים מסמך, חייבים להעביר מזהה | ID in the stock table. Required when updating an existing document. | 0 |
DocumentID Required | Integer number | סוג מסמך (לפי הגדרות בטבלת DocumentsDef) | Document type (according to the DocumentDef table) | |
DocNumber | Integer number | מספר המסמך. הספרור של מסמכים בעלי ספרור קשיח נקבע בעת ההפקה | Document number. When the document numeration is unchangeable, the number is determined when the document is issued. | 1 |
issueStock | Boolean | הפקת המסמך | Issue the document | false |
deleteTemp | Boolean | אם נמצאו שגיאות, האם למחוק את המסמך | If errors found, should the document be deleted | false |
AccountKey Required | String (max 15) | מפתח חשבון (לקוח/ספק) | The customer or supplier account key | |
AccountName | String (max 50) | שם חשבון | Account name | null |
Address | String (max 100) | כתובת | Address | null |
City | String (max 50) | עיר | City | null |
Phone | String (max 30) | טלפון | Phone | null |
ValueDate | Date string – yyyy-mm-dd | תאריך | Date | null |
DiscountPrc | Float number | אחוז הנחה כללית במסמך | % of general discount | null |
Tftal Required | Float number | סכום כולל של מסמך | Total amount |
Additional fields
SumDiscount | Float number | סכום ההנחה במסמך | The discount amount | null |
Ref3 | Integer number | אסמכתא 3 | Reference-3 | 0 |
Remarks | String (max 250) | הערות | Remarks | null |
Details | String (max 250) | פרטים | details | null |
Warehouse | Integer number | מחסן | Warehouse | null |
Agent | Integer number | סוכן | Salesperson | null |
CostCode | String (max 8) | קוד תמחיר קיים | Existing cost center code | null |
Quantity | Float number | כמות | Quantity | 0 |
Osek874 | String (max 9) | עוסק מורשה | VAT registration number | null |
InterFlag | Integer number | קליטת נתונים בחנות וירטואלית | Import data for virtual store | 0 |
String (max 45) | כתובת דוא"ל שידור כתובת מייל אומר שליחת מקור למייל לא משנה מה מוגדר בחשבון (הפקה לא דיגיטלית או שליחה במייל לאחר תצוגה) | 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) | null | |
TransAgent | number | העברה בין מחסנים: סוכן מקור | Transfer between warehouses: Source agent | 0 |
TransStore | number | העברה בין מחסנים: מחסן מקור | Transfer between warehouses: Source warehouse | 1 |
CurrencyCode | string(5) values | מטבע | currency | null |
MainRate | number | שער למטבע המסמך | currency rate | null |
EvalCurrencyCode | string(5) values | מטבע לשערוך | The revaluation currency | null |
Rate | number | שער לשערוך בהנהח"ש | Rate for revaluation | null |
Copies | Integer number | מספר עותקים להדפסה | Number of print copies | From company definition |
PrintStyle | Integer number | מזהה פורמט הדפסה | Print format ID | From company definition |
Sub-transactions for each stock ID
The following parameters should be included in a moves
array (see example below)
Sub-transactions | Type | Description | תיאור | Default |
---|---|---|---|---|
StockID | Integer number | מזהה טבלת stock | ID in the stock table | 0 |
MoveID | Integer number | מזהה טבלת stockmoves | ID in the stockmoves table | 0 |
ItemKey Required | String (max 20) | מפתח פריט | Item key | |
ItemName | String (max 100) | שם פריט | Item name | null |
Price | Float number | מחיר | Price | null |
Quantity Required | Float number | כמות | Quantity | |
Tftal | Float number | סה"כ בשורה | Total amount of the line | null |
Additional fields
DiscountPrc | Float number | % הנחה | % discount | null |
Rate | Float number | שער | Currency rate | null |
CurrencyCode | String(max 5) values | מטבע | Currency | null |
CommitionPrc | Float number | % עמלה | % commission | null |
LineNoForSorting | Integer number | מספור שורה | Line ID | null |
Agent | Integer number | סוכן | Salesperson | null |
Warehouse | Integer number | מחסן | Warehouse | null |
Details | String(max 20) | הערות | Remarks | null |
costcode | String (max 8) | קוד תמחיר קיים | Existing cost center code | null |
Counter | null | |||
Reference | Integer number | אסמ2 | Reference-2 | 0 |
packs | Float number | אריזות | Packs | null |
alternum | String (max 18) | מספר חליפי | Alter num | null |
DUEDATE | Date string – yyyy-mm-dd | תאריך ערך | Due date | null |
unit | String(max 5) | יחידת מידה | Unit | null |
ExtraText1 | String(max 50) | הערה נוספת 1 | Extra text 1 | null |
ExtraText2 | String(max 50) | הערה נוספת 2 | Extra text 2 | null |
ExtraSum1 | Float number | סכום נוסף 1 | Extra sum 1 | null |
ExtraSum2 | Float number | סכום נוסף 2 | Extra sum 2 | null |
ExtraDate1 | Date string – yyyy-mm-dd | תאריך נוסף 1 | Extra date 1 | null |
ExtraDate2 | Date string – yyyy-mm-dd | תאריך נוסף 2 | Extra date 2 | null |
BaseMoveId | number | מזהה שורת פריט במסמכי בסיס | id base stockmoves | 0 |
Payment Methods
The following parameters should be included in a Payment
object (see example below)
Cash
The following parameters should be included in a cash
object (see example below)
Name-trans | Type | Description | תיאור | Default |
---|---|---|---|---|
suf Required | Float number | הסכום שהתקבל | The amount received | |
sufDlr | Float number | סכום משוערך | Reevaluated amount | 0 |
currencyDlr Required for foreign currency documents | string max(5) values | מטבע השיערוך | The revaluation currency | From company definition |
details | string max(20) | פרטים | details | "" |
customerId Required | string max(20) | ת.ז לקוח | customer Id |
JSON Example for a cash payment
{
"data": {
"flagwarnings": "0",
"main_info": {
"issueStock": "1",
"deleteTemp": "false",
"DocumentID": "2",
"AccountKey": "30001",
"AccountName": "name acc 111",
"Osek874": "003683208",
"DiscountPrc": "0",
"Tftal":"234"
},
"moves": [
{
"ItemKey": "101",
"ItemName": "name item 11",
"Price": "100",
"Quantity": "2",
"Tftal": "200",
"Details": "my details 11"
}
],
"Payment": {
"cash": {
"suf": "24"
}
}
}
}
Credit
tip
Automatic (instant) Credit Payment
Manual Credit Payment
The following parameters should be included in a credit
object (see example below)
Name-trans | Type | Description | תיאור | Default |
---|---|---|---|---|
maunualcreditflag | boolean | דגל המציין האם אשראי ידני / רגיל: 1= ידני 0= רגיל | A flag indicating whether the credit is manual or regular: 1= manual 0=regular | 0 |
masofid | smallint | מספר מסוף | masof (terminal) id | Manual/default terminal |
suf Required | float number | סכום | sum | |
fstarstotal | float number | סכום כוכבים /מיילים /נקודות | 0 | |
type | string max(50) | סוג תשלום | Type of payment | Default |
payments | smallint | מספר תשלומים | Number of payments | Defined by card type |
firstpayment | float number | תשלום ראשון | First Payment | Calculated based on number of payments |
paymentssum | float number | תשלום קבוע | Fixed payment | Calculated based on number of payments |
fvoucher Required | string max(7) | מספר אישור | confirmation number | |
fshovar | integer number | מספר שובר | shovar number | 0 |
creditfirm | string max(50) | חברת אשראי | credit Company | Default |
last4dig Required | string max(4) | 4 ספרות אחרונות | Last 4 digits | |
fvalidmonth | string max(2) | תוקף חודש | valid month | Current month |
fvalidyear | string max(2) | תוקף שנה | valid year | Current year |
fid | string max(60) | ת.ז (באשראי ידני) | "" | |
details | string max(250) | פרטים | details | "" |
sufdlr | float number | סכום משוערך | Reevaluated amount | 0 |
currencydlr Required for foreign currency documents | string max(5) values | מטבע השערוך | The revaluation currency | From company definition |
istoken | boolean | הפקה ללא חלון תשלום | if true, make a transaction without a payment window
read more about Tokenization | false |
JSON Example for a credit payment
{
"data": {
"flagwarnings": "0",
"main_info": {
"issueStock": "1",
"deleteTemp": "false",
"DocumentID": "2",
"AccountKey": "30001",
"AccountName": "name acc 111",
"Osek874": "003683208",
"DiscountPrc": "0",
"Tftal":"234"
},
"moves": [
{
"ItemKey": "101",
"ItemName": "name item 11",
"Price": "100",
"Quantity": "2",
"Tftal": "200",
"Details": "my details 11"
}
],
"Payment": {
"credit": {
"maunualcreditflag": 1,
"suF": 100.00,
"fvoucher": 3659,
"last4dig": "6598",
"payments": 4,
"firstPayment": "25",
"paymentsSum": "25",
"type": "תשלומים",
"istoken": true
}
}
}
}
Cheque
The following parameters should be included in a cheque
object (see example below)
Name-trans | Type | Description | תיאור | Default |
---|---|---|---|---|
pikadonFlag | bool | זיכוי קופת שיקים לפיקדון במקום קופת שיקים ברירת מחדל | Use deposit instead of regular registry | false |
chequesArr Required | See table below | מערך של שיקים | Array of cheques |
The following parameters should be included in a chequesArr
array (see example below)
Name-trans | Type | Description | תיאור | Default |
---|---|---|---|---|
cheqnumber Required | integer number | מספר שק | cheque number | |
banknumber Required | string max(2) | מספר בנק | bank number | |
branch Required | string max(3) | סניף | branch | |
bankaccnum Required | string max(20) | מספר חשבון בנק | Bank account number | |
valuedate | datetime | תאריך | date | תאריך נוכחי |
suf Required | float number | סכום | sum | |
sufdlr | float number | סכום משוערך | Reevaluated amount | 0 |
CurrencyDlr | string max(5) values | מטבע | currency | From account definition |
details | string max(20) | פרטים | sdetails | "" |
customerid | string max(11) | ת.ז. לקוח | customer id | From account definition |
JSON Example for a cheque payment
{
"data": {
"flagwarnings": "0",
"main_info": {
"issueStock": "1",
"deleteTemp": "false",
"DocumentID": "2",
"AccountKey": "30001",
"AccountName": "name acc 111",
"Osek874": "003683208",
"DiscountPrc": "0",
"Tftal":"234"
},
"moves": [
{
"ItemKey": "101",
"ItemName": "name item 11",
"Price": "100",
"Quantity": "2",
"Tftal": "200",
"Details": "my details 11"
}
],
"Payment": {
"cheque": {
"pikadonFlag": "true",
"chequesArr": [
{
"CheqNumber": "125545",
"BankNumber": "12",
"Branch": "5",
"BankAccNum": "785",
"ValueDate": "2021-01-02",
"Suf": "60",
"SufDlr": "3.56",
"CurrencyDlr": "$",
"Details": ""
},
{
"CheqNumber": "127545",
"BankNumber": "17",
"Branch": "5",
"BankAccNum": "785",
"ValueDate": "2021-01-02",
"Suf": "40",
"SufDlr": "3.56",
"CurrencyDlr": "$",
"Details": ""
}
]
}
}
}
}
Bank Deposit
The following parameters should be included in a bankDeposit
object (see example below)
Name-trans | Type | Description | תיאור | Default |
---|---|---|---|---|
suf Required | float number | סכום | sum | |
sufdlr | float number | סכום משוערך | Reevaluated amount | 0 |
currencydlr Required for foreign currency documents | string max(5) values | מטבע השערוך | The revaluation currency | From account definition |
bankacc Required | string max(15) | מספר חשבון בנק | Bank accoun | |
duedate | datetime | תאריך ערך | due date | Current date |
details | string max(40) | פרטים | details | "" |
JSON Example for a bank deposit payment
{
"data": {
"flagwarnings": "0",
"main_info": {
"issueStock": "1",
"deleteTemp": "false",
"DocumentID": "2",
"AccountKey": "30001",
"AccountName": "name acc 111",
"Osek874": "003683208",
"DiscountPrc": "0",
"Tftal":"234"
},
"moves": [
{
"ItemKey": "101",
"ItemName": "name item 11",
"Price": "100",
"Quantity": "2",
"Tftal": "200",
"Details": "my details 11"
}
],
"Payment": {
"bankDeposit": {
"suf": "10",
"bankAcc": "10001"
}
}
}
}
JSON Example
{
"data": {
"flagwarnings": "0",
"main_info": {
"issueStock": "1",
"deleteTemp": "false",
"DocumentID": "2",
"AccountKey": "30001",
"AccountName": "name acc 111",
"Osek874": "003683208",
"DiscountPrc": "0",
"Tftal":"234"
},
"moves": [
{
"ItemKey": "101",
"ItemName": "name item 11",
"Price": "100",
"Quantity": "2",
"Tftal": "200",
"Details": "my details 11"
}
],
"Payment": {
"cash": {
"suf": "24"
},
"credit": {
"maunualcreditflag": 1,
"suF": 100.00,
"fvoucher": 3659,
"last4dig": "6598",
"payments": 4,
"firstPayment": "25",
"paymentsSum": "25",
"type": "תשלומים"
},
"bankDeposit": {
"suf": "10",
"bankAcc": "10001"
},
"cheque": {
"pikadonFlag": "true",
"chequesArr": [
{
"CheqNumber": "125545",
"BankNumber": "12",
"Branch": "5",
"BankAccNum": "785",
"ValueDate": "2021-01-02",
"Suf": "60",
"SufDlr": "3.56",
"CurrencyDlr": "$",
"Details": ""
},
{
"CheqNumber": "127545",
"BankNumber": "17",
"Branch": "5",
"BankAccNum": "785",
"ValueDate": "2021-01-02",
"Suf": "40",
"SufDlr": "3.56",
"CurrencyDlr": "$",
"Details": ""
}
]
}
}
}
}
Receipts OutputData
Name | Options |
---|---|
stockid | New stockid |
statusCode | 200 (OK) / 500 (error) |
status | For errors only: “error” |
message | Error Message / "הקבלה עודכנה למאגר זמני" |
docUrl | document url |
JSON Exmaple
{
"statusCode": 200,
"stockid": 22772,
"docUrl": ".../HTM795A_wizdb7n197_22772_934416539.pdf",
"tax": "ok",
"data": [
[
{
"StockID": 22772,
"DocumentID": 62,
"DocNumber": 1154,
"status": 1,
"AccountKey": "30002",
"accountname": "tourist's name",
"Address": "toursit's adrress",
"City": "toursit's city",
"Phone": "toursit's phone",
"batch": 9999,
"ValueDate": "2024-06-20",
"duedate": "2024-06-20",
"paydate": "1990-01-01",
"copies": 2,
"DiscountPrc": 0,
"Tftal": 200,
"vatprc": 0,
"tftalvatfree": 0,
"tftalvat": 200,
"reference": null,
"remarks": null,
"printstyle": 1,
"Details": null,
"Agent": 3,
"currency": "$",
"rate": 3.375,
"mainrate": 3.375,
"issuedate": "2024-06-20"
}
],
[
{
"StockID": 22772,
"moveid": 34763,
"itemkey": "1202",
"itemname": "name item 11",
"Warehouse": 1,
"Agent": 3,
"Details": "my details 11",
"duedate": "2024-06-20",
"status": 1,
"CurrencyCode": "אירו",
"rate": 3.375,
"Price": 100,
"Quantity": 2,
"Tftal": 200,
"DiscountPrc": 0
}
]
]
}