Hyper Web API - version 4.x
This is our new version of web API, to connect Mobile Apps / Websites / other software to Hyper CRM / ERP.In this page we will present how to use this interface and how to handle errors, using screen shots of Postman.com.
Inside the manual, we provide examples of Request & Response json objects.
An index of all error codes & messages is in the next page.
Connection Tokens
The API system is designed to be installed and work in multiple instances.Each instance will have its own "Connection URL", intended to be used by a specific (external) system.
In regard to Tokens, you should know that the API requires a valid Access Token provided by Hyper's system admin.
You can find elaborate details about the connection methodology & Tokens Here.
Introduction with an Example
Let's start with get_banks_list_json. This function gives you a Banks + Branches index for your Forms.Functions parameters are:
Field | Description |
---|---|
Country |
Full country name. explore hyper's DB table named: SYE_Countries Banks List .
IF you omit this field, or post it empty, then the default is 'Israel'. |
Now let's play with postman. In the following demos I will run HTTP Get (with parameters), Post (url encoded form) and Json post.
Hyper can read all 3 formats. There is no difference as long as all input is Flat (fields list in the same level).
HTTP Get
HTTP Post (url encoded form)
HTTP Post json
Conclusions
-
Hyper is flexible with input method, as long as it is possible, BUT we prefer you send all inputs as json!
Later on there are functions that need structured input with multiple tables and/or records. -
Return of errors has the same format ("ResponseCode" and "ResponseMsgEng"), But successful execution return a different structures according to the case.
In this new API version, we added"ResponseCode":0to all base objects as long with"FunctionName":"OK"that we used to have on previous version. - When you need to upload a file, Always POST "Multipart Form Data" (with Boundary), just like any browser does for ages.
Forms UI - Get value lists from Hyper
In this section we will describe all Server 2 Server functions.We expect you to sync with us once a week (read our timing here).
Ajax Auto Completion functions are NOT here, they are part of the HTML web-app.
Get_Banks_List_Json
This function return a Banks index for a single country, from hyper's tableSYE_Countries Banks List
.
After function is done, it Frees the session. So don't call it with session cookie / SessionID !
Function input:
{
"Country":"israel"
}
* IF you omit the Country field, or post it empty, then the default is 'Israel'.
"Country":"israel"
}
Function output (sample of 6 records):
"Get_Banks_List_Json":{
"ResponseCode":0,
"Banks":[
{
"Code":"54",
"Name":"בנק ירושלים בע\"מ",
"Branches":[
{
"Code":"1",
"Name":"משרד ראשי",
"Address":"הנגב 2 3081000 לוד",
"Open_Date":"2014-01-01",
"Close_Date":""
}
]
},
{
"Code":"50",
"Name":"מרכז סליקה בנקאי בע\"מ",
"Branches":[
{
"Code":"1",
"Name":"משרד ראשי",
"Address":"בן יהודה 25, ת\"ד 3201 תל אביב -יפו",
"Open_Date":"1984-04-25",
"Close_Date":""
}
]
},
{
"Code":"99",
"Name":"בנק ישראל",
"Branches":[
{
"Code":"1",
"Name":"ירושלים",
"Address":"בנק ישראל קרית בן גוריון ירושלים",
"Open_Date":"1949-01-02",
"Close_Date":""
}
]
},
{
"Code":"31",
"Name":"בנק הבינלאומי הראשון לישראל בע\"מ",
"Branches":[
{
"Code":"1",
"Name":"ראש פינה",
"Address":"האגס 0 קניון סנטר הגליל ראש פינה",
"Open_Date":"1981-01-04",
"Close_Date":""
}
]
},
{
"Code":"18",
"Name":"One Zero - הבנק הדיגיטלי בע\"מ",
"Branches":[
{
"Code":"1",
"Name":"לקוחות",
"Address":"עמינדב 3 תל אביב -יפו",
"Open_Date":"2021-01-03",
"Close_Date":""
}
]
},
{
"Code":"22",
"Name":"Citibank",
"Branches":[
{
"Code":"1",
"Name":"ראשי",
"Address":"דרך מנחם בגין 121 מגדל עזריאלי שרונה תל אביב -יפו",
"Open_Date":"1999-12-31",
"Close_Date":""
}
]
}
]
}
"ResponseCode":0,
"Banks":[
{
"Code":"54",
"Name":"בנק ירושלים בע\"מ",
"Branches":[
{
"Code":"1",
"Name":"משרד ראשי",
"Address":"הנגב 2 3081000 לוד",
"Open_Date":"2014-01-01",
"Close_Date":""
}
]
},
{
"Code":"50",
"Name":"מרכז סליקה בנקאי בע\"מ",
"Branches":[
{
"Code":"1",
"Name":"משרד ראשי",
"Address":"בן יהודה 25, ת\"ד 3201 תל אביב -יפו",
"Open_Date":"1984-04-25",
"Close_Date":""
}
]
},
{
"Code":"99",
"Name":"בנק ישראל",
"Branches":[
{
"Code":"1",
"Name":"ירושלים",
"Address":"בנק ישראל קרית בן גוריון ירושלים",
"Open_Date":"1949-01-02",
"Close_Date":""
}
]
},
{
"Code":"31",
"Name":"בנק הבינלאומי הראשון לישראל בע\"מ",
"Branches":[
{
"Code":"1",
"Name":"ראש פינה",
"Address":"האגס 0 קניון סנטר הגליל ראש פינה",
"Open_Date":"1981-01-04",
"Close_Date":""
}
]
},
{
"Code":"18",
"Name":"One Zero - הבנק הדיגיטלי בע\"מ",
"Branches":[
{
"Code":"1",
"Name":"לקוחות",
"Address":"עמינדב 3 תל אביב -יפו",
"Open_Date":"2021-01-03",
"Close_Date":""
}
]
},
{
"Code":"22",
"Name":"Citibank",
"Branches":[
{
"Code":"1",
"Name":"ראשי",
"Address":"דרך מנחם בגין 121 מגדל עזריאלי שרונה תל אביב -יפו",
"Open_Date":"1999-12-31",
"Close_Date":""
}
]
}
]
}
In case of empty list, "ResponseCode" will be 2 and the message format is the same as any other possible error code:
{
"ResponseCode":2,
"ResponseMsgEng":"No Results \/ Data"
}
"ResponseCode":2,
"ResponseMsgEng":"No Results \/ Data"
}
Get_Countries_List_Json
This function return countries list, from hyper's tableSYE_Countries Table
joined with
SYE_Countries Black List
.
After function is done, it Frees the session. So don't call it with session cookie / SessionID !
Function input: nothing beside "AccessToken" as Bearer.
Function output (sample of 4 records):
"Get_Countries_List_Json":{
"ResponseCode":0,
"Countries":[
{
"Name":"Afghanistan",
"Hebrew":"אפגניסטן",
"Terror":"1",
"Block":"1"
},
{
"Name":"Albania",
"Hebrew":"אלבניה",
"Terror":"0",
"Block":"0"
},
{
"Name":"Algeria",
"Hebrew":"אלג'יריה",
"Terror":"1",
"Block":"1"
},
{
"Name":"Spain",
"Hebrew":"ספרד",
"Terror":"0",
"Block":"0"
}
]
}
"ResponseCode":0,
"Countries":[
{
"Name":"Afghanistan",
"Hebrew":"אפגניסטן",
"Terror":"1",
"Block":"1"
},
{
"Name":"Albania",
"Hebrew":"אלבניה",
"Terror":"0",
"Block":"0"
},
{
"Name":"Algeria",
"Hebrew":"אלג'יריה",
"Terror":"1",
"Block":"1"
},
{
"Name":"Spain",
"Hebrew":"ספרד",
"Terror":"0",
"Block":"0"
}
]
}