curl -X POST https://api.medagenda.com/consultations/create \
-H "Content-Type: application/json" \
-d '{
"patient": {
"cpf": "12345678901"
},
"doctor": {
"crm": "123456SP"
},
"dateTime": "2024-03-15T14:30:00",
"isUrgent": false,
"observation": "Patient reports mild headaches for the past week"
}'
{
"consultationId": "550e8400-e29b-41d4-a716-446655440000",
"dateTime": "2024-03-15T14:30:00",
"duracaoMinutos": 60,
"patient": {
"cpf": "12345678901",
"name": "João Silva",
"email": "joao.silva@email.com",
"dateOfBirth": "1985-06-15",
"address": "Rua das Flores, 123, São Paulo, SP",
"medicalHistory": "Hypertension, controlled with medication"
},
"doctor": {
"crm": "123456SP",
"name": "Dr. Maria Santos",
"email": "maria.santos@medagenda.com",
"specialty": "Cardiologia",
"telephone": "+5511987654321",
"consultationValue": 350.00
},
"isUrgent": false,
"observation": "Patient reports mild headaches for the past week"
}
Schedule a new consultation and automatically create a pending payment record
curl -X POST https://api.medagenda.com/consultations/create \
-H "Content-Type: application/json" \
-d '{
"patient": {
"cpf": "12345678901"
},
"doctor": {
"crm": "123456SP"
},
"dateTime": "2024-03-15T14:30:00",
"isUrgent": false,
"observation": "Patient reports mild headaches for the past week"
}'
{
"consultationId": "550e8400-e29b-41d4-a716-446655440000",
"dateTime": "2024-03-15T14:30:00",
"duracaoMinutos": 60,
"patient": {
"cpf": "12345678901",
"name": "João Silva",
"email": "joao.silva@email.com",
"dateOfBirth": "1985-06-15",
"address": "Rua das Flores, 123, São Paulo, SP",
"medicalHistory": "Hypertension, controlled with medication"
},
"doctor": {
"crm": "123456SP",
"name": "Dr. Maria Santos",
"email": "maria.santos@medagenda.com",
"specialty": "Cardiologia",
"telephone": "+5511987654321",
"consultationValue": 350.00
},
"isUrgent": false,
"observation": "Patient reports mild headaches for the past week"
}
Show Patient properties
Show Doctor properties
consultationValuePENDINGdelivered@resend.dev with:
curl -X POST https://api.medagenda.com/consultations/create \
-H "Content-Type: application/json" \
-d '{
"patient": {
"cpf": "12345678901"
},
"doctor": {
"crm": "123456SP"
},
"dateTime": "2024-03-15T14:30:00",
"isUrgent": false,
"observation": "Patient reports mild headaches for the past week"
}'
{
"consultationId": "550e8400-e29b-41d4-a716-446655440000",
"dateTime": "2024-03-15T14:30:00",
"duracaoMinutos": 60,
"patient": {
"cpf": "12345678901",
"name": "João Silva",
"email": "joao.silva@email.com",
"dateOfBirth": "1985-06-15",
"address": "Rua das Flores, 123, São Paulo, SP",
"medicalHistory": "Hypertension, controlled with medication"
},
"doctor": {
"crm": "123456SP",
"name": "Dr. Maria Santos",
"email": "maria.santos@medagenda.com",
"specialty": "Cardiologia",
"telephone": "+5511987654321",
"consultationValue": 350.00
},
"isUrgent": false,
"observation": "Patient reports mild headaches for the past week"
}