You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

The profile allows you to view the user's personal data, change settings, and see the vendor's current balance.

Personal data changing is only available to users with the "Administrator" role.

Get user information

Authorization is required. There are no input parameters. 

GET /v1.0/profile

Returns the user element: 

{
  "user": {
    "_id": 10015,
   "companyname": "Aktiv",
   "confirmed": true,
   "countryid": 185,
   "email": "test@example.com",
   "phone": "12345",
   "status": true,
   "userdetails": {
     "_id": 10016,
    "firstname": "John",
    "lastname": "Doe",
    "lastvisitdate": 1529418565,
    "role": {
      "_id": 1,
      "createorders": true,
     "createproducts": true,
     "createusers": true,
     "manageprotect": true,
     "nameeng": "Administrator"
    },
   "settings": {
    "language": 0
}}}}

Get access codes

Authorization is required. There are no input parameters. 

Access codes are vendor-specific, so they are the same for all users of the same vendor.

The 'private' array is returned only for users with the 'Administrator' or 'Developer' role.


GET /v1.0/profile/accesscodes

Returns an accesscodes array:

{
"accesscodes": [
{
  "_id": 1,
  "private": {
  "mastervalue": "0x5191758c",
  "readvalue": "0x51917645",
  "writevalue": "0x51917603"
},
  "public": {
  "text": "DEMONVK",
  "value": "0x519175b7"
}
},
{
  "_id": 9,
  "private": {
  "mastervalue": "0xe1e1e1e",
  "readvalue": "0xd2d2d2d2",
  "writevalue": "0xd2e2e2e2"
},
  "public": {
  "text": "EXAMPLE",
  "value": "0xb3b3b3b3"
}}]}

Edit Profile (for administrator only)

Authorization is required. RAW JSON input parameters:

{
  "companyName": "Aktiv",
  "countryId": 185,
  "phone": "12345",
  "firstName": "John",
  "lastName": "Doe"
}

PUT /v1.0/profile

Get balance information (for administrator only)

Authorization is required. There are no input parameters.

GET /v1.0/profile/accesscodes

Returns the balance element: 

{
  "balance": {
  "_id": 10016,
  "activationscount": -842150451,
  "activationslimit": -842150451,
  "companyname": "Aktiv",
  "countryid": 185,
  "ispostpaid": true,
  "locallicensesbalance": -842150451,
  "netlicensesbalance": -842150451,
  "phone": "12345",
  "status": -12851,
  "subscriptionbegindate": 0,
  "subscriptionenddate": 0
}}

Change user settings

Authorization is required. There are no input parameters.

PUT /v1.0/profile/settings

{
  "lang" : 1
}
  • No labels