The API is used to manage Icareus Suite users and organisations.
API Calls flow to add sub organization:
Parameters:
| Name | Value | Requirement | Info |
|---|---|---|---|
| action | 'addOrganization' | Identifies the request type | Mandatory |
| organizationId | number | The parent organization ID | Mandatory |
| accountType | string | 'full-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 | "ismaccount" | Mandatory |
| templateId | number | Please contact Icareus support to get your templateId | 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.
Required parameter for creating token are
Example cURL request
Example URL request
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:
All 3 API calls need to be made to add an user to a newly created organization
/delegate/account
This request will create a new user. The parameter with name 'token' is used to verify the request. The 'action' parameter with value 'addUser' should be used to identify that this is add user request.
Parameters:
| Name | Value | Requirement | Info | |
|---|---|---|---|---|
| action | 'addUser' | Identifies the request type | Mandatory | |
| organizationId | number | Organization Id received from "addOrganization" response API call | Mandatory | |
password | string | Password of user | Mandatory | |
| firstName | string | User first name | Mandatory | |
| lastName | string | User last name | Mandatory | |
| screenName | string | User screen name | Optional | |
| countryId | number | User country ID | Mandatory | |
| regionId | number | User region ID | Mandatory | |
| postalCode | string | User postal code | Mandatory | |
| cityName | string | User city name | Mandatory | |
| phoneNumber | string | User phone number | Mandatory | |
| emailAddress | string | User e-mail | Mandatory | |
| languageId | string | language ID for the user | Optional | Example: (en_US, en_GB, fi_FI, es_ES ...) |
| comments | string | Some comnents about that user | Optional | |
| token | string | | Mandatory |
A token consists of 42 character long hex value. The value has two different parts:
Note: screenName must be included in signature generation if it is provided as a parameter
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”
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”
Then token would be "0148de1dc07b011f04a63b03f32bcf9d9568784036".
The new user ID will be returned back in the JSON form:
{"status":"ok","userId":"12345"} |
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 verify 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 | Organization Id received from "addOrganization" response | Mandatory |
| userId | number | userId received from "addUser" response | 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 | Organization Id received from "addOrganization" response | Mandatory |
| userId | number | userId received from "addUser" response | Mandatory |
| role | string | "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"}USE CASESADDING SUBSCRIBERSAPI Calls flow to add Subscribers:
API PATH/delegate/account API METHODSADD USERREQUESTThis request will create a new user. The parameter with name 'token' is used to veryfy the request. The 'action' parameter with value 'addUser' should be used to identify that this is add user request. Parameters:
A token consists of 42 character long hex value. The value has two different parts:
Note: screenName must be included in signature generation if it is provided as a parameter 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: Then token would be "0148de1dc07b011f04a63b03f32bcf9d9568784036". RESPONSEThe new user ID and his password will be returned back in the JSON form:
In case of failure the error message will be returned back in the JSON form:
UPDATE USERThis request will update an existing user. The parameter with name 'token' is used to veryfy the request. The 'action' parameter with value 'updateUser' should be used to identify that this is update user request. REQUESTParameters:
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: Then token would be "0148de1dc0895a8f4ca9cbf09c315696e44483bd01". RESPONSEThe action result will be returned back in the JSON form:
In case of failure the error message will be returned back in the JSON form:
ASSIGN USERThis 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. REQUESTParameters:
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: Then token would be "0148de1dc08e0343669bd45f887908a4c7afdf67c3". RESPONSEThe status of the operation will be returned back in the JSON form:
In case of failure the error message will be returned back in the JSON form:
ASSIGN USER ROLEThis 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. REQUESTParameters:
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: Then token would be "0148de1dc08e0343669bd45f887908a4c7afdf67c3". RESPONSEThe status of the operation will be returned back in the JSON form:
In case of failure the error message will be returned back in the JSON form:
|
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".
RESPONSE
The status of the operation will be returned back in the JSON form:
{"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"} |