These Endpoints are used to create and get results for the facial personality analysis on the FaceCode Platform. We use the term ‘candidate’ for a person’s image who is to be analyzed by the faceCODE engine.
A field has been added on the My Company page in the dashboard that will accept a
fully formed URL for a callback function. The callback URL will be invoked by the Create Candidate API method you're
calling after it's done processing the record. So the API will process the data you have sent, then
respond with the callback to send you the response. For example:
The API will invoke this url with one of these 2 params:
When you receive the candidate callback params for example:
Open Request
https://api.facecode.app/candidate
This endpoint is for creating candidates. You need to add the x-api-key param on the header of the request.
Request Headers
x-api-key
Content-Type application/json
Bodyraw (json)
json
{
"api_key": "{{ApiKey}}",
"candidate": {
"image_url": "",
"first_name": "",
"last_name": "",
"email": ""
}
}
Response
json
{
"candidate": "string",
"reportUrl": "string",
}
Open Request
https://api.facecode.app/candidate/status
This endpoint returns processing status of the candidate. You need to provide the the api-key and candidate id
Request Headers
x-api-key
Request Params
api_key
candidate
Open Request
https://api.facecode.app/candidate/disc-report
This endpoint returns the report pdf url or json report. You need to provide the the api-key and candidate id
Request Headers
x-api-key
Request Params
api_key
candidate
format (optional. Get report pdf url in pdf format or json format. Values: pdf, json)
Open Request
https://api.facecode.app/company
This endpoint returns the company info from the candidate. You need to provide the the api-key and candidate id
Request Headers
x-api-key
Request Params
candidate
For example: To get the company info you can call the endpoint on this way:
curl --location 'https://api.facecode.app/company?candidate=[CANDIDATE_ID]' \
--header 'x-api-key: [YOUR_X_API_KEY]'
Response:
{
"Name": "...",
"Active": "1",
"Logo": "...",
"Disclosure": "...",
"About": "",
"Copyright": "",
"Photo_Basics": "",
"Terms": "",
"Privacy": "",
"Consent": "",
"Call_to_Action_1": "",
"Call_to_Action_2": "",
"Report_Title_Page": ""
}
Open Request
https://api.facecode.app/candidate/disc-report
This endpoint returns the report pdf url or json report. You need to provide the the api-key and candidate id
Request Headers
x-api-key
Request Params
api_key
candidate
format (optional. Get report pdf url in pdf format or json format. Values: pdf, json)
Open Request
https://api.facecode.app/candidate/traits
This endpoint returns the personality traits of a candidate. You need to provide the the api-key and candidate id
Request Headers
x-api-key
Request Params
api_key
candidate
useExternalId (optional. Get personality traits values using the external id of the candidate. Values: true, false)
For example: To get personality traits values you can call the endpoint on this way:
curl --location 'https://api.facecode.app/candidate/traits?api_key=[YOUR_API_KEY]&candidate=[CANDIDATE_ID]&useExternalId=false' \
--header 'x-api-key: [YOUR_X_API_KEY]'
Response:
{
"candidate": "...",
"image_url": "...",
"gender": "male",
"first_name": "John",
"last_name": "Doe",
"useExternalId": "false",
"traits": [
{
"Id": 2354968,
"Trait": "Imaginative",
"Type": "[{\"id\":943,\"value\":\"Internal\"}]",
"Count": 1
},
{
"Id": 2354969,
"Trait": "Inspiring",
"Type": "[{\"id\":943,\"value\":\"Internal\"}]",
"Count": 1
},
{
"Id": 2354970,
"Trait": "Positive",
"Type": "[{\"id\":943,\"value\":\"Internal\"}]",
"Count": 1
},
...
]
}
Open Request
https://api.facecode.app/candidate/disc
This endpoint returns the DiSC Report values of one candidate. You need to provide the api-key and the Candidate Id
Request Headers
x-api-key
Request Params
api_key
candidate
percentages (optional. Get percentages values for each DiSC item. Values: yes,no)
type (optional. Group DiSC types for Percentages format. Values: External,Internal)
For example: To get percentages values you can call the endpoint on this way:
curl --location 'https://api.facecode.app/candidate/disc?api_key=[YOUR_API_KEY]&candidate=[CANDIDATE_ID]&percentages=yes' \
--header 'x-api-key: [YOUR_X_API_KEY]'
Response:
{
"candidate": "4xfgigl6bn",
"disc": [
{
"disc_property": "Conscientiousness",
"count": 26,
"type": "All",
"percentage": 24
},
{
"disc_property": "Dominance",
"count": 34,
"type": "All",
"percentage": 31
},
{
"disc_property": "Influence",
"count": 34,
"type": "All",
"percentage": 31
},
{
"disc_property": "Steadiness",
"count": 14,
"type": "All",
"percentage": 13
}
]
}
Open Request
https://api.facecode.app/candidate/careers
This endpoint returns the Career Recommendations values of one candidate. You need to provide the api-key and the Candidate Id
Request Headers
x-api-key
Request Params
api_key
candidate