Skip to main content
Version: Latest (2.0.0)

Import Indexes

info

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

NodeJS Example File

IndexApiExample.js

Import or Update Records​

Imports or updates records to the selected index

REST APIIndexApi/importIndex
NodeJSimportIndexRecords

ParametersDescriptionParameter Options/valueDefault
myindex
Required
acc- for accounts
itm- for items
'acc'
'itm'
insertnewIf true, allow inserting new records.
If false (and if updexist='true') only update is allowed
true
false
false
updexist If true, allow updates to the records valuetrue
false
false
rows
Required
items/accounts object arrayfor 'acc' - see table below
for 'itm' - see table below

JSON Body Example​

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

This endpoint does not strip nikud; a rejected character fails the row with a database error. See Field Limits.

Accounts Data​

The following parameters should be included in a rows array when "myindex": "acc" (see example below)

FieldName-transTypeתיאורDescriptionDefaults
AccountKey
Required
String (max 15)מפתח חשבוןAccount key
FullNameString (max 50)שםNamenull
SortGroupInteger numberמיוןSorting code0
AddressString (max 50)כתובתAddressnull
CityString (max 20)עירCitynull
Additional fields
ZipString (max 10)מיקודZip codenull
CountryString (max 20)מדינהCountrynull
PhoneString (max 30)טלפוןPhonenull
FaxString (max 30)פקסFaxnull
BalanceCodeInteger number. Must be an existing balance code.
values
קוד מאזןCode for the balance and profit and loss report68
CreditTermsCodeInteger number. Must be an existing credit-terms code.קוד פיצול תשלומיםSplit payment code1
TFtalDiscountFloat number% הנחה ללקוח% customer discount0
VatExampt0 - Not Exempt
1 - Exempt
פטור ממע"מVAT exempt0
FilterString (exactly 5)חתךFiltering^^^^^
WorFString (max 15)עיסוקOccupationnull
DetailsString (max 50)הערותRemarksnull
AvgLatePayInteger numberממוצע איחור תשלומיםAverage delay of payments0
MaxCreditFloat numberתקרת אשראיCredit limit0
MaxCreditCurrencyString (max 5). Must exist in the currencies table.
values
מטבע אשראיCredit currencyCompanyMC i
MaxObligoFloat numberתקרת אובליגוCredit risk limit0
MaxObligoCurrencyString (max 5). Must exist in the currencies table.
values
מטבע אובליגוCredit risk currencyCompanyMC i
CustomerNoteString (max 250)הודעת לקוחMessage for the customernull
AssignKeyString (max 15). Must be an existing account.מפתח חשבון מרכז (מפתח קיים)Central account key (existing account)null
AgentInteger numberסוכןSalesperson0
DeductionPrcFloat number% ניכוי במקור% withholding tax0
DeductionValidDate string – dd/mm/yyyyתוקף ניכוי במקורValidity date of the % withholding tax1991/01/01
BankCodeDigits only, max 2קוד בנקBank codenull
BranchCodeDigits only, max 5סניף בנקBank branch codenull
BankAccountDigits only, max 20מספר חשבון בנקBank account #null
TaxFileNumDigits only, max 9מספר עוסק מורשהVAT registration numbernull
MainAccountInteger number
values
קוד חשבון ראשיCode of the main account26
FixedOrderCostFloat numberמחיר הזמנה קבועFix cost of order0
AverageSupplyPeriodFloat numberזמן אספקה ממוצעAverage supply time0
CostCodeString (max 8). Must be an existing cost code.קוד תמחיר (חייב להיות קיים)Code of cost center (existing code)null
DifferAccString (max 15). Must be an existing account with MainAccount = 28.חשבון הפרשים ( חשבון קיים)Account key for small differences (existing account)null
MatchCurrString (max 5). Must exist in the currencies table.
values
מטבע ההתאמה במקרה של מט"חCurrency for reconciliation (when the price is in foreign currency)CompanyMC i
EmailString (max 50)כתובת דוא"לE-Mail addressnull
DeductFileDigits only, max 20מספר תיק מס הכנסהIncome file numbernull
DocCurrString (max 5). Must exist in the currencies table.
values
מטבע ברירת מחדל למסמכי מט"חDefault value for foreign currencyCompanyEC i
WebSiteString (max 250)אתרWeb sitenull
DeductTypeInteger number. Must be an existing deduction type.
values
סוג ניכוי במקורDeduct Type0
TaxRepCodeInteger number
values
סעיף חשבונאי (6111)Tax Rep Code99990
Computerized0/1/2. Values 1 and 2 require Email on the account.שליחה חשבוניות דיגיטלית
0 = הפקה לא דיגיטלית (הדפסה)
1 = שליחת חשבוניות מקור דיגיטליות והזמנות בדוא"ל, ללא תצוגה לפני השליחה
2 = שליחת חשבוניות מקור דיגיטליות והזמנות בדוא"ל, לאחר תצוגה לפני השליחה (הפקת חשבונית דרך הapi ישלח בתגובה url לתצוגה.)
Sending a digital invoice
0 - Non-digital (print)
1 - Email digital invoices and orders, without preview
2 - Email digital invoices and orders, after a preview (Generating an invoice through the api will return a display url.)
0
MailReceipt0/1/2. Values 1 and 2 require Email on the account.שליחת קבלות דיגיטלית
0 = הפקה לא דיגיטלית (הדפסה)
1 = שליחת קבלות מקור דיגיטליות בדוא"ל, ללא תצוגה לפני השליחה
2 = שליחת קבלות מקור דיגיטליות בדוא"ל, לאחר תצוגה לפני השליחה (הפקת קבלה דרך הapi ישלח בתגובה url לתצוגה.)
Sending a digital receipts
0 - Non-digital (print)
1 - Email digital receipts, without preview
2 - Email digital receipts, after a preview (Generating a receipt through the api will return a display url.)
0
BooksPermission0/1אישור ניהול ספריםBookkeeping authorization0
b2bflag0/1לקוח עסקיb2b0

