curl --request POST \
--url https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pendency_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
'import requests
url = "https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel"
payload = {
"pendency_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pendency_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', note: '<string>'})
};
fetch('https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pendency_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel"
payload := strings.NewReader("{\n \"pendency_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pendency_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pendency_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"status": "ON_HOLD",
"type_exam": "HIRING",
"sla": "2023-11-07T05:31:56Z",
"due_date": "2023-11-07T05:31:56Z",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_soc_code": "<string>",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ohc_status": "PENDING",
"note": "<string>",
"schedule_appointment_time": "2023-11-07T05:31:56Z",
"concluded_at": "2023-11-07T05:31:56Z",
"organization_display_name": "<string>",
"employee_name": "<string>",
"employee_is_disabled": true,
"periodicity": 123,
"next_exam_date": "2023-12-25"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Cancel Pendency
curl --request POST \
--url https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pendency_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
'import requests
url = "https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel"
payload = {
"pendency_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pendency_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', note: '<string>'})
};
fetch('https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pendency_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel"
payload := strings.NewReader("{\n \"pendency_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"pendency_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pendency_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"status": "ON_HOLD",
"type_exam": "HIRING",
"sla": "2023-11-07T05:31:56Z",
"due_date": "2023-11-07T05:31:56Z",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_soc_code": "<string>",
"employee_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ohc_status": "PENDING",
"note": "<string>",
"schedule_appointment_time": "2023-11-07T05:31:56Z",
"concluded_at": "2023-11-07T05:31:56Z",
"organization_display_name": "<string>",
"employee_name": "<string>",
"employee_is_disabled": true,
"periodicity": 123,
"next_exam_date": "2023-12-25"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Visão Geral
- Método:
POST - Path:
/v0/pendency/cancel - OperationId:
public_cancel_pendency_v0_pendency_cancel_post - Autenticação: header
x-api-key
Exemplo de requisição
curl -X POST "https://public-api.salu.com.vc/dev/routes/v0/pendency/cancel" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "x-api-key: $SALU_PUBLIC_API_KEY" \
--data '{
"pendency_id": "PENDENCY_UUID",
"note": "Cancelamento solicitado pelo cliente"
}'
Authorizations
Response
Successful Response
Identificador único da solicitação de exame (pendência).
Data e hora do registro da solicitação, em UTC e sem fuso. Solicitações vindas do sistema de origem trazem a data de lá.
Etapa operacional atual da solicitação.
ON_HOLD, PENDING, PRE_SCHEDULED, SCHEDULED, DONE, CANCELED, ABSENT, MISSING_OHC, NO_RESPONSE Tipo de exame ocupacional solicitado.
HIRING, DISMISSAL, PERIODIC, RETURN, RISK_CHANGE, INTERN_HIRING, PUNCTUAL, CRITICAL_ACTIVITY, APPOINTMENT, APPOINTMENT_RETURN, MEDICAL_LEAVE, INFIRMARY, THIRD_PARTY, ANAMNESE, EMPLOYEE_ACTION Data-alvo interna da Salú para tratar (agendar) a solicitação, derivada do SLA contratado em horas úteis. Não é o prazo do exame — para isso use due_date.
Data-limite para a realização do exame, calculada a partir da data de referência informada na criação (admissão, desligamento ou vencimento).
Identificador da empresa da solicitação.
Código da empresa no SOC registrado na criação.
Identificador do colaborador.
Etapa do ASO derivada do agendamento vigente (MISSING_OHC, IN_ANALYSIS, ATTACHED_OHC, DONE); WAITING_FOR_OHC quando ainda não há etapa de ASO em andamento.
PENDING, PRE_SCHEDULED, SCHEDULED, MISSING_OHC, DONE, ABSENT, CANCELED, IN_ANALYSIS, ATTACHED_OHC, RESCHEDULED Observação da solicitação. Nesta listagem vem sempre nula; só é preenchida na resposta do cancelamento, que ecoa a observação enviada ou, quando nenhuma foi enviada, um texto padrão.
Data e hora marcadas do agendamento vigente na clínica. Não é a data de conclusão — para isso use concluded_at. Nulo quando não há agendamento ativo.
Data e hora em que a solicitação foi concluída (status DONE), em UTC e sem fuso. Só é devolvida enquanto o status for DONE: nula antes da conclusão e nula de novo se a solicitação for reaberta. Na resposta do cancelamento vem sempre nula.
Nome da empresa registrado na criação; não reflete renomeações posteriores.
Nome de uso do colaborador (nome social, quando cadastrado).
Indica se o colaborador é pessoa com deficiência (PcD), conforme o cadastro no momento da criação.
Periodicidade do exame periódico, em meses, conforme o SOC. Só em type_exam = PERIODIC, e nem toda periódica tem o dado — as mais antigas costumam vir nulas. Na resposta do cancelamento vem sempre nula.
Data do próximo exame periódico conforme o SOC. Só em type_exam = PERIODIC, e nem toda periódica tem o dado — as mais antigas costumam vir nulas. Na resposta do cancelamento vem sempre nula.