MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer Bearer {YOUR_API_BEARER_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Para autenticar, use o header Authorization: Bearer {YOUR_API_BEARER_TOKEN}.

Critérios de Avaliação

Endpoints para gestão de critérios de avaliação (listar, criar, ver, atualizar, remover).

Listar todos os critérios de avaliação

requires authentication

Retorna a lista de critérios de avaliação disponíveis.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/evaluation-criteria" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/evaluation-criteria"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": []
}
 

Request      

GET api/v1/evaluation-criteria

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Criar um novo critério de avaliação

requires authentication

Cria um novo critério de avaliação na base de dados.

Example request:
curl --request POST \
    "http://localhost:8000/api/v1/evaluation-criteria" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://localhost:8000/api/v1/evaluation-criteria"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/evaluation-criteria

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Nome do critério de avaliação. Example: consequatur

description   string  optional  

Descrição do critério. Example: Dolores dolorum amet iste laborum eius est dolor.

Ver detalhes de um critério de avaliação

requires authentication

Retorna os detalhes de um critério de avaliação específico pelo ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/evaluation-criteria/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/evaluation-criteria/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "No query results for model [App\\Models\\EvaluationCriterion] 17"
}
 

Request      

GET api/v1/evaluation-criteria/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do critério de avaliação. Example: 17

Atualizar um critério de avaliação

requires authentication

Atualiza os dados de um critério de avaliação existente.

Example request:
curl --request PUT \
    "http://localhost:8000/api/v1/evaluation-criteria/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://localhost:8000/api/v1/evaluation-criteria/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/evaluation-criteria/{id}

PATCH api/v1/evaluation-criteria/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do critério de avaliação. Example: 17

Body Parameters

name   string  optional  

Nome do critério de avaliação. Example: consequatur

description   string  optional  

Descrição do critério. Example: Dolores dolorum amet iste laborum eius est dolor.

Remover um critério de avaliação

requires authentication

Remove um critério de avaliação da base de dados pelo ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/v1/evaluation-criteria/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/evaluation-criteria/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/evaluation-criteria/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do critério de avaliação. Example: 17

Detalhes de Caso

Endpoints para gestão de detalhes de casos clínicos (listar, criar, ver, atualizar, remover).

Listar detalhes de caso por caso

requires authentication

Retorna a lista de detalhes de caso filtrada por case_id.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/case-details/by-case?case_id=17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"case_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/v1/case-details/by-case"
);

const params = {
    "case_id": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "case_id": 17
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


[{...}]
 

Request      

GET api/v1/case-details/by-case

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

case_id   integer   

Filtrar detalhes por caso. Example: 17

Body Parameters

case_id   integer   

The id of an existing record in the case_models table. Example: 17

Listar todos os detalhes de casos

requires authentication

Retorna a lista de detalhes de casos disponíveis.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/case-details" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/case-details"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 1,
            "case_id": 1,
            "patient_avatar_id": "man-30",
            "clinical_scene_id": "office",
            "outfit": "dressed",
            "description": "For the past two weeks, the patient has been experiencing intermittent chest tightness. The patient noticed occasional shortness of breath and increased fatigue.",
            "patient_prompt": "You are Samuel Thompson, a 45-year-old marketing executive visiting a doctor's office. ...",
            "condition_name": "Angina",
            "checklist": "[]",
            "physical_exams": "[]",
            "settings": "{\"durationMinutes\":8,\"preparationMinutes\":2,\"warningMinutes\":2}",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/v1/case-details

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Criar um novo detalhe de caso

requires authentication

Cria um novo detalhe de caso na base de dados.

Example request:
curl --request POST \
    "http://localhost:8000/api/v1/case-details" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"case_id\": 17,
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://localhost:8000/api/v1/case-details"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "case_id": 17,
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/case-details

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

case_id   integer   

ID do caso associado. Example: 17

description   string   

Descrição do detalhe. Example: Dolores dolorum amet iste laborum eius est dolor.

Ver detalhes de um detalhe de caso

requires authentication

Retorna os detalhes de um detalhe de caso específico pelo ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/case-details/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/case-details/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "No query results for model [App\\Models\\CaseDetail] 17"
}
 