JSON Example​

{

"myindex": "acc",
"insertnew": "true",
"rows": [
{
"AccountKey": "acc123",
"FullName": "name of acc123",
"SortGroup": "258",
"CostCode": "22",
"AssignKey": "777",
"DeductionPrc": 10.5,
"DeductionValid": "28/02/2019"
},
{
"AccountKey": "8888123664",
"FullName": "8888 name new",
"SortGroup": "1234",
"CostCode": "1"
}
]
}

Items Data​

The following parameters should be included in a rows array when "myindex": "itm"

FieldName-transTypeתיאורDescriptionDefault
ItemKey
Required
String (max 20)מפתח פריטItem key
ItemNameString (max 100)שם פריטItem namenull
ForignNameString (max 100)שם לועזיItem name for export documentsnull
SortGroupInteger numberמיוןSorting code0
FilterString (exactly 10)חתךFiltering^^^^^^^^^^
PriceFloat number, non-negativeמחיר מכירהList price0
Additional fields
CurrencyString (max 5). Must exist in the currencies table.
values
מטבע מכירהList price currencyCompanyMC i
CostCodeString (max 8). Must be an existing cost code.קוד תמחיר (חייב להיות קיים)Code of cost center (existing code)null
VatExampt0 - Not Exempt
1 - Exempt
פטור ממע"מVAT exempt0
DiscountCodeString (max 5)קוד הנחהDiscount codenull
DiscountPrcFloat number% הנחת מבצע% of sale promotion discount0
SalesUnitString (max 5)יחידת מידה מכירותUnit measure for salesnull
PurchaseUnitString (max 5)יחידת מידה רכשUnit measure for purchasenull
LocalizationString (max 50)איתורLocalization (in the storehouse)null
BarCodeString (max 20)ברקודBarcodenull
WeightFloat number, non-negativeמשקלWeight0
VolumeFloat number, non-negativeנפחVolume0
DutyPrcFloat number% מכס% customs0
StockLevelFloat numberרמת מלאיInventory level0
ReorderQuantFloat numberנקודת הזמנהPoint of order0
DefaultWarehouseInteger numberמחסןWarehouse1
DemandPerDayFloat numberצריכה יומיתAverage demand per day0
DemandPerMonthFloat numberצריכה חודשיתAverage demand per month0
StorageCostFloat numberעלות אחסנהCost of storage0
MaxStoragePeriodFloat numberזמן אחסנה מקסימליMaximum storage period0
CostOfShortageFloat numberעלות חוסרCost of shortage0
SalesAccString (max 15). Must be an existing account of the matching type.חשבון הכנסות (חייב להיות קיים במערכת)Sales account (existing account key)null
PurchAccString (max 15). Must be an existing account of the matching type.חשבון הוצאות (חייב להיות קיים במערכת)Expense account (existing account key)null
VatFreeSalesAccString (max 15). Must be an existing account of the matching type.חשבון הכנסות פטור ממע"מ (חייב להיות קיים)VAT exempt sales account (existing account)null
WeightItem0/1דגל לציון פריט שקיל-1 =שקילWeightable item (1- positive)0
StockPerUnit 0, 1, 3 or 7סוג פריט:
0 = פריט רגיל
1 = פריט טבוע
2 = פריט מונה
3 = פריט מכפלה (ר' itemMultiply למטה)
4 = פריט אצווה
5 = פריט איתור
6 = פריט תוקף
7 = פריט אב מטריצה
8 = בן מטריצה
Item type:
0 = Regular item
1 = Serial item
2 = Counter item
3 = Calculated quantity item (see itemMultiply below)
4 = Batch item
5 = Localization item
6 = Expirattion date item
7 = Matrix item
8 = Sub-component in matrix
0
itemMultiplyArray of objects (2-4)
see table below
גורמי מכפלה
חובה כאשר StockPerUnit = 3
Multiplication factors
Required when StockPerUnit = 3

itemMultiply object​

The following parameters should be included in an itemMultiply array, for items where StockPerUnit: 3 (multiplication item). The array must contain between 2 and 4 factor objects.

Important
  • When importing an item with "StockPerUnit": 3 (multiplication item), the itemMultiply array must be sent for that same item, with between 2 and 4 factors.
  • The multiplication factors (FactorID) must already be defined in the system before the item's code is imported/updated.
  • Do not send a packing quantity value directly for these items — use UpPackingQ on the relevant factor instead.
FieldName-transTypeתיאורDescriptionDefault
FactorID
Required
Number or string, no length limitשם גורם מכפלה קיים (חייב להיות מוגדר מראש במערכת)Existing multiplication factor name (must be predefined in the system)
UpPackingQtrue/falseהאם הגורם מעדכן את כמות האריזהWhether this factor updates the packing quantityfalse

JSON Example - Multiplication Item​

{
"myindex": "itm",
"insertnew": "true",
"updexist": "true",
"rows": [
{
"ItemKey": "1מכ",
"itemname": "פריט מכפלה חדש",
"StockPerUnit": 3,
"itemMultiply": [
{
"FactorID": "גורם מכפלה 1",
"UpPackingQ": true
},
{
"FactorID": "גורם מכפלה 2",
"UpPackingQ": false
},
{
"FactorID": "גורם מכפלה 3",
"UpPackingQ": false
},
{
"FactorID": "גורם מכפלה 4",
"UpPackingQ": false
}
],
"SortGroup": 100
}
]
}

Indexs OutputData​

NameOptions
statusCode200 – OK / 500 - Errors
status
errorsOK / Errors: "error description" / No Permission