https://www.myescola.pt/api/candidaturasnetsetinscricao | Parâmetro | Valores | Defeito | Descrição |
|---|---|---|---|
| privatekey * | CHAVE_DA_ESCOLA |
Obrigatório | Chave de identificação do estabelecimento de ensino fornecida pela Wincode |
| Update WHERE | |||
| primkey * | int(11) | Chave primária a atualizar. ins_preins | |
| Update SET | |||
| cod_ins * | int(16) | Código da inscrição | |
| Nome | Tipo | Descrição |
|---|---|---|
status |
Boolean | Retorno do serviço true ou false |
message |
string | Mensagem com o resultado do serviço |
affected_rows |
int | Quantidade de linhas afetadas pelo update |
$data["privatekey"] = "CHAVE_PRIVADA_DA_EMPRESA";
$data["cod_ins"] = "000001";
$data["primkey"] = "01"; //Código de pré-inscricao [ins_preins]
//transformar data do $_POST para JSON
$content = json_encode($data);
//submeter o webservice por CURL
$curl = curl_init("https://www.myescola.pt/api/candidaturasnetreciboupdate");
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);
curl_close($curl);
//resposta do webservice
$response = json_decode($json_response, true);
echo $response["message"];