Request      

GET api/v1/case-details/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do detalhe de caso. Example: 17

Atualizar um detalhe de caso

requires authentication

Atualiza os dados de um detalhe de caso existente.

Example request:
curl --request PUT \
    "http://localhost:8000/api/v1/case-details/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"case_id\": 17,
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://localhost:8000/api/v1/case-details/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "case_id": 17,
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/case-details/{id}

PATCH api/v1/case-details/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do detalhe de caso. Example: 17

Body Parameters

case_id   integer  optional  

ID do caso associado. Example: 17

description   string  optional  

Descrição do detalhe. Example: Dolores dolorum amet iste laborum eius est dolor.

Remover um detalhe de caso

requires authentication

Remove um detalhe de caso da base de dados pelo ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/v1/case-details/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/case-details/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/case-details/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do detalhe de caso. Example: 17

Exam Sets

Endpoints para gestão de conjuntos de exames (listar, criar, ver, atualizar, remover).

Listar todos os conjuntos de exames

requires authentication

Retorna a lista de conjuntos de exames disponíveis.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/exam-sets" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/exam-sets"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 1,
            "name": "General Clinical Skills Assessment",
            "profession_id": 1,
            "case_count": 8,
            "duration_minutes": 80,
            "case_types": "[\"history_taking\",\"clinical_examination\",\"diagnosis\"]",
            "system_generated": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 2,
            "name": "Neurology Focused Assessment",
            "profession_id": 1,
            "case_count": 6,
            "duration_minutes": 60,
            "case_types": "[\"history_taking\",\"clinical_examination\"]",
            "system_generated": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 3,
            "name": "System Generated",
            "profession_id": 1,
            "case_count": null,
            "duration_minutes": null,
            "case_types": "[\"history_taking\",\"clinical_examination\",\"diagnosis\",\"counselling\"]",
            "system_generated": "{\"available\":true,\"maxCases\":20,\"caseTypes\":[\"history_taking\",\"clinical_examination\",\"diagnosis\",\"counselling\"]}",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/v1/exam-sets

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Criar um novo conjunto de exames

requires authentication

Cria um novo conjunto de exames na base de dados.

Example request:
curl --request POST \
    "http://localhost:8000/api/v1/exam-sets" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"profession_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/v1/exam-sets"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "profession_id": 17
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/exam-sets

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Nome do conjunto de exames. Example: consequatur

profession_id   integer   

ID da profissão associada. Example: 17

Ver detalhes de um conjunto de exames

requires authentication

Retorna os detalhes de um conjunto de exames específico pelo ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/exam-sets/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/exam-sets/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "No query results for model [App\\Models\\ExamSet] 17"
}
 

Request      

GET api/v1/exam-sets/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do conjunto de exames. Example: 17

Atualizar um conjunto de exames

requires authentication

Atualiza os dados de um conjunto de exames existente.

Example request:
curl --request PUT \
    "http://localhost:8000/api/v1/exam-sets/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"profession_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/v1/exam-sets/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "profession_id": 17
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/exam-sets/{id}

PATCH api/v1/exam-sets/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do conjunto de exames. Example: 17

Body Parameters

name   string  optional  

Nome do conjunto de exames. Example: consequatur

profession_id   integer  optional  

ID da profissão associada. Example: 17

Remover um conjunto de exames

requires authentication

Remove um conjunto de exames da base de dados pelo ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/v1/exam-sets/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/exam-sets/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/exam-sets/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do conjunto de exames. Example: 17

Modelos de Caso

Endpoints para gestão de modelos de casos clínicos (listar, criar, ver, atualizar, remover).

Listar casos por especialidade

requires authentication

