POST/api/doctors

Criar Médico

Cria um novo médico

Access Token

Para realizar requisições GET, POST, PUT, DELETE e PATCH nos endpoints da API você precisa de uma chave de autorização. Chamamos essa chave de accessToken.

Para ter acesso ao accessToken, é necessário que o usuário master da licença efetue a liberação deste pela interface do ImageMais Clinic. O accessToken tem validade de 1 hora.

Headers

AuthorizationOBRIGATÓRIO
Tipo:string
Token de autenticação no formato Bearer {accessToken}
Content-TypeOBRIGATÓRIO
Tipo:application/json
Tipo de conteúdo (application/json)

Parâmetros

nameOBRIGATÓRIO
Tipo:string
Nome do médico
procedureIdsOBRIGATÓRIO
Tipo:array
Array de IDs dos procedimentos associados ao médico
startTimeOBRIGATÓRIO
Tipo:string
Horário de início do expediente (formato: HH:mm)
endTimeOBRIGATÓRIO
Tipo:string
Horário de término do expediente (formato: HH:mm)
intervalMinutesOBRIGATÓRIO
Tipo:number
Intervalo em minutos entre os atendimentos
workingDaysOBRIGATÓRIO
Tipo:array
Array com os dias da semana em que o médico trabalha

Request URL

