Tätä API-rajapintoja voidaan käyttää Icareus Suite -alustalle tallennetun sisällön hallintaan ja kyselyihin. Kaikki API-kutsut palauttavat tiedot JSON-muodossa.
Parametrit:
| Nimi | Arvo | Vaatimukset | Info | |
|---|---|---|---|---|
| action | 'addUser' | Määrittelee kutsun tyypin | Pakollinen | |
| organizationId | number | Organisaation ID salaista avainta varten | Pakollinen | |
| firstName | string | Käyttäjän etunimi | Pakollinen | |
| lastName | string | Käyttäjän sukunimi | Pakollinen | |
| screenName | string | Käyttäjän screen nimi | Valinnainen | |
| countryId | number | Käyttäjän maa ID | Pakollinen | |
| regionId | number | Käyttäjän alueen ID | Pakollinen | |
| postalCode | string | Käyttäjän postinumero | Pakollinen | |
| cityName | string | Käyttäjän kaupunki | Pakollinen | |
| phoneNumber | string | Käyttäjän puhelinnumero | Pakollinen | |
| emailAddress | string | Käyttäjän sähköposti | Pakollinen | |
| languageId | string | Käyttäjän kieli ID | Valinnainen | Esimerkit: (en_US, en_GB, fi_FI, es_ES ...) |
| comments | string | Vapaat kommentit käyttäjästä | Valinnainen | |
| token | string | | Pakollinen |
Token koostuu 42 merkkiä pitkästä heksadesimaaliarvosta. Arvossa on kaksi eri osaa:
HUOMIO: screenName :n pitää be sisällytetään allekirjoitusten luomiseen jos se syötetään parametrina.
Key - Salainen avain, joka on vain tunnuksen luovassa asiakkaassa ja tunnuksen vahvistavassa palvelimessa ja joka on määritetty organisaatiolle.
Esimerkki:
Version = 1 -> ”01”
organizationId = ”14806”
firstName = ”a”
lastName = ”a”
screenName = ”c” (If provided)
countryId = ”1”
regionId = ”1”
postalCode = ”a”
cityName = ”a”
phoneNumber = ”1”
emailAddress = ”b@icareus.com”
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”secret”
Signature = MD5("14806:a:a:c:1:1:a:a:1:b@icareus.com:48de1dc0:secret") -> ”7b011f04a63b03f32bcf9d9568784036”
Token tulisi olemaan "0148de1dc07b011f04a63b03f32bcf9d9568784036".
Uusi käyttäjätunnus ID ja salasana palautetaan takaisin JSON-lomakkeella:
{"status":"ok","userId":"12345"} |
Virheen sattuessa virheilmoitus palautetaan takaisin JSON-muodossa:
{"status":"error","message":"Incorrect parameters"} |
Parametrit:
| Nimi | Arvo | Vaatimukset | Info |
|---|---|---|---|
| action | 'updateUser' | Identifioi kutsun tyypin | Pakollinen |
| organizationId | number | Organisaation ID salaista avainta varten | Pakollinen |
| userId | number | Identifioi käyttäjän päivitykselle | Pakollinen |
| firstName | string | Käyttäjän etunimi | Pakollinen |
| lastName | string | Käyttäjän sukunimi | Pakollinen |
| countryId | number | Käyttäjän maa ID | Pakollinen |
| regionId | number | Käyttäjän alueen ID | Pakollinen |
| postalCode | string | Käyttäjän postinumero | Pakollinen |
| cityName | string | Käyttäjän kaupunki | Pakollinen |
| phoneNumber | string | Käyttäjän puhelinnumero | Pakollinen |
| emailAddress | string | Käyttäjän sähköposti | Valinnainen |
| comments | string | Kommentteja käyttäjästä | Valinnainen |
| token | string | | Pakollinen |
Token koostuu 42 merkkiä pitkästä heksadesimaaliarvosta. Arvossa on kaksi eri osaa::
Key - Salainen avain, joka on vain tunnuksen luovassa asiakkaassa ja tunnuksen vahvistavassa palvelimessa ja joka on määritetty organisaatiolle.
Esimerkki:
Version = 1 -> ”01”
organizationId = ”14806”
firstName = ”a”
lastName = ”a”
countryId = ”1”
regionId = ”1”
postalCode = ”a”
cityName = ”a”
phoneNumber = ”1”
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”secret”
Signature = MD5("14806:a:a:1:1:a:a:1:48de1dc0:secret") -> ”895a8f4ca9cbf09c315696e44483bd01”
Tällöin token on "0148de1dc0895a8f4ca9cbf09c315696e44483bd01".
Kutsun tulos palautetaan takaisin JSON-muodossa
{"status":"ok"} |
Virheen sattuessa virheilmoitus palautetaan takaisin JSON-muodossa:
{"status":"error","message":"Incorrect parameters"} |
This request will create a new organization. The parameter with name 'token' is used to veryfy the request. The 'action' parameter with value 'addOrganization' should be used to identify that this is add organization request.
Parameters:
| Name | Value | Requirement | Info |
|---|---|---|---|
| action | 'addOrganization' | Identifies the request type | Mandatory |
| organizationId | number | The parent organization ID | Mandatory |
| accountType | string | 'full-organization' or 'trial-organization' | Mandatory |
| name | string | Organization name | Mandatory |
| countryId | number | Organization country ID | Mandatory |
| regionId | number | Organization region ID | Mandatory |
| postalCode | string | Organization postal code | Mandatory |
| cityName | string | Organization city name | Mandatory |
| phoneNumber | string | Organization phone number | Mandatory |
| emailAddress | string | Organization e-mail | Mandatory |
| edition | string | Edition to use. Values: "ismaccount" or "ovp" or "anvia" | Optional |
| servicePlanId | number | Service Plan ID | Optional (Set to 1 if not given) |
| comments | string | Some coments for about that organization | Optional |
| token | string | | Mandatory |
A token consists of 42 character long hex value. The value has three different parts:
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.
Example:
Version = 1 -> ”01”
organizationId = ”14806”
accountType = ”trial-organization”
name = ”b”
countryId = ”1”
regionId = ”1”
postalCode = ”b”
cityName = ”b”
phoneNumber = ”1”
emailAddress = ”b@icareus.com”
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”secret”
Signature = MD5("14806:a:a:c:1:1:a:a:1:b@icareus.com:48de1dc0:secret") -> ”3b11fa5ec323c0766b5b70cd508d5429”
Then token would be "0148de1dc03b11fa5ec323c0766b5b70cd508d5429".
The new organization ID and it's secret key will be returned back in the JSON form:
{"status":"ok","organizationId":"12345","key":"aSaqw2W"} |
In case of failure the error message will be returned back in the JSON form:
{"status":"error","message":"Incorrect parameters"} |
This request will add a user to an organization. The parameter with name 'token' is used to veryfy the request. The 'action' parameter with value 'assignUser' should be used to identify that this is assign user request.
Parameters:
| Name | Value | Requirement | Info |
|---|---|---|---|
| action | 'assignUser' | Identifies the request type | Mandatory |
| organizationId | number | The organization ID | Mandatory |
| userId | number | The user ID to assign | Mandatory |
| token | string | | Mandatory |
A token consists of 42 character long hex value. The value has three different parts:
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.
Example:
Version = 1 -> ”01”
organizationId = 14888
userId = 14861
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”LdVkNSw4eT”
Signature = MD5("14888:14861:48de1dc0:secret") -> ”8e0343669bd45f887908a4c7afdf67c3”
Then token would be "0148de1dc08e0343669bd45f887908a4c7afdf67c3".
The status of the operation will be returned back in the JSON form:
{"status":"ok"} |
In case of failure the error message will be returned back in the JSON form:
{"status":"error","message":"Incorrect parameters"} |
This request will add a user role to the specified user. The parameter with name 'token' is used to veryfy the request. The 'action' parameter with value 'assignUser' should be used to identify that this is assign user request.
Parameters:
| Name | Value | Requirement | Info |
|---|---|---|---|
| action | 'assignUserRole' | Identifies the request type | Mandatory |
| organizationId | number | The organization ID | Mandatory |
| userId | number | The user ID to assign | Mandatory |
| role | string | The role to assign ("user" or "admin") | Mandatory |
| token | string | | Mandatory |
A token consists of 42 character long hex value. The value has three different parts:
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.
Example:
Version = 1 -> ”01”
organizationId = 14888
userId = 14861
role = admin
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”LdVkNSw4eT”
Signature = MD5("14888:14861:admin:48de1dc0:secret") -> ”8e0343669bd45f887908a4c7afdf67c3”
Then token would be "0148de1dc08e0343669bd45f887908a4c7afdf67c3".
The status of the operation will be returned back in the JSON form:
{"status":"ok"} |
In case of failure the error message will be returned back in the JSON form:
{"status":"error","message":"Incorrect parameters"} |
This request will remove existing user. The parameter with name 'token' is used to verify the request. The 'action' parameter with value 'removeUser' should be used to identify that this is remove user request.
Parameters:
| Name | Value | Requirement | Info |
|---|---|---|---|
| action | 'removeUser' | Identifies the request type | Mandatory |
| organizationId | number | The organization ID for the secret key | Mandatory |
| userId | number | The user ID to remove | Mandatory |
| token | string | | Mandatory |
A token consists of 42 character long hex value. The value has two different parts:
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.
Example:
Version = 1 -> ”01”
organizationId = ”14888”
userId = ”14861”
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”LdVkNSw4eT”
Signature = MD5("14888:14861:48de1dc0:secret") -> ”8e0343669bd45f887908a4c7afdf67c3”
Then token would be "0148de1dc08e0343669bd45f887908a4c7afdf67c3".
The status of the operation will be returned back in the JSON form:
{"status":"ok"} |
In case of failure the error message will be returned back in the JSON form:
{"status":"error","message":"Incorrect parameters"} |
This request will remove existing organization. The parameter with name 'token' is used to veryfy the request. The 'action' parameter with value 'removeOrganization' should be used to identify that this is remove organization request.
Parameters:
| Name | Value | Requirement | Info |
|---|---|---|---|
| action | 'removeOrganization' | Identifies the request type | Mandatory |
| organizationId | number | The organization ID to remove | Mandatory |
| token | string | | Mandatory |
A token consists of 42 character long hex value. The value has two different parts:
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.
Example:
Version = 1 -> ”01”
organizationId = ”14888”
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”LdVkNSw4eT”
Signature = MD5("14888:48de1dc0:secret") -> ”5132005a6c7d59a93295ae119c76316b”
Then token would be "0148de1dc05132005a6c7d59a93295ae119c76316b".
The status of the operation will be returned back in the JSON form:
{"status":"ok"} |
In case of failure the error message will be returned back in the JSON form:
{"status":"error","message":"Incorrect parameters"} |
This request will change password for a particular user. The parameter with name 'token' is used to veryfy the request. The 'action' parameter with value 'changePassword' should be used to identify that this is change password request.
Parameters:
| Name | Value | Requirement | Info |
|---|---|---|---|
| action | 'changePassword' | Identifies the request type | Mandatory |
| userId | number | The user ID | Mandatory |
| organizationId | number | The organization ID that the user belongs to | Mandatory |
| token | string | | Mandatory |
| newPassword | string | | Mandatory |
| confirmPassword | string | | Mandatory |
A token consists of 42 character long hex value. The value has two different parts:
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.
Example:
Version = 1 -> ”01”
organizationId = ”14888”
userId = ”12345”
newPassword = ”q1w2e3”
confirmPassword = ”q1w2e3”
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”LdVkNSw4eT”
Signature = MD5("14888:12345:q1w2e3:q1w2e3:48de1dc0:secret") -> ”5132005a6c7d59a93295ae119c76316b”
Then token would be "0148de1dc05132005a6c7d59a93295ae119c76316b".
The status of the operation will be returned back in the JSON form:
{"status":"ok"} |
In case of failure the error message will be returned back in the JSON form:
{"status":"error","message":"Incorrect parameters"} |
This request activates product with given product id for a particular user.
Parameters:
| Name | Value | Requirement | Info |
|---|---|---|---|
| action | 'activateProduct' | Activates the product identified by its product id | Mandatory |
| userId | number | The user ID | Mandatory |
| productId | number | The product ID | Mandatory |
| organizationId | number | The organization ID that the user belongs to | Mandatory |
| validUntil | number | Product validity in ms. validUntil = 0 . Product will be valid till 2050 validUntil = timestamp(ms) . Product valid until timestamp specified No validUntil parameter - Product will be valid until default charging period | Optional |
| token | string | | Mandatory |
A token consists of 42 character long hex value. The value has two different parts:
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.
Example:
Version = 1 -> ”01”
organizationId = ”13509”
userId = ”78121”
productId = ”37542”
validUntil="1455275911724"
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”YJZsWc2VyU”
Signature = MD5("13509:78121:37542:1455275911724:48de1dc0:YJZsWc2VyU") -> ”cf9edae25a6ce47d474d8d5c2309d350”
Then token would be "0148de1dc0cf9edae25a6ce47d474d8d5c2309d350".
The status of the operation will be returned back in the JSON form:
{"message":"ProductId 37542 activated for userId 78121 till Fri Feb 12 11:18:31 GMT 2016", "ShoppingBuyerProductId":79439,"status":"ok"} |
In case of failure the error message will be returned back in the JSON form:
{"status":"error","message":"Incorrect parameters"} |
This request cancel product with given product id for a particular user.
Parameters:
| Name | Value | Requirement | Info |
|---|---|---|---|
| action | 'cancelProduct' | Cancel the product identified by its product id | Mandatory |
| userId | number | The user ID | Mandatory |
| productId | number | The shopping buyer product ID | Mandatory |
| organizationId | number | The organization ID that the user belongs to | Mandatory |
| token | string | | Mandatory |
A token consists of 42 character long hex value. The value has two different parts:
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.
Example:
Version = 1 -> ”01”
organizationId = ”13509”
userId = ”78121”
productId = ”79439”
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”YJZsWc2VyU”
Signature = MD5("13509:78121:79439:48de1dc0:YJZsWc2VyU") -> ”e6cf3674b58b85e55c05d3d7bba3477d”
Then token would be "0148de1dc0e6cf3674b58b85e55c05d3d7bba3477d".
The status of the operation will be returned back in the JSON form:
{"message":"ShoppingBuyerProduct id 79439 cancelled","status":"ok"} |
In case of failure the error message will be returned back in the JSON form:
{"status":"error","message":"Incorrect parameters"} |
This request adds user to a particular device.
Parameters:
| Name | Value | Requirement | Info |
|---|---|---|---|
| action | 'addDeviceUser' | Adds user to a particular device | Mandatory |
| userId | number | The user ID | Mandatory |
| udid | number | The device UDID | Mandatory |
| organizationId | number | The organization ID that the user belongs to | Mandatory |
| token | string | | Mandatory |
A token consists of 42 character long hex value. The value has two different parts:
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.
Example:
Version = 1 -> ”01”
organizationId = ”13509”
userId = ”78121”
udid = ”3721421918681972”
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”YJZsWc2VyU”
Signature = MD5("13509:78121: 3721421918681972:48de1dc0:YJZsWc2VyU") -> ”fe91d0d1f737dd02d81d789c4cf6167e”
Then token would be "0148de1dc0fe91d0d1f737dd02d81d789c4cf6167e".
The status of the operation will be returned back in the JSON form:
{"message":"Device udid 3721421918681972 updated with user id 78121","status":"ok"} |
In case of failure the error message will be returned back in the JSON form:
{"status":"error","message":"Incorrect parameters"} |
This request removes user associated with a particular device.
Parameters:
| Name | Value | Requirement | Info |
|---|---|---|---|
| action | 'removeDeviceUser' | Removes removes associated with a particular device | Mandatory |
| userId | number | The user ID | Mandatory |
| udid | number | The device UDID | Mandatory |
| organizationId | number | The organization ID that the user belongs to | Mandatory |
| token | string | | Mandatory |
A token consists of 42 character long hex value. The value has two different parts:
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.
Example:
Version = 1 -> ”01”
organizationId = ”13509”
userId = ”78121”
udid = ”3721421918681972”
Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”YJZsWc2VyU”
Signature = MD5("13509:78121: 3721421918681972:48de1dc0:YJZsWc2VyU") -> ”fe91d0d1f737dd02d81d789c4cf6167e”
Then token would be "0148de1dc0fe91d0d1f737dd02d81d789c4cf6167e".
{"message":"Removed user from device udid 3721421918681972","status":"ok"} |
In case of failure the error message will be returned back in the JSON form:
{"status":"error","message":"Incorrect parameters"} |