Webservices Base de conhecimento

Parameter Values Default Description
privatekey PRIVATE_KEY Private key provided by Wincode This key is confidencial.
table opcional char net_rh_rs_candidatos net_rh_rs_candidatos (Table Net)
rh_rs_candidatos (Table Whumanos)
sortorder opcional char asc Sort order, asc or desc
sortfield opcional char num_cand Sort field name
limit opcional int 1000 Limit of records per page
curpage opcional int 1 Actual page
filter opcional array Available index below
   filter[num_cand] opcional char Add filter by candidate number
   filter[email_cand] opcional char Add filter by candidate email
Name Type Description
Service information
status boolean (true,false) Result of the request
message string Webservice return message
count int Number of records found
count_total int Total number of records found without limit
offset int Page offset
Records Array
num_cand varchar(7) Candidate Number
nome_cand varchar(100) Candidate Name
rua1_cand varchar(50) Address line 1
rua2_cand varchar(50) Address line 2
loca_cand varchar(50) Address city
cpos_cand varchar(50) Zip code
dat_nas_cand datetime Birthdate
telf_cand varchar(80) Phone Number
telm_cand varchar(80) Mobile Phone Number
email_cand varchar(200) Email address
cont_cand varchar(12) Nif number
nac_cand varchar(6) Candidate nacionality, for example PT
obs_cand text Observations
viatura_cand varchar(2) Check if has car: 0 (No) 1 (Yes)
$data = array(
     'privatekey' => "PRIVATE_KEY",
     'filter'   => array("num_cand"=>"0001","email_cand"=>"aaa@aaa.com") );

$content = json_encode($data);

$curl = curl_init("https://www.wportal.pt/api/candidatos");
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);

$json_response = curl_exec($curl);

$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);


$response = json_decode($json_response, true);

echo $response["message"];