Retorna a lista de casos filtrada por especialidade.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/cases/by-specialty?specialty_id=17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"specialty_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/v1/cases/by-specialty"
);

const params = {
    "specialty_id": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "specialty_id": 17
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


[{...}]
 

Request      

GET api/v1/cases/by-specialty

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

specialty_id   integer   

Filtrar casos por especialidade. Example: 17

Body Parameters

specialty_id   integer   

The id of an existing record in the specialties table. Example: 17

Listar todos os modelos de casos

requires authentication

Retorna a lista de modelos de casos disponíveis.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/cases" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/cases"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 1,
            "profession_id": 1,
            "training_type_id": 1,
            "case_type_id": 1,
            "specialty_id": 1,
            "title_practice": "Chest tightness",
            "title_exam": "Case 1",
            "duration_minutes": 8,
            "preparation_minutes": 2,
            "supports_guided": true,
            "enabled": true,
            "icon": "ChestTightness",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 2,
            "profession_id": 1,
            "training_type_id": 1,
            "case_type_id": 1,
            "specialty_id": 1,
            "title_practice": "Exercise intolerance",
            "title_exam": "Case 2",
            "duration_minutes": 8,
            "preparation_minutes": 2,
            "supports_guided": true,
            "enabled": true,
            "icon": "ExerciseIntolerance",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 3,
            "profession_id": 1,
            "training_type_id": 1,
            "case_type_id": 1,
            "specialty_id": 1,
            "title_practice": "Chest tightness",
            "title_exam": "Case 3",
            "duration_minutes": 8,
            "preparation_minutes": 2,
            "supports_guided": true,
            "enabled": true,
            "icon": "ChestTightness",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 4,
            "profession_id": 1,
            "training_type_id": 1,
            "case_type_id": 1,
            "specialty_id": 1,
            "title_practice": "Exercise intolerance",
            "title_exam": "Case 4",
            "duration_minutes": 8,
            "preparation_minutes": 2,
            "supports_guided": true,
            "enabled": true,
            "icon": "ExerciseIntolerance",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 5,
            "profession_id": 1,
            "training_type_id": 1,
            "case_type_id": 1,
            "specialty_id": 1,
            "title_practice": "Exercise intolerance",
            "title_exam": "Case 5",
            "duration_minutes": 8,
            "preparation_minutes": 2,
            "supports_guided": true,
            "enabled": true,
            "icon": "ExerciseIntolerance",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 6,
            "profession_id": 1,
            "training_type_id": 1,
            "case_type_id": 1,
            "specialty_id": 1,
            "title_practice": "Exercise intolerance",
            "title_exam": "Case 6",
            "duration_minutes": 8,
            "preparation_minutes": 2,
            "supports_guided": true,
            "enabled": true,
            "icon": "ExerciseIntolerance",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 7,
            "profession_id": 1,
            "training_type_id": 1,
            "case_type_id": 1,
            "specialty_id": 2,
            "title_practice": "Worsening cold symptoms",
            "title_exam": "Case 7",
            "duration_minutes": 8,
            "preparation_minutes": 2,
            "supports_guided": true,
            "enabled": true,
            "icon": "Pulmonology",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 8,
            "profession_id": 1,
            "training_type_id": 1,
            "case_type_id": 1,
            "specialty_id": 3,
            "title_practice": "Fatigue and yellow eyes",
            "title_exam": "Case 8",
            "duration_minutes": 8,
            "preparation_minutes": 2,
            "supports_guided": true,
            "enabled": true,
            "icon": "Gastroenterology",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 9,
            "profession_id": 3,
            "training_type_id": 7,
            "case_type_id": 2,
            "specialty_id": 4,
            "title_practice": "Adult Critical Care Nursing",
            "title_exam": "ICU Demo",
            "duration_minutes": 15,
            "preparation_minutes": 2,
            "supports_guided": false,
            "enabled": true,
            "icon": "content_card_icu_image",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/v1/cases

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Criar um novo modelo de caso

requires authentication

Cria um novo modelo de caso na base de dados.

Example request:
curl --request POST \
    "http://localhost:8000/api/v1/cases" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://localhost:8000/api/v1/cases"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/cases

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Nome do modelo de caso. Example: consequatur

description   string  optional  

Descrição do modelo. Example: Dolores dolorum amet iste laborum eius est dolor.

Ver detalhes de um modelo de caso

requires authentication

Retorna os detalhes de um modelo de caso específico pelo ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/cases/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/cases/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "No query results for model [App\\Models\\CaseModel] 17"
}
 

