get/candidate

Returns public candidate data for the authenticated user.


Request

Resource URL

https://api.infojobs.net/api/6/candidate

Security

  • User Role: role_candidate
  • Scope: candidate_profile_with_email

Parameters

  • No parameters are needed

Response

Response fields

The Candidate entity contains public data for candidates. See below for details.

Fields related to Candidate entity
Name Description

email

Required

String

Candidate email.

Example values:candidate@domain.net

Maximum length: 50

key

Required

String

A alphanumeric Candidate unique identifier.

Example values: fbbef308-198c-4723-b6ca-a16c916dbaf5

Maximum length: 100

hasPhoto

Required

Boolean

true if the candidate has photo.false otherwise.

isPhotoAccepted

Required

Boolean

true if the candidate's photo is accepted by Infojobs.false otherwise.

photo

Required

String

url for the candidate's photo servlet
Example values: http://www.infojobs.net/candidato.foto?id_candidato=99959971-de9f-99e1-9a99-1d89999ae90e

name

Required

String

Candidate's name. This field can't be empty.

Example values: Anthony

Maximum length: 50

surname1

Required

String

Candidate's family name.

Example values: Smith

Maximum length: 50

surname2

Optional

String

Candidate's second family name.

Example values: Pi i Molist

Maximum length: 50

fullName

Required

String

Full name for this candidate; That is the result of concatenate name, surname1 and surname2.

Example values: Anthony Smith Pi i Molist

Maximum length: 200

city

Required

String

City where the candidate lives.

Example values: Sant Andreu

Maximum length: 50

province

Required

ApiShortPdItem  

Region where candidate lives. ApiShortPdItem is an structure with two fiels: id (int) and value (String) . The operation /pd/province returns all available values.

Example values:"province": { "id": 31, "value": "Lleida" }

publicProfileLink

Required

String 

Url for the candidate's public profile, if he has one.

Example values: https://www.infojobs.net/anthony-smith-pimolist.prf

Maximum length: 200

status

Required

int

Status for Curriculum's candidate

0 Curriculum uncompleted. It has some mandatory fields without information.
1 Curriculum has completed all mandatory fields.

validatedMail

Required

int

Status of email validation process

0 email not validated
1 email validated
2 CANDIDATO_HISTORICO_SIN_EMAIL_VALIDADO_SIN_CONFIRMACION_ENVIADA
3 CANDIDATO_HISTORICO_SIN_EMAIL_VALIDADO_CON_CONFIRMACION_ENVIADA

accountCreation

Required

Calendar

Date and time of account creation

lastCVUpdate

Optional

Calendar

Date and time when candidate's updated his main CV

lastInscripcion

Optional

Calendar

Date and time when candidate applied for a job

extendedBannerAttributes

Required

String

User segmentation data

subSegment

Required

String

User segmentation data

id

Required

Integer

User id

emailHash

Required

String

User email hash

Error Codes

There is no specific error codes for this operation.

Example 1

This example gets the candidate public data for the authenticated user.

Request

GET https://api.infojobs.net/api/6/candidate

Response

 {
   "id": 99999,
   "email": "candidate@domain.net",
   "emailHash": "XXXXX",
   "key": "fbbef308-198c-4723-b6ca-a16c916dxxx5",
   "hasPhoto": true,
   "photo": "http://www.infojobs.net/candidato.foto?id_candidato=31959971-de9f-47e1-8a12-1d83224axxxx",
   "name": "Hermenegildo",
   "surname1": "Pi",
   "surname2": "Tur",
   "fullName": "Hermenegildo Pi Tur",
   "city": "Barcelona Capital",
   "province": {
       "id": 9,
       "value": "Barcelona"
   },
   "publicProfileLink": "",
   "status": 0,
   "validatedMail": 1,
   "accountCreation": "2007-09-03T21:49:27.000+0000",
   "lastCVUpdate": "2020-10-23T09:15:10.000+0000",
   "lastInscripcion": "2020-05-22T10:30:48.000+0000",
   "extendedBannerAttributes": "&oasUserCategory=150&null=1&oasEmploymentStatus=2...",
   "subSegment": "executive",
   "doesNotWantNotifications": false,
   "photoAccepted": true
 }

   		 

Example 2

This example tries to get the candidate public data, but the user has not been authenticated.

Request

GET https://api.infojobs.net/api/6/candidate

Response

HTTP/1.1 401 UNAUTHORIZED

Date: Thu, 13 Sep 2012 09:18:01 GMT,
Server: Apache,
Vary: Host,Accept-Encoding,User-Agent,
X-Powered-By: InfoJobs.net,
Set-Cookie: JSESSIONID=30061942B857923491DD591BB817AE74; Path=/,
WWW-Authenticate: OAuth2 realm="https://www.infojobs.net" auth-uri="https://www.infojobs.net/api/oauth/user-authorize/index.xhtml" token-uri="https://www.infojobs.net/oauth/authorize" scope="CV",
Transfer-Encoding: chunked,
Content-Type: application/json,
Content-Language: es,

{
   "error": "101",
   "error_description": "The user has not been authenticated",
   "timestamp": "2012-09-13T09:18:01.115+0000"
}