get/candidate

Returns public candidate data for the authenticated user.


Request

Resource URL

https://api.infojobs.net/api/2/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

String

Candidate email.

Example values:candidate@domain.net

Maximum length: 50

key

String

A alphanumeric Candidate unique identifier.

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

Maximum length: 100

hasPhoto

Boolean

true if the candidate has photo.false otherwise.

isPhotoAccepted

Boolean

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

photo

String

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

name

String

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

Example values: Anthony

Maximum length: 50

surname1

String

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

Example values: Smith

Maximum length: 50

surname2

String

Candidate's second family name. This field can be empty.

Example values: Pi i Molist

Maximum length: 50

fullName

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

String

City where the candidate lives.

Example values: Sant Andreu

Maximum length: 50

province

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

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

int

Status for Curriculum's candidate

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

validatedMail

int

Status of email validation process

0email not validated
1email validated
2CANDIDATO_HISTORICO_SIN_EMAIL_VALIDADO_SIN_CONFIRMACION_ENVIADA
3CANDIDATO_HISTORICO_SIN_EMAIL_VALIDADO_CON_CONFIRMACION_ENVIADA

accountCreation

Calendar

Date and time of account creation

lastCVUpdate

Calendar

Date and time when candidate's updated his main CV

lastInscripcion

Calendar

Date and time when candidate applied for a job

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/2/candidate

Response

 [
    {
	?email?: ?candidate@domain.net?,
   	"key": "fbbef308-198c-4723-b6ca-a16c916dbaf5",
   	"hasPhoto": true,
   	"photoAccepted": true,
   	"photo": "http://www.infojobs.net/candidato.foto?id_candidato=31959971-de9f-47e1-8a12-1d83224ae90e",
   	"name": "Hermenegildo",
   	"surname1": "Pi",
   	"surname2": "Tur",
   	"fullName": "Hermenegildo Pi Tur",
   	"city": "Lleida",
   	"province": {
      	"id": 31,
      	"value": "Lleida"
   	},
   	"publicProfileLink": "",
   	"status": 0,
   	"validatedMail": 1,
   	"accountCreation": "2011-05-25T14:26:48.000+0000",
   	"lastCVUpdate": "2012-06-25T07:01:14.000+0000",
   	"lastInscripcion": "2011-05-31T09:09:20.000+0000"
    }
 ]
   		 

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/2/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"
}