Criar paciente
curl --request POST \
--url https://api.controleclinic.com.br/v1/scheduling/patients \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"full_name": "Maria Souza"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({full_name: 'Maria Souza'})
};
fetch('https://api.controleclinic.com.br/v1/scheduling/patients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.controleclinic.com.br/v1/scheduling/patients"
payload = { "full_name": "Maria Souza" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clinic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"full_name": "<string>",
"cpf": "<string>",
"birthdate": "<string>",
"gender": "<string>",
"phone": "<string>",
"email": "<string>",
"blood_type": "<string>",
"allergies": "<string>",
"obs": "<string>",
"address_json": null,
"active": true,
"created_at": "<string>",
"updated_at": "<string>"
}{
"success": false,
"error": null
}{
"error": "<string>"
}{
"error": "Insufficient scope"
}{
"error": "Duplicate patient",
"message": "<string>",
"confidence": "cpf",
"existing": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"full_name": "<string>",
"active": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}Pacientes
Criar paciente
Cria um paciente. Antes de gravar, compara com os cadastros da clínica — inclusive arquivados — por CPF, telefone e nome.
Achando parecido, devolve 409 com existing.id e o grau de certeza: cpf (quase certo), phone (provável) ou name (possível). Use o existing.id para seguir com o cadastro que já existe; reenvie com force: true só se tiver certeza de que é outra pessoa (homônimo).
full_name até 200 caracteres. Sem o escopo sensitive:read, a resposta mascara CPF, telefone, e-mail e data de nascimento.
Escopo: scheduling:write.
POST
/
v1
/
scheduling
/
patients
Criar paciente
curl --request POST \
--url https://api.controleclinic.com.br/v1/scheduling/patients \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"full_name": "Maria Souza"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({full_name: 'Maria Souza'})
};
fetch('https://api.controleclinic.com.br/v1/scheduling/patients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.controleclinic.com.br/v1/scheduling/patients"
payload = { "full_name": "Maria Souza" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clinic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"full_name": "<string>",
"cpf": "<string>",
"birthdate": "<string>",
"gender": "<string>",
"phone": "<string>",
"email": "<string>",
"blood_type": "<string>",
"allergies": "<string>",
"obs": "<string>",
"address_json": null,
"active": true,
"created_at": "<string>",
"updated_at": "<string>"
}{
"success": false,
"error": null
}{
"error": "<string>"
}{
"error": "Insufficient scope"
}{
"error": "Duplicate patient",
"message": "<string>",
"confidence": "cpf",
"existing": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"full_name": "<string>",
"active": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}Autorizações
Token de API no formato cc_live_<64 chars hex>. Obtido em Minha Clínica → Integrações.
Corpo
application/json
Resposta
Paciente criado
