Soft1 Web Services reference
Web Services | Error codes |
Hints
On successful installation the URL address for calls is:
http://[Registered Name or Serial Number].oncloud.gr/s1services
example :
http://demo.oncloud.gr/s1services
If you call:
http://[Registered Name or Serial Number].oncloud.gr/s1services?ping
you have to see the following message:
Ping from Softone WebModule
ISAPI is working - Module configured
Running in TCP mode [127.0.0.1:22099 Connected]
Also :
1. In the Web Accounts there should be or you have to open an account for a Web Service (AppID).
2. Call the login service with account details (UserName, Password, AppID)
3. Call the authenticate service with the cliectID, company, branch,etc from the login call.
4. Call any other service, using the cliectID from the authenticate service.
To authenticate the web login account (Web Account -> UserName, Password) for a web service. Returns the possible login selections together with a temporary key (clientID) for using the "authenticate" function
Request
{
"service": "login",
"username": "john",
"password":"aitis",
"appId": "2001",
---- optional ---
"LOGINDATE": "2017-12-31 13:59:59",
"TIMEZONEOFFSET": -120
}
Response
{
"success": true,
"clientID": "Wj8T3tvs... ...tlrT8",
"objs": [
{
"COMPANY": "1000",
"COMPANYNAME": "Demo Company SA",
"BRANCH": "1000",
"BRANCHNAME": "Athens",
"MODULE": "0",
"MODULENAME": "Center",
"REFID": "1",
"REFIDNAME": "Administrator"
}
]
}
In case we know all the parameters, we do not need to call the authenticate web service
Request (in case we know all the parameters)
{
"service": "login",
"username": "john",
"password":"aitis",
"appId": "2001",
"COMPANY": "1000",
"BRANCH": "1000",
"MODULE": "0",
"REFID": "1",
---- optional ---
"LOGINDATE": "2017-12-31 13:59:59",
"TIMEZONEOFFSET": -120
}
Response
{
"success": true,
"clientID": "Wj8Te8EqWghDM......... .....wYGtzlyc1At%2bPrG8t"
}
Access to the application with selected login data. Returns the code (clientID), needed for all subsequent calls.
Request
{
"service": "authenticate",
"clientID": "Wj8T3tvs... ...tlrT8",
"COMPANY": "1000",
"BRANCH": "1000",
"MODULE": "0",
"REFID": "1"
}
Response
{
"success": true,
"clientID": "Wj8Te8EqWghDM......... .....wYGtzlyc1At%2bPrG8t"
}
Change web user login password
Request
{
"service": "changePassword",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OLD": "aitis",
"NEW": "aidalxa"
}
Response
{
"success": true
}
Returns all application Business Objects
Request
{
"service": "getObjects",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001"
}
Response
{
"success": true,
"count": 1354,
"objects": [
...
{
"name": "CUSTOMER",
"type": "EditMaster",
"caption": "Customers"
},
...
Returns all tables of a specific Business Object
Request
{
"service": "getObjectTables",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER"
}
Response
{
"success": true,
"count": 10,
"tables": [
{
"name": "CUSTOMER",
"dbname": "TRDR",
"caption": "Customers",
"filltype": "SQL"
},
{
"name": "CUSEXTRA",
"dbname": "TRDEXTRA",
"caption": "Extra customer data",
"filltype": "SQL"
},
...
Returns all fields of a specific table of a specific application Business Object
Request
{
"service": "getTableFields",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER",
"TABLE":"CUSTOMER"
}
Response
{
"success": true,
"count": 136,
"fields": [
{
"name": "SODTYPE",
"alias": "",
"fullname": "CUSTOMER.SODTYPE",
"caption": "Domain",
"size": "2",
"type": "Smallint",
"edittype": "Simple",
"defaultvalue": "",
"decimals": "",
"editor": "",
"readOnly": true,
"visible": false,
"required": true,
"calculated": false
},
{
"name": "TRDR",
"alias": "",
"fullname": "CUSTOMER.TRDR",
"caption": "Customer",
"size": "4",
"type": "AutoInc",
"edittype": "Simple",
"defaultvalue": "",
"decimals": "",
"editor": "",
"readOnly": true,
"visible": false,
"required": true,
"calculated": false
},
{
"name": "CODE",
"alias": "",
"fullname": "CUSTOMER.CODE",
"caption": "Code",
"size": "25",
"type": "String",
"edittype": "Simple",
"defaultvalue": "",
"decimals": "",
"editor": "",
"readOnly": false,
"visible": true,
"required": true,
"calculated": false
},
...
Returns all fields from a specific browser or report dialog, together with their presentation format.
Request
{
"service": "getDialog",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER",
"LIST":""
}
Response
{
"success": true,
"title": "Customers",
"form": [
{
"xtype": "s1cont",
"items": [
{
"xtype": "s1fields",
"flex": 0.50,
"items": [
s1Editor("0;TRDR.CODE;From code;;;1;0;1;1;0;")
]
},
...
Returns the tables and fields of a specific Business Object with their presentation format
Request
{
"service": "getFormDesign",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER",
"FORM":""
}
Response
{
"success": true,
"model": {
...
"form": [
...
Executes a browser and returns a reference code (reqID) for this, together with the browser fields, the number of records and the columns of the browser. Warning. Maximum browser line size is 12Kb
Request
{
"service": "getBrowserInfo",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER",
"LIST":"",
"FILTERS":"CUSTOMER.CODE=30*&CUSTOMER.AFM=046156989&.....",
}
Response
{
"success": true,
"formDesign": "CUSTOMER",
"reqID": "1558138811436159279",
"totalcount": 1,
"fields": [
{
"name": "ZOOMINFO",
"type": "string"
},
{
"name": "CUSTOMER.CODE",
"type": "string"
},
...
],
"columns": [
{
"dataIndex": "CUSTOMER.CODE",
"header": "Code",
"width": 120,
"sortable": true
},
...
Executes a browser and returns a reference code (reqID) for this, together with the browser fields, the number of records, the columns of the browser and limited (LIMIT) number of records.
Request
{
"service": "getBrowserInfo",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER",
"LIST":"",
"VERSION":2,
"LIMIT": 200,
"FILTERS":"CUSTOMER.CODE=30*&CUSTOMER.AFM=046156989&.....",
}
Response
{
"success": true,
"formDesign": "CUSTOMER",
"reqID": "1558138811436159279",
"totalcount": 1,
"fields": [
{
"name": "ZOOMINFO",
"type": "string"
},
{
"name": "CUSTOMER.CODE",
"type": "string"
},
...
],
"columns": [
{
"dataIndex": "CUSTOMER.CODE",
"header": "Code",
"width": 120,
"sortable": true
},
...
"rows": [
[
"CUSTOMER;47",
"1",
"100",
"Soft One Technologies S.A.",
"999863881",
"6 Poseidonos street",
"Kallithea",
"17674",
"+302109484797",
"+302108889999",
"9484094",
"www.softone.gr"
]
...
Returns limited (LIMIT) number of records from the browser with reference code (reqID) starting from record START. Warning. Maximum browser line size is 12Kb
Request
{
"service": "getBrowserData",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"reqID": "1558138811436159279",
"START": 0,
"LIMIT": 20
}
Response
{
"success": true,
"totalcount": 1,
"rows": [
[
"CUSTOMER;47",
"1",
"100",
"Soft One Technologies S.A.",
"999863881",
"6 Poseidonos street",
"Kallithea",
"17674",
"+302109484797",
"+302108889999",
"9484094",
"www.softone.gr"
]
...
Executes the report and returns a reference code for this report (reqID), together with the number of pages.
Request
{
"service": "getReportInfo",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUST_ADDR_BOOK",
"LIST":"",
"FILTERS":"CUSTOMER.CODE=30*;CUSTOMER.AFM=046156989;.....",
}
Response
{
"success": true,
"reqID": "1148974355437296839",
"npages": 1
}
Returns in HTML format the report page PAGENUM from the report with reference code (reqID).
Request
{
"service": "getReportData",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"reqID": "1558138811436159279",
"PAGENUM": 1
}
Response
[HTML DATA]
Returns all data (or the selected ones from LOCATEINFO) of a record of a Business Object.
Request
{
"service": "getData",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER",
"FORM":"",
"KEY":47,
"LOCATEINFO":"CUSTOMER:CODE,NAME,AFM;CUSEXTRA:VARCHAR02,DATE01"
}
Response
{
"success": true,
"readOnly": true,
"data": {
"CUSTOMER": [
{
"CODE": "100",
"NAME": "Soft One Technologies S.A.",
"AFM": "999863881"
...
Insert or Modify the data of a record in a Business Object identified by a KEY. If the KEY is empty or missing a record is inserted.
Request
{
"service": "setData",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER",
"KEY": "47",
"data": {
"CUSTOMER": [
{
"CODE": "100",
"NAME": "Soft One Technologies S.A.",
"AFM": "999863881",
"IRSDATA": "IV Athens",
"EMAIL": "johng@softone.gr",
"WEBPAGE": "www.softone.gr",
"PHONE01": "+302109484797",
"PHONE02": "+302108889999",
"FAX": "9484094",
"ADDRESS": "6 Poseidonos street",
"ZIP": "17674",
"DISTRICT": "Kallithea",
"DISCOUNT": 10,
"REMARKS": "Hello World!"
}
],
"CUSEXTRA": [
{
"VARCHAR01": "Extra 1",
"VARCHAR02": "Extra 2"
}
]
}
}
Response
{
"success": true,
"id":"47"
}
Insert or Modify the data of a record in a Business Object identified by a KEY. Ιn this case the key is a string greater than 10 characters and can be used as a reference from the sender. If the KEY does not exists a record is inserted.
Request
{
"service": "setData",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER",
"KEY": "REFKEY12341234",
"data": {
"CUSTOMER": [
{
"CODE": "100",
"NAME": "Soft One Technologies S.A.",
"AFM": "999863881",
"IRSDATA": "IV Athens",
"EMAIL": "johng@softone.gr",
"WEBPAGE": "www.softone.gr",
"PHONE01": "+302109484797",
"PHONE02": "+302108889999",
"FAX": "9484094",
"ADDRESS": "6 Poseidonos street",
"ZIP": "17674",
"DISTRICT": "Kallithea",
"DISCOUNT": 10,
"REMARKS": "Hello World!"
}
],
"CUSEXTRA": [
{
"VARCHAR01": "Extra 1",
"VARCHAR02": "Extra 2"
}
]
}
}
Response
{
"success": true,
"id":"47"
}
Insert or Modify the data of a record in a Business Object identified by a KEY. If the KEY is empty or missing a record is inserted. After that returns (or the selected ones from LOCATEINFO) of a record of a Business Object for which we input or modify data.
Request
{
"service": "setData",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER",
"KEY": "47",
"VERSION":2,
"LOCATEINFO":"CUSTOMER:CODE,NAME,AFM;CUSEXTRA:VARCHAR02,DATE01",
"data": {
"CUSTOMER": [
{
"CODE": "100",
"NAME": "Soft One Technologies S.A.",
"AFM": "999863881",
"IRSDATA": "IV Athens",
"EMAIL": "johng@softone.gr",
"WEBPAGE": "www.softone.gr",
"PHONE01": "+302109484797",
"PHONE02": "+302108889999",
"FAX": "9484094",
"ADDRESS": "6 Poseidonos street",
"ZIP": "17674",
"DISTRICT": "Kallithea",
"DISCOUNT": 10,
"REMARKS": "Hello World!"
}
],
"CUSEXTRA": [
{
"VARCHAR01": "Extra 1",
"VARCHAR02": "Extra 2"
}
]
}
}
Response
{
{
"success": true,
"id": 47,
"readOnly": false,
"data": {
"CUSTOMER": [
{
"CODE": "100",
"NAME": "Soft One Technologies S.A.",
"AFM": "999863881"
...
Calculates and Returns (or the selected ones from LOCATEINFO) of a record of a Business Object for which we input or modify data. It doesn’t cause any modifications, only calculations like manual input.
Request
{
"service": "calculate",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER",
"KEY": "47",
"LOCATEINFO":"CUSTOMER:CODE,NAME,AFM;CUSEXTRA:VARCHAR02,DATE01"
"data": {
"CUSTOMER": [
{
"CODE": "100",
"NAME": "Soft One Technologies S.A.",
"AFM": "999863881",
"IRSDATA": "IV Athens",
"EMAIL": "johng@softone.gr",
"WEBPAGE": "www.softone.gr",
"PHONE01": "+302109484797",
"PHONE02": "+302108889999",
"FAX": "9484094",
"ADDRESS": "6 Poseidonos street",
"ZIP": "17674",
"DISTRICT": "Kallithea",
"DISCOUNT": 10,
"REMARKS": "Hello World!"
}
],
"CUSEXTRA": [
{
"VARCHAR01": "Extra 1",
"VARCHAR02": "Extra 2"
}
]
}
}
Response
{
"success": true,
"readOnly": true,
"data": {
"CUSTOMER": [
{
"CODE": "100",
"NAME": "Soft One Technologies S.A.",
"AFM": "999863881"
...
Deletes the record of a Business Object.
Request
{
"service": "delData",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"OBJECT": "CUSTOMER",
"FORM":"",
"ΚΕΥ":47
}
Response
{
"success": true,
}
Returns the data from a Selector of the application.
Request
{
"service": "getSelectorData",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"EDITOR": "1|TRDR|TRDR|SODTYPE=13 AND ISPROSP='0'|",
"VALUE": "30*"
}
Response
[
[
"40",
"30.001",
"SoftOne SA",
"999863881"
],
[
"41",
"30.145",
"Peter Smith",
"073586841"
],
[
"42",
"30.102",
"Golden Foods SA",
""
],
[
"43",
"30.103",
"Holding SA",
""
...
Returns that data of the fields of a specific tables
Request
{
"service": "selectorFields",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"TABLENAME": "CUSTOMER",
"KEYNAME": "TRDR",
"KEYVALUE":47,
"RESULTFIELDS":"CODE,NAME,AFM"
}
Response
{
"success": true,
"totalcount": 1,
"rows": [
{
"CODE": "100",
"NAME": "Soft One Technologies S.A.",
"AFM": "999863881"
}
]
}
Execute the SQL with code 'SqlName' from 'SQL Scripts' and get the result data.
Params in the SQL Script are declared as follows: ... AND CODE like '{param1}' AND ...
{
"service": "SqlData",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"SqlName": "myItems",
"param1" : "1000%"
}
Response
{
"success": true,
"totalcount": 9,
"rows": [
{
"MTRL": "1191",
"CODE": "10001",
"NAME": "Τηλεόραση LCD 32\"",
"PRICEW": "900",
"PRICER": "900"
},
{
Transmits the Sales Document myData to aade.gr through the provider and returns all the necessary signatures. For the document preview and the composition of the QRCODE use the following URL formula: "https://einvoice-portal.s1ecos.gr/v/" + [signature field of response]
{
"service": "eInvoice",
"clientID": "Wj8T3tvs... ...tlrT8",
"appId": "2001",
"key": "47",
"template" : "102"
}
Response
{
"success": true,
"data": {
"integritySignature": "5A4E71D37BE71D37BE3A71D37BEE1671D37BECB-2071D37BEADCC71D37BE3804C71D37BE001D6F0",
"signature": "EL000000001-900000-3ACBA9271D37BE8BB4970675D71D37BEEDD226B7-DE8E6273CE9171D37BE5580171D37BEA",
"uid": "A871D37BE12B338666D71D37BEFB71D37BE1FBB",
"mark": 402474254224724,
"authenticationCode": "3876DGHJHJ8976NLINT9785TNLERGI785HLGINO8",
"myDataResponse": .....
......
......
}
Code | Message | Reason |
---|---|---|
-101 | Invalid Request, session has expired! | Web Account time expiration |
-100 | Invalid Request, session has expired! | Deep linking smart command |
-12 | Invalid Web Service call. | |
-11 | Invalid Request. Licence must include a "Web Service Connector" module. | |
-10 | Login fails. Username contains illegal characters. | |
-9 | Invalid Request. Ensure that your request is valid | |
-8 | Invalid request. User account is not active! | |
-7 | Session has expired | Web Account "FinalDate" expired |
-6 | Invalid AppId. Ensure that your request includes a valid AppId | Different AppId in Request and ClientId |
-5 | Web Services Licenses Exceeded! | Exists more than licences account |
-4 | Number of registered devices exceeded! | Exists more than register devices |
-3 | Access denied. Selected module not activated! | |
-2 | Authenticate fails due to invalid credentials. | |
-1 | Invalid request. Please login first | |
0 | Business error | Check error message |
11 | Internal error | Check error message |
12 | Deprecated service | |
13 | Invalid request, "reqID" expired. | |
14 | Invalid request.(WS) | Check SerialNumber |
20 | Internal error | Check error message |
99 | Internal error | Check error message |
101 | Invalid request. Insufficient access rights to perform the operation! | Check Module Or Web Account User Licences |
102 | "ReqId" not found on Server! | |
112 | Invalid editor | |
213 | Invalid request, "reqID" expired. | |
1001 | Please ensure :Username, Password, User is Active and has Administrator right. | |
1002 | Invalid domain ('DOMAIN') or already in use | |
1010 | General Web Account Error | |
2001 | Invalid request, Data does not exist. |