Download OpenAPI specification:Download
Os webhooks Clinicarx são uma funcionalidade poderosa que permite a integração do sistema com softwares externos dos assinantes. Eles fornecem notificações em tempo real quando eventos importantes ocorrem no Clinicarx, como criação, edição ou cancelamento de agendamentos, atendimentos, pacientes, usuários e clínicas. Esta documentação tem como objetivo explicar o funcionamento dos webhooks, os gatilhos disponíveis e os objetos que são retornados em cada evento.
2018-05-25 21:33:21
(UTC) equivale à 2018-05-25 18:33:21
(GMT-3)Para utilizar a API de webhooks no Clinicarx, é necessário seguir o procedimento de ativação em conjunto com o time de suporte técnico da plataforma. Para solicitar a ativação da API, envie um email de solicitação para api@clinicarx.com.br, e nossa equipe estará pronta para auxiliá-lo.
O Webhook de Agendamentos notifica sobre novos agendamentos, edições e cancelamentos nas clínicas da rede. Os gatilhos são: new-appointment
, edit-appointment
e cancel-appointment
. Dados detalhados dos agendamentos são enviados para manter sistemas atualizados em tempo real.
object (Appointment) | |
api_version | string |
timestamp | string <date-time> |
{- "data": {
- "event_category": "calendar",
- "event_type": "attendance",
- "event_status": "done",
- "scheduled_start_at": "2017-05-31 09:17:03",
- "scheduled_end_at": "2017-05-31 10:47:03",
- "scheduled_duration": 30,
- "performed_start_at": "2017-05-31 09:00:00",
- "performed_end_at": "2017-05-31 10:00:00",
- "performed_duration": 30,
- "title": null,
- "patient": {
- "id": "498124ed-53d5-46eb-89c9-2b1e6a6191a5",
- "name": "John Doe",
- "document": 17052897890
}, - "clinic": {
- "id": "498124ed-53d5-46eb-89c9-2b1e6a6191a5",
- "name": "Drogaria Exemplo",
- "identification": "Loja 01",
- "cnpj": "09390160000169",
- "active": true,
- "cnes": "9999999",
- "tenancy": {
- "id": "498124ed-53d5-46eb-89c9-2b1e6a6191a5",
- "name": "Sua Rede LTDA",
- "description": "Saúde em Dia"
}
}
}, - "api_version": "1.1.7",
- "timestamp": "2023-07-13 15:55:33"
}
O Clinicarx oferece a funcionalidade de Webhooks para que o seu sistema seja notificado automaticamente sobre quaisquer alterações ocorridas nos atendimentos. Os eventos relacionados aos Atendimentos que a Clinicarx notifica são: new-attendance
: início de atendimento. finished-attendance
: encerramento de atendimento. cancelled-attendance
: cancelamento de atendimento. Os atributos disponíveis na sessão “rndsInstances” foram embasados nos dados padronizados em modelos RNDS: Testes rápidos - REL E Vacinas - RIA
object (Attendance) | |
api_version | string |
timestamp | string <date-time> |
{- "data": {
- "id": "6b1b7d5e-22c9-435c-b43b-422acf5387db",
- "created_time": "2018-12-31 15:34:10",
- "closed_time": "2018-12-31 15:34:10",
- "appointment": {
- "scheduled_start_at": "2017-05-31 09:17:03",
- "scheduled_end_at": "2017-05-31 10:47:03"
}, - "patient": {
- "id": "498124ed-53d5-46eb-89c9-2b1e6a6191a5",
- "name": "John Doe",
- "email": "john_doe@example.com",
- "document": 17052897890,
- "sex": "male",
- "birthday": "1999-12-31"
}, - "clinic": {
- "id": "498124ed-53d5-46eb-89c9-2b1e6a6191a5",
- "name": "Drogaria Exemplo",
- "identification": "Loja 01",
- "cnpj": "09390160000169",
- "cnae": "4771-7/01",
- "cnes": "9999999",
- "total_area": 250,
- "service_room_area": 7.5,
- "timezone": "America/Sao_Paulo"
}, - "tenancy": {
- "id": "498124ed-53d5-46eb-89c9-2b1e6a6191a5",
- "name": "Sua Rede LTDA",
- "description": "Saúde em Dia"
}, - "pharmacist": {
- "id": "498124ed-53d5-46eb-89c9-2b1e6a6191a5",
- "email": "john_doe@example.com",
- "first_name": "Drogaria Exemplo",
- "last_name": "Loja 01",
- "document": "01723614351",
- "crf": 35864,
- "crf_state": "MG",
- "role": "manager"
}, - "services": [
- {
- "id": "6b1b7d5e-22c9-435c-b43b-422acf5387db",
- "service_name": "CHECKUP GLICEMIA CAPILAR",
- "service_code": "845"
}
], - "rndsInstances": {
- "REL": [
- {
- "identifier": "5c6b7d5e-22c9-435c-b43b-422acf9426os",
- "subject": 124899218,
- "effectiveDateTime": "23-06-28 18:59:44",
- "author": 9999999,
- "performer": "977.462.021-60",
- "category": 214,
- "code": "94558-4",
- "method": "Imunocromatográfico",
- "specimen": "SWNAFA",
- "status": "final",
- "result": {
- "category": "valueCodeableConcept",
- "code": 2
}
}
], - "RIA": [
- {
- "identifier": "5c6b7d5e-22c9-435c-b43b-422acf9426os",
- "subject": 124899218,
- "Date": "23-06-28 18:59:44",
- "author": 9999999,
- "performer": "977.462.021-60",
- "status": "completed",
- "vaccineCode": 9,
- "manufacturer": 159,
- "lotNumber": 12123133232,
- "expirationDate": "2025-01-01",
- "siteCode": 1,
- "routeCode": 10890,
- "doseNumberString": 1
}
]
}, - "clinical_conditions": [
- {
- "id": "string",
- "code": "A220",
- "title": "Carbúnculo cutâneo",
- "category": "not-cronic",
- "added_attendance_id": "23244d15-ddd7-4073-b8ed-01c5e20a2c1c",
- "diagnosis_date": "2018-12-31"
}
], - "treatments": [
- {
- "id": "8b1b7d5e-22c9-435c-b58b-422acf5569fd",
- "product": "CLORIDRATO DE TIAMINA + CLORIDRATO DE PIRIDOXINA + CIANOCOBALAMINA + FOSFATO DISSÓDICO DE DEXAMETASONA",
- "presentation": "(100,0 + 100,0) MG/ML SOL INJ IM CT 3 AMP VD AMB X 1 ML + (5,0 + 4,37) MG SOL INJ IM 3 AMP VD AMB X 2 ML",
- "ean": null,
- "added_attendance_id": "6b1b7d5e-22c9-435c-b43b-422acf5387db",
- "added_date": "2018-12-31",
- "start_date": "2018-12-31"
}
], - "dispensings": [
- {
- "id": "2t6b7d5e-22c9-435c-b43b-422acf9875db",
- "product": "CLORIDRATO DE TIAMINA + CLORIDRATO DE PIRIDOXINA + CIANOCOBALAMINA + FOSFATO DISSÓDICO DE DEXAMETASONA",
- "presentation": "(100,0 + 100,0) MG/ML SOL INJ IM CT 3 AMP VD AMB X 1 ML + (5,0 + 4,37) MG SOL INJ IM 3 AMP VD AMB X 2 ML",
- "ean": "7894900010015",
- "amount": 1,
- "prescriber": "Prescritor Souza",
- "prescriber_document": "COREN-PI 1212121",
- "created": "2023-05-29 17:14:04"
}
], - "vaccines": [
- {
- "id": "9y6b7d5e-22c9-435c-b43b-422acf9426mn",
- "vaccine_name": "Hepatite B",
- "dose_name": 1,
- "medicine_lot": "FAR23133232",
- "expiration_date": "01/01/2030",
- "product": "ENGERIX B",
- "presentation": "20 MCG SUS INJ CT FA VD TRANS 25 DOSES X 1 ML ATIVA",
- "ean": null
}
], - "rapid_tests": [
- {
- "id": "5c6b7d5e-22c9-435c-b43b-422acf9426os",
- "exam_name": "Perfil Lipídico LipidPro VYTTRA",
- "examination_date": "2023-05-29 17:14:04",
- "examination_lot": "TESTE1234",
- "exam_parameters": [
- {
- "name": "Colesterol HDL",
- "result": "< 100"
}, - {
- "name": "Colesterol Total",
- "result": "> 400"
}, - {
- "name": "Colesterol LDL",
- "result": "100"
}, - {
- "name": "Triglicerídeos",
- "result": "60"
}
]
}
]
}, - "api_version": "1.1.7",
- "timestamp": "2023-07-13 15:55:33"
}
O Webhook de Pacientes notifica sobre cadastro e edições em pacientes da rede. Os gatilhos são: new-patient
e edit-patient
.
object (Patient) | |
api_version | string |
timestamp | string <date-time> |
{- "data": {
- "id": "fbf08025-ba70-4beb-9869-f7d0a13a6446",
- "name": "GUILHERME CARVALHO",
- "email": "guilherme@teste.com.br",
- "document": 65819534077,
- "sex": "male",
- "birthday": "1976-05-13",
- "occupation": "Estudante",
- "schooling_degree": "medium",
- "religion": "Budista",
- "nationality": "brasileira",
- "mother_name": "Tania Maria",
- "skin_color": "indigenous",
- "birth_city": "Alto Paraná",
- "birth_state": "PR",
- "birth_country": "BRASILEIRA",
- "phones": [
- {
- "phone": "(21) 6598-3265"
}, - {
- "phone": "(54) 9865-3221"
}
], - "addresses": [
- {
- "street": "Rua Álvaro Moreira Filogônio",
- "number": 20,
- "complement": "Casa",
- "neighbourhood": "Alto Caiçaras",
- "city": "Belo Horizonte",
- "state": "MG",
- "country": null,
- "zip_code": 30750500
}
], - "contacts": [
- {
- "name": "Enfermeira Claudia",
- "email": "CLAUDIA@EMAIL.COM",
- "phone1": "(65) 98326-598",
- "phone2": "(65) 9832-2154"
}
], - "treatments": [
- {
- "id": "b60cd898-a395-4844-9ae8-9200a7197f6f",
- "product": "BUSCOPAN",
- "presentation": "10 MG/ML SOL OR CT FR VD AMB X 20 ML",
- "ean": null,
- "added_date": "2023-05-03 20:16:18",
- "added_attendance_",id": "3545c71f-ccc1-4bb8-b97f-3c7e2319288a",
- "start_date": "2023-05-03",
- "finished_date": "2023-05-06 03:00:00",
- "finished_attendance_id": null
}
], - "clinical_conditions": [
- {
- "id": "d56e8b38-2bf3-4597-af35-b2a638137a50",
- "code": "F452",
- "title": "Transtorno hipocondríaco",
- "category": "cronic",
- "added_date": "2023-06-05 19:18:39",
- "added_attendance_id": "f19694f1-2012-4bcd-aaac-17f0fdd8e024",
- "diagnosis_date": "2023-05-05",
- "finished_date": null,
- "finished_attendance_id": null
}
], - "dispensings": [
- {
- "id": "ff72f6f5-c447-4c17-af33-543af8e60a3c",
- "product": null,
- "presentation": "667 MG/ML XPE CT FR VD AMB X 120 ML",
- "ean": null,
- "amount": 20,
- "prescriber": "Admin Sanasama Silva",
- "prescriber_document": "CRF-MG 35353",
- "created": "2023-07-05 19:34:44"
}
], - "plano_saude": [
- {
- "id": 323357,
- "nome": "Unimed Cabo Frio Cooperativa Trabalho Médico Ltda.",
- "nome_fantasia": "Unimed Cabo Frio",
- "modalidade": "Cooperativa Médica",
- "cnpj": 27626696000112
}
]
}, - "api_version": "1.1.7",
- "timestamp": "2023-07-13 15:55:33"
}
O Webhook de Clínicas notifica sobre cadastro e edições em clínicas da rede. Os gatilhos são: new-clinic
e edit-clinic
.
object (Clinic) | |
api_version | string |
timestamp | string <date-time> |
object (ClinicModified) |
{- "data": {
- "id": "498124ed-53d5-46eb-89c9-2b1e6a6191a5",
- "identification": "Loja 01",
- "cnpj": "09390160000169",
- "active": true,
- "cnae": "4771-7/01",
- "cnes": "9999999",
- "timezone": "America/Sao_Paulo",
- "timezone_label": "America/Sao_Paulo",
- "service_hours": [
- null,
- {
- "start": "07:00",
- "end": "19:00"
}, - {
- "start": "07:00",
- "end": "19:00"
}, - {
- "start": "07:00",
- "end": "19:00"
}, - {
- "start": "07:00",
- "end": "19:00"
}, - {
- "start": "07:00",
- "end": "19:00"
}, - null
], - "break_time_start": "12:00",
- "break_time_end": "13:00",
- "online_appointment_antecedence_time": 12,
- "phones": [
- {
- "phone": "(21) 6598-3265"
}, - {
- "phone": "(54) 9865-3221"
}
], - "addresses": [
- {
- "street": "Rua Álvaro Moreira Filogônio",
- "number": 20,
- "complement": "Loja 03",
- "neighbourhood": "Alto Caiçaras",
- "city": "Belo Horizonte",
- "state": "MG",
- "country": null,
- "zip_code": 30750500
}
]
}, - "api_version": "1.1.7",
- "timestamp": "2023-07-13 15:55:33",
- "modified_data": {
- "edited_data": {
- "created": "2023-08-18T11:55:15+00:00",
- "category": "Clinic",
- "subject": "edit",
- "old_data": {
- "name": "Drogaria Exemplo 1",
- "identification": "Loja 01",
- "cnes": "9999999",
- "total_area": 250,
- "service_room_area": 7.5,
- "timezone_label": "America/Sao_Paulo",
- "pharmacy_head1": "Marcele Souza",
- "pharmacy_head2": "Marcos Rodriguez",
- "cnae": "4771-7/01",
- "sipni_origin_code": 13531554,
- "service_hours": [
- null,
- {
- "start": "07:00",
- "end": "19:00"
}, - {
- "start": "07:00",
- "end": "19:00"
}, - {
- "start": "07:00",
- "end": "19:00"
}, - {
- "start": "07:00",
- "end": "19:00"
}, - {
- "start": "07:00",
- "end": "19:00"
}, - null
], - "room_number": 1,
- "service_time_limit": 30,
- "allow_online_appointment": false,
- "description_term_covid": null,
- "online_appointment_antecedence_time": 24,
- "online_appointment_message": "Compareça no dia e hora agendado com no mínimo 5 minutos de antecedência portando seu CPF.",
- "company_type": "Farmácia Independente",
- "legal_name": "Razão Social da Sua Clínica",
- "sanitary_license": "MG123895645",
- "issuance_health_permit": "2022-12-31T03:00:00+00:00",
- "valid_health_permit": "2023-12-31T03:00:00+00:00",
- "addresses": [
- {
- "street": "Rua Álvaro Moreira Filogônio",
- "number": 20,
- "complement": "Loja 03",
- "neighbourhood": "Alto Caiçaras",
- "city": "Belo Horizonte",
- "state": "MG",
- "country": null,
- "zip_code": 30750500
}
], - "phones": [
- {
- "phone": "(21) 6598-3265"
}, - {
- "phone": "(54) 9865-3221"
}
]
}, - "new_data": {
- "name": "Drogaria Exemplo",
- "identification": "Loja 02",
- "cnes": "9999998",
- "total_area": 300,
- "service_room_area": 9.5,
- "timezone_label": "America/Sao_Paulo",
- "pharmacy_head1": "Marcele Souza Silva",
- "pharmacy_head2": "Marcos Rodriguez Almeida",
- "cnae": "2121-1/01",
- "sipni_origin_code": 13531555,
- "service_hours": [
- null,
- {
- "start": "08:00",
- "end": "20:00"
}, - {
- "start": "08:00",
- "end": "19:00"
}, - {
- "start": "07:00",
- "end": "20:00"
}, - {
- "start": "07:00",
- "end": "19:00"
}, - {
- "start": "07:00",
- "end": "20:00"
}, - null
], - "room_number": 2,
- "service_time_limit": 20,
- "allow_online_appointment": true,
- "description_term_covid": null,
- "online_appointment_antecedence_time": 12,
- "online_appointment_message": "Compareça no dia e hora agendado portando seu CPF.",
- "company_type": "Rede de Farmácias",
- "legal_name": "Razão Social da Sua Clínica Aqui",
- "sanitary_license": 12345678900,
- "issuance_health_permit": "2021-12-31T03:00:00+00:00",
- "valid_health_permit": "2024-12-31T03:00:00+00:00",
- "addresses": [
- {
- "street": "Rua Álvaro Moreira Filogônio",
- "number": 20,
- "complement": "Loja 03",
- "neighbourhood": "Alto Caiçaras",
- "city": "Belo Horizonte",
- "state": "MG",
- "country": null,
- "zip_code": 30750500
}
], - "phones": [
- {
- "phone": "(21) 6598-3265"
}, - {
- "phone": "(54) 9865-3221"
}
], - "tos": {
- "date": "2023-08-18T11:55:22.900Z",
- "version_terms": 2,
- "role_user": "subscriber",
- "document_user": "977.462.021-60",
- "name_user": "Administrador Moreira",
- "term_of_use": true
}
}, - "ip": "10.20.300.400",
- "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
- "modified": "2023-08-18T11:55:15+00:00"
}, - "user": [
- "Administrador",
- "Moreira",
- "moreira@email.com.br",
- "moreira@email.com.br",
- "977.462.021-60",
- "35353",
- "MG",
- "subscriber"
]
}
}
O Webhook de Usuários notifica sobre cadastro e edições em usuários da rede. Os gatilhos são: new-user
e edit-user
.
object (User) | |
api_version | string |
timestamp | string <date-time> |
{- "data": {
- "id": "498124ed-53d5-46eb-89c9-2b1e6a6191a5",
- "first_name": "João",
- "last_name": "Silva",
- "email": "email@example.org",
- "document": "55160198857",
- "crf": 35864,
- "crf_state": "MG",
- "crf_issuer": "CRF",
- "role": "manager",
- "active": true
}, - "api_version": "1.1.7",
- "timestamp": "2023-07-13 15:55:33"
}
O Webhook de Serviços notifica sobre cadastro e edições em serviços da rede. Os gatilhos são: new-service
e edit-service
.
object (Service) | |
api_version | string |
timestamp | string <date-time> |
{- "data": {
- "id": "6b1b7d5e-22c9-435c-b43b-422acf5387db",
- "code": "845",
- "name": "CHECKUP GLICEMIA CAPILAR",
- "description": "<p>Teste casual de glicemia capilar com glicosímetro comum, tanto para diabéticos como pacientes sem diagnóstico prévio. Acompanha resultado impressos com régua da glicemia</p>",
- "price": 6.51,
- "cost_percent": 1.23,
- "commission_percent": 10,
- "active": true
}, - "api_version": "1.1.7",
- "timestamp": "2023-07-13 15:55:33"
}