https://api-dev.imagemais.com/api/doctors
curl -X 'POST' \
  'https://api-dev.imagemais.com/api/doctors' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjExLCJhY2NvdW50SWQiOjEsImlhdCI6MTc2NTk3MDg4NCwiZXhwIjoxNzY1OTc0NDg0LCJhdWQiOiJodHRwczovL2FwaS1kZXYuaW1hZ2VtYWlzLmNvbSIsImlzcyI6Imh0dHBzOi8vYXBwLWRldi5pbWFnZW1haXMuY29tIn0.DB8r_zjVsUVz1Hqr971F_hUcmvRtMqpBTlQMxlKZ3Gc' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "João da Silva",
  "procedureIds": [
    "1",
    "2",
    "3",
    "4",
    "5"
  ],
  "startTime": "08:00",
  "endTime": "16:00",
  "intervalMinutes": 30,
  "workingDays": [
    "Segunda, Terca, Quarta, Quinta, Sexta"
  ]
}'
{
  "name": "João da Silva",
  "procedureIds": [
  ...
{
  "name": "João da Silva",
  "procedureIds": [
    "1",
    "2",
    "3",
    "4",
    "5"
  ],
  "startTime": "08:00",
  "endTime": "16:00",
  "intervalMinutes": 30,
  "workingDays": [
    "Segunda, Terca, Quarta, Quinta, Sexta"
  ]
}

Respostas

{
  "data": {
    "id": 5,
  ...
{
  "data": {
    "id": 5,
    "name": "João da Silva",
    "startTime": "08:00",
    "endTime": "16:00",
    "intervalMinutes": 30,
    "workingDays": [
      "Segunda, Terca, Quarta, Quinta, Sexta"
    ],
    "isActive": true,
    "isBusy": false,
    "accountId": 1,
    "createdAt": "2025-12-17T12:38:42.322Z",
    "updatedAt": "2025-12-17T12:38:42.322Z",
    "deletedAt": null,
    "doctorProcedures": [
      {
        "doctorId": 5,
        "procedureId": 1,
        "createdAt": "2025-12-17T12:38:42.322Z",
        "updatedAt": "2025-12-17T12:38:42.322Z",
        "deletedAt": null,
        "procedure": {
          "id": 1,
          "name": "string",
          "synonyms": "Beta estradiol, E2, estradiol, estrógeno, exame de estradiol, dosagem de estradiol, análise de E2, teste de beta estradiol, avaliação de estradiol, primeira amostra de estrógeno.",
          "price": "0",
          "accountId": 1,
          "laudoLocal": true,
          "createdAt": "2025-03-07T13:30:34.273Z",
          "updatedAt": "2025-12-08T17:05:11.999Z",
          "deletedAt": "2025-12-08T17:05:11.997Z"
        }
      },
      {
        "doctorId": 5,
        "procedureId": 2,
        "createdAt": "2025-12-17T12:38:42.322Z",
        "updatedAt": "2025-12-17T12:38:42.322Z",
        "deletedAt": null,
        "procedure": {
          "id": 2,
          "name": "17 BETA ESTRADIOL E2 - SEGUNDA AMOSTRA",
          "synonyms": "17 Beta Estradiol, Estradiol, E2, Estrógeno, Hormônio Sexualmente Ativo, Estrógeno Beta, Estrógeno Circulante, Beta-Estradiol, Hormônio Estrógenico, Estrógeno Livre.",
          "price": "252",
          "accountId": 1,
          "laudoLocal": false,
          "createdAt": "2025-03-07T13:30:34.333Z",
          "updatedAt": "2025-03-07T13:30:37.440Z",
          "deletedAt": null
        }
      },
      {
        "doctorId": 5,
        "procedureId": 3,
        "createdAt": "2025-12-17T12:38:42.322Z",
        "updatedAt": "2025-12-17T12:38:42.322Z",
        "deletedAt": null,
        "procedure": {
          "id": 3,
          "name": "17 BETA ESTRADIOL E2 - TERCEIRA AMOSTRA",
          "synonyms": "beta estradiol, estradiol E2, exame de estradiol, dosagem de estradiol, análise de estradiol, teste de estradiol, avaliação de estradiol, medição de estradiol, exame de beta estradiol, amostra de estradiol.",
          "price": "252",
          "accountId": 1,
          "laudoLocal": false,
          "createdAt": "2025-03-07T13:30:34.346Z",
          "updatedAt": "2025-03-07T13:30:38.314Z",
          "deletedAt": null
        }
      },
      {
        "doctorId": 5,
        "procedureId": 4,
        "createdAt": "2025-12-17T12:38:42.322Z",
        "updatedAt": "2025-12-17T12:38:42.322Z",
        "deletedAt": null,
        "procedure": {
          "id": 4,
          "name": "17 BETA ESTRADIOL E2 - QUARTA AMOSTRA",
          "synonyms": "Beta estradiol, E2, estradiol livre, estradiol total, hormônio estrógeno, 17-beta-estradiol, estradiol sérico, nível de estradiol, estrógeno circulante, teste de estradiol.",
          "price": "0",
          "accountId": 1,
          "laudoLocal": false,
          "createdAt": "2025-03-07T13:30:34.357Z",
          "updatedAt": "2025-03-07T13:30:36.779Z",
          "deletedAt": null
        }
      },
      {
        "doctorId": 5,
        "procedureId": 5,
        "createdAt": "2025-12-17T12:38:42.322Z",
        "updatedAt": "2025-12-17T12:38:42.322Z",
        "deletedAt": null,
        "procedure": {
          "id": 5,
          "name": "17 BETA ESTRADIOL E2 - QUINTA AMOSTRA",
          "synonyms": "estradiol, E2, beta-estradiol, hormônio estradiol, estrógeno, estrógeno beta, 17-beta-estradiol, 17E2, estrógenos, dosagem de estradiol",
          "price": "0",
          "accountId": 1,
          "laudoLocal": false,
          "createdAt": "2025-03-07T13:30:34.367Z",
          "updatedAt": "2025-03-07T13:30:38.177Z",
          "deletedAt": null
        }
      }
    ]
  }
}
{
  "message": [
    "name must be shorter than or equal to 200 characters",
  ...
{
  "message": [
    "name must be shorter than or equal to 200 characters",
    "name should not be empty",
    "name must be a string"
  ]
}
{
  "message": [
    "procedureIds should not be empty",
  ...
{
  "message": [
    "procedureIds should not be empty",
    "procedureIds must be an array"
  ]
}
{
  "message": [
    "procedureIds must be an array"
  ...
{
  "message": [
    "procedureIds must be an array"
  ]
}
{
  "message": [
    "startTime should not be empty",
  ...
{
  "message": [
    "startTime should not be empty",
    "startTime must be a string"
  ]
}
{
  "message": [
    "endTime should not be empty",
  ...
{
  "message": [
    "endTime should not be empty",
    "endTime must be a string"
  ]
}
{
  "message": [
    "intervalMinutes should not be empty",
  ...
{
  "message": [
    "intervalMinutes should not be empty",
    "intervalMinutes must be a number conforming to the specified constraints"
  ]
}
{
  "message": [
    "workingDays should not be empty",
  ...
{
  "message": [
    "workingDays should not be empty",
    "workingDays must be an array"
  ]
}
{
  "statusCode": 401,
  "message": "invalid token"
  ...
{
  "statusCode": 401,
  "message": "invalid token"
}
{
  "statusCode": 401,
  "message": "jwt expired"
  ...
{
  "statusCode": 401,
  "message": "jwt expired"
}
{
  "statusCode": 500,
  "message": "Internal server error"
  ...
{
  "statusCode": 500,
  "message": "Internal server error"
}