Agendamento em lote atômico
curl --request POST \
--url https://api.controleclinic.com.br/v1/scheduling/appointments/batch \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"patient_id": "8d2f4a71-3c9b-4e6a-b5d0-1f7e2c9a4b36",
"appointments": [
{
"professional_id": "c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59",
"start_at": "2026-11-10T14:00:00-03:00",
"end_at": "2026-11-10T14:30:00-03:00"
},
{
"professional_id": "c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59",
"start_at": "2026-11-24T14:00:00-03:00",
"end_at": "2026-11-24T14:30:00-03:00"
}
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patient_id: '8d2f4a71-3c9b-4e6a-b5d0-1f7e2c9a4b36',
appointments: [
{
professional_id: 'c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59',
start_at: '2026-11-10T14:00:00-03:00',
end_at: '2026-11-10T14:30:00-03:00'
},
{
professional_id: 'c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59',
start_at: '2026-11-24T14:00:00-03:00',
end_at: '2026-11-24T14:30:00-03:00'
}
]
})
};
fetch('https://api.controleclinic.com.br/v1/scheduling/appointments/batch', 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/appointments/batch"
payload = {
"patient_id": "8d2f4a71-3c9b-4e6a-b5d0-1f7e2c9a4b36",
"appointments": [
{
"professional_id": "c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59",
"start_at": "2026-11-10T14:00:00-03:00",
"end_at": "2026-11-10T14:30:00-03:00"
},
{
"professional_id": "c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59",
"start_at": "2026-11-24T14:00:00-03:00",
"end_at": "2026-11-24T14:30:00-03:00"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"appointments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clinic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"professional_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"procedure_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_at": "<string>",
"end_at": "<string>",
"status": "scheduled",
"notes": "<string>",
"room_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"technology_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"origem": "importacao",
"created_at": "<string>",
"updated_at": "<string>"
}
]
}{
"success": false,
"error": null
}{
"error": "<string>"
}{
"error": "Insufficient scope"
}{
"error": "<string>",
"conflict": {
"item_index": 123,
"field": "<string>",
"message": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}Agendamentos
Agendamento em lote atômico
Cria até 50 agendamentos do mesmo paciente de uma vez. É tudo ou nada: se uma linha conflitar ou for inválida, nenhum agendamento é criado.
Todos nascem scheduled e ligados a uma sessão (session_id na resposta). Paciente, profissional, procedimento, sala e tecnologia precisam ser da clínica da chave.
Escopo: scheduling:write.
POST
/
v1
/
scheduling
/
appointments
/
batch
Agendamento em lote atômico
curl --request POST \
--url https://api.controleclinic.com.br/v1/scheduling/appointments/batch \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"patient_id": "8d2f4a71-3c9b-4e6a-b5d0-1f7e2c9a4b36",
"appointments": [
{
"professional_id": "c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59",
"start_at": "2026-11-10T14:00:00-03:00",
"end_at": "2026-11-10T14:30:00-03:00"
},
{
"professional_id": "c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59",
"start_at": "2026-11-24T14:00:00-03:00",
"end_at": "2026-11-24T14:30:00-03:00"
}
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patient_id: '8d2f4a71-3c9b-4e6a-b5d0-1f7e2c9a4b36',
appointments: [
{
professional_id: 'c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59',
start_at: '2026-11-10T14:00:00-03:00',
end_at: '2026-11-10T14:30:00-03:00'
},
{
professional_id: 'c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59',
start_at: '2026-11-24T14:00:00-03:00',
end_at: '2026-11-24T14:30:00-03:00'
}
]
})
};
fetch('https://api.controleclinic.com.br/v1/scheduling/appointments/batch', 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/appointments/batch"
payload = {
"patient_id": "8d2f4a71-3c9b-4e6a-b5d0-1f7e2c9a4b36",
"appointments": [
{
"professional_id": "c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59",
"start_at": "2026-11-10T14:00:00-03:00",
"end_at": "2026-11-10T14:30:00-03:00"
},
{
"professional_id": "c41e9b2d-7a3f-4d18-9e65-0b8f3a2c7d59",
"start_at": "2026-11-24T14:00:00-03:00",
"end_at": "2026-11-24T14:30:00-03:00"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"appointments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clinic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"professional_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"procedure_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_at": "<string>",
"end_at": "<string>",
"status": "scheduled",
"notes": "<string>",
"room_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"technology_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"origem": "importacao",
"created_at": "<string>",
"updated_at": "<string>"
}
]
}{
"success": false,
"error": null
}{
"error": "<string>"
}{
"error": "Insufficient scope"
}{
"error": "<string>",
"conflict": {
"item_index": 123,
"field": "<string>",
"message": "<string>"
}
}{
"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
