Profile Resource

From Veridu

This endpoint allows you to retrieve user's profile data

ATTENTION

All requests must send Veridu-Client header with a valid client id.

All requests must send Veridu-Session header with a valid session token.

How to retrieve the consolidated profile of a given user

You have to send a GET request to the endpoint "<url_api>/<version>/profile/<user>?filter=<filter>".


Query String

filter parameter is optional and its values can be: all, provider, facts, flags, kba, otp, cpr, nemid, personal, badges, certificate and reference (Default: all when retrieving user's own information and state, user, provider, cpr, kba, nemid, otp, personal, badges and certificate when retrieving other users information).

Example

Request

GET /0.3/profile/johndoe1980/?filter=state,user,provider,cpr,kba,nemid,otp,personal,badges

Veridu-Client: demo
Veridu-Session: 3160ede8f31eab24dfd2b4d63a3ccda5667b052f7e31e5772cdc60
                eca6db8a694e60e668d0557d15dc4131dc3572e956fca99528a82d63e7427e37d8f1e47066

Response

If everything work as expected, you will receive a success json response containing the profile, as in example:

HTTP CODE: 200
 
{
  "status": true,
  "state": "IDLE",
  "user": {
    "picture": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-frc3/37142_60055592_1759556_q.jpg",
    "type": "regular",
    "clone": 0,
    "overall": 0.79,
    "name": {
      "value": "John Doe",
      "score": 0.88
    },
    "gender": {
      "value": "Male",
      "score": 0.99
    },
    "birth": {
      "value": 1980,
      "score": 0.83
    },
    "location": {
      "value": "Denmark",
      "score": 0.66
    },
    "email": {
      "value": "[email protected]",
      "score": 0.89
    },
    "phone": false
  },
  "details": {
    "birthDay": [
      {
        "value": "17",
        "points": 10,
        "score": 0.55
      }
    ],
    "birthMonth": [
      {
        "value": "6",
        "points": 10,
        "score": 0.55
      }
    ],
    "birthYear": [
      {
        "value": "1980",
        "points": 60,
        "score": 0.53
      }
    ],
    "cityName": [
      {
        "value": "Copenhagen",
        "points": 170,
        "score": 0.7379
      },
      {
        "value": "Frederiksberg",
        "points": 80,
        "score": 0.37
      }
    ],
    "countryName": [
      {
        "value": "Denmark",
        "points": 370,
        "score": 0.9133
      }
    ],
    "emailAddress": [
      {
        "value": "[email protected]",
        "points": 30,
        "score": 0.89
      }
    ],
    "firstName": [
      {
        "value": "John",
        "points": 55,
        "score": 0.7081
      }
    ],
    "gender": [
      {
        "value": "male",
        "points": 15,
        "score": 0.375
      }
    ],
    "lastName": [
      {
        "value": "Doe",
        "points": 35,
        "score": 0.8233
      }
    ],
    "overall": [
      {
        "value": "",
        "points": 760,
        "score": 0.614
      }
    ],
    "profilePicture": [
      {
        "value": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-frc3/37142_60055592_1759556_q.jpg",
        "points": 100,
        "score": 0.375
      }
    ]
  },
  "facts": {
      "facebook": {
        "firstName": "John",
        "lastName": "Doe",
        "birthDay": 17,
        "birthMonth": 6,
        "birthYear": 1980,
        "emailAddress": "[email protected]",
        "profilePicture": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-frc3/37142_60055592_1759556_q.jpg"
      },
      "linkedin": {
        "firstName": "John",
        "lastName": "Doe",
        "emailAddress": "[email protected]",
        "profilePicture": "https://media.licdn.com/mpr/mpr/shrinknp_400_400/NiN2MwYTI3LTQ3N2YtNDM5ZS1iMzVkLWY2MTA5.jpg"
      },
      "twitter": {
        "firstName": "john",
        "profilePicture": "https://pbs.twimg.com/profile_images/788000004/5bf78a1871a5883a79c98b0dbf1032_normal.jpeg"
      }
  },
  "flags": ["emptyProfile", "spotafriendKBA"],
  "provider": ["facebook","linkedin","twitter"],
  "cpr": false,
  "kba": [],
  "nemid": false,
  "otp": ["email"],
  "badges": ["credit-card"],
  "certificate":{
    "MPAA":{
      "level": 4,
      "updated": 1410547011
    }
  },
  "reference": {
    "firstName": {
      "match": {
        "score": 1,
        "value": "John"
      },
      "attribute": {
        "score": 0.7,
        "value": "John"
      }
    },
    "middleName": {
      "match": {
        "score": 0,
        "value": "Random"
      },
      "attribute": null
    },
    "lastName": {
      "match": {
        "score": 1,
        "value": "Doe"
      },
      "attribute": {
        "score": 0.82,
        "value": "Doe"
      }
    }
  },
  "updated": 1410547012
}

If not, here is a list of possible errors that could occur on this request:

Code Content
400 API_CHANGE_PROTOCOL
403 API_ACTION_FORBIDDEN
400 CLIENT_MISSING
400 CLIENT_INVALID
404 CLIENT_NOT_FOUND
400 SESSION_TOKEN_MISSING
400 SESSION_TOKEN_INVALID
400 SESSION_TOKEN_EXPIRED
400 USER_INVALID
404 USER_NOT_FOUND