Request      

GET api/v1/cases/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do modelo de caso. Example: 17

Atualizar um modelo de caso

requires authentication

Atualiza os dados de um modelo de caso existente.

Example request:
curl --request PUT \
    "http://localhost:8000/api/v1/cases/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://localhost:8000/api/v1/cases/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/cases/{id}

PATCH api/v1/cases/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do modelo de caso. Example: 17

Body Parameters

name   string  optional  

Nome do modelo de caso. Example: consequatur

description   string  optional  

Descrição do modelo. Example: Dolores dolorum amet iste laborum eius est dolor.

Remover um modelo de caso

requires authentication

Remove um modelo de caso da base de dados pelo ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/v1/cases/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/cases/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/cases/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do modelo de caso. Example: 17

Professions

Endpoints para gestão de profissões (listar, criar, ver, atualizar, remover).

Listar todas as profissões

requires authentication

Retorna a lista de profissões disponíveis para seleção no menu inicial.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/professions" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/professions"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{"description": "Select your professional area to proceed:", "professions": [{"id": 1, "name": "Medical", ...}]}
 

Request      

GET api/v1/professions

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Criar uma nova profissão

requires authentication

Cria uma nova profissão na base de dados.

Example request:
curl --request POST \
    "http://localhost:8000/api/v1/professions" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"enabled\": false,
    \"icon\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/v1/professions"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "enabled": false,
    "icon": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/professions

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Nome da profissão. Example: consequatur

enabled   boolean   

Se está ativa. Example: false

icon   string  optional  

Ícone associado. Example: consequatur

Ver detalhes de uma profissão

requires authentication

Retorna os detalhes de uma profissão específica pelo ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/professions/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/professions/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "No query results for model [App\\Models\\Profession] 17"
}
 

Request      

GET api/v1/professions/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID da profissão. Example: 17

Atualizar uma profissão

requires authentication

Atualiza os dados de uma profissão existente.

Example request:
curl --request PUT \
    "http://localhost:8000/api/v1/professions/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"enabled\": false,
    \"icon\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/v1/professions/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "enabled": false,
    "icon": "consequatur"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/professions/{id}

PATCH api/v1/professions/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID da profissão. Example: 17

Body Parameters

name   string  optional  

Nome da profissão. Example: consequatur

enabled   boolean  optional  

Se está ativa. Example: false

icon   string  optional  

Ícone associado. Example: consequatur

Remover uma profissão

requires authentication

Remove uma profissão da base de dados pelo ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/v1/professions/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/professions/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/professions/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID da profissão. Example: 17

Specialties

Endpoints para gestão de especialidades (listar, criar, ver, atualizar, remover).

Listar especialidades por tipo de caso

requires authentication

Retorna a lista de especialidades filtrada por tipo de caso.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/specialties/by-case-type?case_type_id=17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"case_type_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/v1/specialties/by-case-type"
);

