Webservices Base de conhecimento

Parameter Values Default Description
key PUBLIC_KEY required Public key provided by Wincode
inDateOrder asc, desc random Sorting results by date
id int opcional Filter by id of job
Name Type Description
id_emp decimal(16,6) Job Id
ref_emp char(20) Job reference code
des_emp char(100) Job title
local_emp char(120) Job location
aprov_emp datetime Jop ad publish date
inicio_emp datetime Job begin date
anuncio_emp text Job advertisement with html embeded code
vagas_emp int(11) Number of places available
carac_cliente_emp text Characterization of the client
carac_funcoes_emp text Function description
carac_requ_emp text Job requirements
carac_oferta_emp text Offer description
hotjob_emp int(1) HotJob 0 [No], 1 [Yes]
entimediata_emp int(1) Immediate entry 0 [No], 1 [Yes]
 $json = file_get_contents('https://www.wportal.pt/api/empregos/json/?key=PUBLIC_KEY&inDateOrder=desc');

 $obj = json_decode($json);

 foreach($obj as $row) {
 $json = file_get_contents('https://www.wportal.pt/api/empregos/json/?key=PUBLIC_KEY&inDateOrder=desc&id=id_emp');

 $obj = json_decode($json);

Parameter Values Default Description
privatekey PRIVATE_KEY Private key provided by Wincode This key is confidencial.
setor int opcional Filter by sector
localidade string opcional Filter by location
limit int opcional Limit of records per page
curpage int opcional Actual page
Name Type Description
Service information
status boolean (true,false) Result of the request
message string Webservice return message
count string Number of records found
count_total string Total number of records found without limit
Job records
rows[$i]["id_emp"] decimal(16,6) Job id
rows[$i]["ref_emp"] char(20) Job reference code
rows[$i]["des_emp"] char(100) Job title
rows[$i]["local_emp"] char(120) Job location
rows[$i]["aprov_emp"] datetime Jop ad publish date
rows[$i]["inicio_emp"] datetime Jop beggin date
rows[$i]["anuncio_emp"] text Job advertisement with html embeded code
rows[$i]["vagas_emp"] int(11) Number of places available
rows[$i]["carac_cliente_emp"] text Characterization of the client
rows[$i]["carac_funcoes_emp"] text Function description
rows[$i]["carac_requ_emp"] text Job requirements
rows[$i]["carac_oferta_emp"] text Job Offer
rows[$i]["hotjob_emp"] int(1) HotJob 0 [No], 1 [Yes]
rows[$i]["entimediata_emp"] int(1) Immediate entry 0 [No], 1 [Yes]
rows[$i]["setor_emp"] int(1) Immediate entry
rows[$i]["desc_setor_emp"] string Description of the business sector
rows[$i]["cate_emp"] int Employment category id
rows[$i]["des_cate"] varchar(100) Descriptive of the employment category
$data = array(
     'privatekey' => "PRIVATE_KEY",
     'setor'   => "1" );

$content = json_encode($data);

$curl = curl_init("https://www.wportal.pt/api/empregos");
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"];