POST Criar Pré-consulta
Cria uma pré-consulta para um paciente, independente de já existir uma consulta. Nasce com status: "OPEN".
Autenticação necessária
Envie o header Authorization: Bearer {accessToken} (token de usuário) ou x-api-key: {apiKey} (integrações). Veja Autenticação.
Permissão necessária
Exige a permissão create_preconsultations.
Endpoint
POST https://api-dev.imagemais.com.br/api/pre-consultations
Corpo da Requisição
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
patientId | number | ✅ | ID do paciente (inteiro positivo, da mesma conta) |
bloodPressure | string | ❌ | Pressão arterial (ex.: "120/80") |
heartRate | string | ❌ | Frequência cardíaca |
temperature | string | ❌ | Temperatura |
weight | string | ❌ | Peso |
height | string | ❌ | Altura |
glucose | string | ❌ | Glicemia |
consultationReason | string | ❌ | Motivo da consulta — obrigatório para Iniciar Entrevista |
Os sinais vitais são texto livre — o servidor não valida formato nem unidade.
Requisição
curl -X 'POST' \
'https://api-dev.imagemais.com.br/api/pre-consultations' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {accessToken}' \
-H 'Content-Type: application/json' \
-d '{
"patientId": 53,
"bloodPressure": "120/80",
"heartRate": "72",
"temperature": "36.5",
"weight": "70",
"height": "175",
"glucose": "90"
}'
Respostas
201 Criado
{
"id": 29,
"accountId": 1,
"patientId": 53,
"bloodPressure": "120/80",
"heartRate": "72",
"temperature": "36.5",
"weight": "70",
"height": "175",
"consultationReason": null,
"glucose": "90",
"status": "OPEN",
"createdAt": "2026-09-29T22:53:41.313Z",
"updatedAt": "2026-09-29T22:53:41.313Z",
"deletedAt": null
}
| Campo | Tipo | Descrição |
|---|---|---|
id | number | ID da pré-consulta |
accountId | number | Conta dona do registro |
patientId | number | Paciente |
bloodPressure, heartRate, temperature, weight, height, glucose | string | null | Sinais vitais (texto livre) |
consultationReason | string | null | Motivo da consulta |
status | string | OPEN (em aberto) ou CONVERTED (já virou consulta) |
createdAt, updatedAt | string | Datas de criação e última alteração |
deletedAt | string | null | Preenchido quando excluída |
400 Bad Request
Retornado quando patientId não é enviado ou não é um número positivo.
{
"message": [
"patientId should not be empty",
"patientId must be a number conforming to the specified constraints",
"patientId must be a positive number"
],
"error": "Bad Request",
"statusCode": 400
}
404 Paciente não encontrado
Retornado quando o patientId não existe na conta.
{
"message": "Paciente não encontrado",
"error": "Not Found",
"statusCode": 404
}