const params = {
    "case_type_id": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "case_type_id": 17
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{"description": "Select a specialty for 'nome do case_type' practice:", "specialties": [{...}]}
 

Request      

GET api/v1/specialties/by-case-type

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

case_type_id   integer   

Filtrar especialidades por tipo de caso. Example: 17

Body Parameters

case_type_id   integer   

The id of an existing record in the case_types table. Example: 17

Listar todas as especialidades

requires authentication

Retorna a lista de especialidades disponíveis.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/specialties" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/specialties"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 1,
            "name": "cardiology",
            "case_type_id": 1,
            "enabled": true,
            "icon": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 2,
            "name": "pulmonology",
            "case_type_id": 1,
            "enabled": true,
            "icon": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 3,
            "name": "hepatology",
            "case_type_id": 1,
            "enabled": true,
            "icon": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 4,
            "name": "critical_care",
            "case_type_id": 2,
            "enabled": true,
            "icon": null,
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/v1/specialties

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Criar uma nova especialidade

requires authentication

Cria uma nova especialidade na base de dados.

Example request:
curl --request POST \
    "http://localhost:8000/api/v1/specialties" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"case_type_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/v1/specialties"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "case_type_id": 17
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/specialties

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Nome da especialidade. Example: consequatur

case_type_id   integer   

ID do tipo de caso associado. Example: 17

Ver detalhes de uma especialidade

requires authentication

Retorna os detalhes de uma especialidade específica pelo ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/specialties/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/specialties/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "No query results for model [App\\Models\\Specialty] 17"
}
 

Request      

GET api/v1/specialties/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID da especialidade. Example: 17

Atualizar uma especialidade

requires authentication

Atualiza os dados de uma especialidade existente.

Example request:
curl --request PUT \
    "http://localhost:8000/api/v1/specialties/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"case_type_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/v1/specialties/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "case_type_id": 17
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/specialties/{id}

PATCH api/v1/specialties/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID da especialidade. Example: 17

Body Parameters

name   string  optional  

Nome da especialidade. Example: consequatur

case_type_id   integer  optional  

ID do tipo de caso associado. Example: 17

Remover uma especialidade

requires authentication

Remove uma especialidade da base de dados pelo ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/v1/specialties/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/specialties/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/specialties/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID da especialidade. Example: 17

Tipos de Caso

Endpoints para gestão de tipos de casos clínicos (listar, criar, ver, atualizar, remover).

Listar tipos de caso por tipo de treino

requires authentication

Retorna a lista de tipos de caso filtrada por tipo de treino.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/case-types/by-training-type?training_type_id=17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"training_type_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/v1/case-types/by-training-type"
);

const params = {
    "training_type_id": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "training_type_id": 17
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{"description": "Choose the skill you want to focus on:", "case_types": [{...}]}
 

Request      

GET api/v1/case-types/by-training-type

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

training_type_id   integer   

Filtrar tipos de caso por tipo de treino. Example: 17

Body Parameters

training_type_id   integer   

The id of an existing record in the training_types table. Example: 17

Listar todos os tipos de casos

requires authentication

Retorna a lista de tipos de casos disponíveis.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/case-types" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/case-types"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 1,
            "name": "history_taking",
            "training_type_id": 1,
            "enabled": true,
            "icon": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 2,
            "name": "icu_procedures",
            "training_type_id": 7,
            "enabled": true,
            "icon": null,
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/v1/case-types

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Criar um novo tipo de caso

requires authentication

Cria um novo tipo de caso na base de dados.

Example request:
curl --request POST \
    "http://localhost:8000/api/v1/case-types" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://localhost:8000/api/v1/case-types"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/case-types

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Nome do tipo de caso. Example: consequatur

description   string  optional  

Descrição do tipo. Example: Dolores dolorum amet iste laborum eius est dolor.

Ver detalhes de um tipo de caso

requires authentication

Retorna os detalhes de um tipo de caso específico pelo ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/case-types/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/case-types/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "No query results for model [App\\Models\\CaseType] 17"
}
 

Request      

GET api/v1/case-types/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do tipo de caso. Example: 17

Atualizar um tipo de caso

requires authentication

Atualiza os dados de um tipo de caso existente.

Example request:
curl --request PUT \
    "http://localhost:8000/api/v1/case-types/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://localhost:8000/api/v1/case-types/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/case-types/{id}

PATCH api/v1/case-types/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do tipo de caso. Example: 17

Body Parameters

name   string  optional  

Nome do tipo de caso. Example: consequatur

description   string  optional  

Descrição do tipo. Example: Dolores dolorum amet iste laborum eius est dolor.

Remover um tipo de caso

requires authentication

Remove um tipo de caso da base de dados pelo ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/v1/case-types/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/case-types/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/case-types/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do tipo de caso. Example: 17

Training Types

Endpoints para gestão de tipos de treino (listar, criar, ver, atualizar, remover).

Listar tipos de treino por profissão

requires authentication

Retorna a lista de tipos de treino filtrada por profissão.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/training-types/by-profession?profession_id=17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"profession_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/v1/training-types/by-profession"
);

const params = {
    "profession_id": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "profession_id": 17
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{"description": "Choose your preferred preparation format:", "training_types": [{...}]}
 

Request      

GET api/v1/training-types/by-profession

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

profession_id   integer   

Filtrar tipos de treino por profissão. Example: 17

Body Parameters

profession_id   integer   

The id of an existing record in the professions table. Example: 17

Listar todos os tipos de treino

requires authentication

Retorna a lista de todos os tipos de treino disponíveis.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/training-types" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/training-types"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "id": 1,
            "name": "OSCE Practice",
            "profession_id": 1,
            "enabled": true,
            "icon": "OSCEPractice",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 2,
            "name": "SOE Practice",
            "profession_id": 1,
            "enabled": false,
            "icon": "SOEPractice",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 3,
            "name": "OSCE & SOE Exam",
            "profession_id": 1,
            "enabled": false,
            "icon": "OSCE_SOE_EXAM",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 4,
            "name": "OSCE Practice",
            "profession_id": 2,
            "enabled": false,
            "icon": "OSCEPractice",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 5,
            "name": "SOE Practice",
            "profession_id": 2,
            "enabled": false,
            "icon": "SOEPractice",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 6,
            "name": "OSCE & SOE Exam",
            "profession_id": 2,
            "enabled": false,
            "icon": "OSCE_SOE_EXAM",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": 7,
            "name": "Procedures",
            "profession_id": 3,
            "enabled": true,
            "icon": "nursing",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/v1/training-types

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Criar um novo tipo de treino

requires authentication

Cria um novo tipo de treino na base de dados.

Example request:
curl --request POST \
    "http://localhost:8000/api/v1/training-types" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"profession_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/v1/training-types"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "profession_id": 17
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/training-types

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Nome do tipo de treino. Example: consequatur

profession_id   integer   

ID da profissão associada. Example: 17

Ver detalhes de um tipo de treino

requires authentication

Retorna os detalhes de um tipo de treino específico pelo ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/v1/training-types/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/training-types/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "No query results for model [App\\Models\\TrainingType] 17"
}
 

Request      

GET api/v1/training-types/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do tipo de treino. Example: 17

Atualizar um tipo de treino

requires authentication

Atualiza os dados de um tipo de treino existente.

Example request:
curl --request PUT \
    "http://localhost:8000/api/v1/training-types/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"consequatur\",
    \"profession_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/v1/training-types/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "consequatur",
    "profession_id": 17
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/training-types/{id}

PATCH api/v1/training-types/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do tipo de treino. Example: 17

Body Parameters

name   string  optional  

Nome do tipo de treino. Example: consequatur

profession_id   integer  optional  

ID da profissão associada. Example: 17

Remover um tipo de treino

requires authentication

Remove um tipo de treino da base de dados pelo ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/v1/training-types/17" \
    --header "Authorization: Bearer Bearer {YOUR_API_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/v1/training-types/17"
);

const headers = {
    "Authorization": "Bearer Bearer {YOUR_API_BEARER_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/training-types/{id}

Headers

Authorization      

Example: Bearer Bearer {YOUR_API_BEARER_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID do tipo de treino. Example: 17