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 {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Auth
Gera o link de autenticação do Google (via Socialite) para iniciar o fluxo de login.
Este endpoint recebe o URL de redirecionamento pós-login e retorna o link do Google para o qual o frontend deve direcionar o usuário. O parâmetro 'redirect_to' é usado como 'state' no OAuth para manter a segurança e o contexto da aplicação.
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/auth/google/link?redirect_to=http%3A%2F%2Fwww.bailey.biz%2Fquos-velit-et-fugiat-sunt-nihil-accusantium-harum.html" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"redirect_to\": \"architecto\"
}"
const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/auth/google/link"
);
const params = {
"redirect_to": "http://www.bailey.biz/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"redirect_to": "architecto"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"url": "string"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Callback de Autenticação via Google Socialite.
Este endpoint processa o retorno do Google após a autorização do usuário. Ele localiza ou cria o usuário na base de dados, gera um Personal Access Token (Sanctum) e redireciona o usuário de volta para o endereço fornecido no parâmetro 'state' da query string.
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/auth/google/callback?state=meu-front.com" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/auth/google/callback"
);
const params = {
"state": "meu-front.com",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Erro na autenticação com google",
"error": "Internal Error"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Response
Response Fields
token
O token de acesso é anexado à URL de redirecionamento como um fragmento (#token=...).
POST api/v1/auth/logout
Example request:
curl --request POST \
"https://apione.homologa.grupofaveni.com/api/v1/auth/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/auth/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Department
Listar todos os departamentos.
requires authentication
Retorna uma coleção simples contendo o ID e o nome de todos os departamentos cadastrados, ordenados alfabeticamente.
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/departments" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/departments"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "Financeiro"
},
{
"id": 2,
"name": "Tecnologia"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Disciplinas
Endpoints para consulta e gerenciamento de disciplinas via integração ONE.
GET api/v1/disciplines
requires authentication
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/disciplines?name=Anatomia&page=1&per_page=15&order=asc&sort_by=name" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "X-Domain-Name: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição)." \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/disciplines"
);
const params = {
"name": "Anatomia",
"page": "1",
"per_page": "15",
"order": "asc",
"sort_by": "name",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"X-Domain-Name": "faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/disciplines/{id}
requires authentication
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/disciplines/architecto" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "X-Domain-Name: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição)." \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/disciplines/architecto"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"X-Domain-Name": "faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/v1/disciplines/{id}/curriculum
requires authentication
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/disciplines/architecto/curriculum?name=Enfermagem+01%2F2026&order=asc&sort_by=term&page=1&per_page=15&has_content=" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "X-Domain-Name: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição)." \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/disciplines/architecto/curriculum"
);
const params = {
"name": "Enfermagem 01/2026",
"order": "asc",
"sort_by": "term",
"page": "1",
"per_page": "15",
"has_content": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"X-Domain-Name": "faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Domain
GET api/v1/domains
requires authentication
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/domains" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/domains"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Matriz
GET api/v1/curriculum/{id}
requires authentication
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/curriculum/123" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/curriculum/123"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Role
Listar todos as roles.
Retorna uma coleção simples contendo o ID e o nome de todos as roles (Cargos) cadastrados, ordenados alfabeticamente.
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/roles" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/roles"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 1,
"name": "Admin"
},
{
"id": 2,
"name": "Diretor"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Section
Rota para listar seções
requires authentication
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/curriculum-disciplines/1/sections" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/curriculum-disciplines/1/sections"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rota para criar uma sessão
requires authentication
Example request:
curl --request POST \
"https://apione.homologa.grupofaveni.com/api/v1/sections" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "X-Domain-Name: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição)." \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"John Doe\",
\"description\": \"aaaaa\",
\"curriculum_discipline_id\": 1,
\"sort_order\": 1
}"
const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/sections"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"X-Domain-Name": "faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "John Doe",
"description": "aaaaa",
"curriculum_discipline_id": 1,
"sort_order": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rota para atualizar uma seção
requires authentication
Example request:
curl --request PATCH \
"https://apione.homologa.grupofaveni.com/api/v1/sections/architecto" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "X-Domain-Name: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição)." \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"John Doe\",
\"description\": \"aaaaa\"
}"
const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/sections/architecto"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"X-Domain-Name": "faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "John Doe",
"description": "aaaaa"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rota para ver uma seção
requires authentication
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/sections/architecto" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "X-Domain-Name: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição)." \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/sections/architecto"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"X-Domain-Name": "faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rota para excluir uma seção
requires authentication
Example request:
curl --request DELETE \
"https://apione.homologa.grupofaveni.com/api/v1/sections/architecto" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "X-Domain-Name: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição)." \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/sections/architecto"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"X-Domain-Name": "faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rota para reordenar os recursos de uma seção
Example request:
curl --request PATCH \
"https://apione.homologa.grupofaveni.com/api/v1/sections/1/items/order" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"sort_order\": 1,
\"contentable_id\": 27,
\"type\": \"document\"
}
]
}"
const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/sections/1/items/order"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"sort_order": 1,
"contentable_id": 27,
"type": "document"
}
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (204):
Empty response
Example response (422):
:{"message":"Existem itens duplicados na lista"}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Section Curriculum Discipline
Rota para reordenar as seções
requires authentication
Example request:
curl --request PATCH \
"https://apione.homologa.grupofaveni.com/api/v1/section-curriculum-disciplines/123/sections/order" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "X-Domain-Name: Obrigatório para identificação do contexto" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"items\": [
{
\"sort_order\": 16,
\"section_id\": 16
}
]
}"
const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/section-curriculum-disciplines/123/sections/order"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"X-Domain-Name": "Obrigatório para identificação do contexto",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"items": [
{
"sort_order": 16,
"section_id": 16
}
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (204):
Empty response
Example response (422):
{
"errors": "campo invalido"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Section Document
Anexar Documento à Seção * Realiza o upload de um arquivo e cria o vínculo com a seção especificada.
requires authentication
O arquivo é enviado para o S3 e os metadados salvos no banco.
Example request:
curl --request POST \
"https://apione.homologa.grupofaveni.com/api/v1/sections/architecto/documents" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "X-Domain-Name: Obrigatório para identificação do contexto" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=Apostila de Introdução.pdf"\
--form "sort_order=5"\
--form "file=@/tmp/phpqn6vh7f7s454476jDq0" const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/sections/architecto/documents"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"X-Domain-Name": "Obrigatório para identificação do contexto",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'Apostila de Introdução.pdf');
body.append('sort_order', '5');
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rota para excluir um documento da seção
requires authentication
Example request:
curl --request DELETE \
"https://apione.homologa.grupofaveni.com/api/v1/sections/1/documents/12" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "X-Domain-Name: Obrigatório para identificação do contexto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/sections/1/documents/12"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"X-Domain-Name": "Obrigatório para identificação do contexto",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rota para substituir um documento
requires authentication
Example request:
curl --request PUT \
"https://apione.homologa.grupofaveni.com/api/v1/sections/architecto/items/documents/16" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "X-Domain-Name: Obrigatório para identificação do contexto" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "name=Apostila de Matemática V2"\
--form "_method=PUT"\
--form "file=@/tmp/phpsocm8247v38i8bOwHjQ" const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/sections/architecto/items/documents/16"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"X-Domain-Name": "Obrigatório para identificação do contexto",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('name', 'Apostila de Matemática V2');
body.append('_method', 'PUT');
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User
Obter perfil do usuário autenticado.
requires authentication
Este endpoint retorna os detalhes do usuário logado, incluindo o cargo (role) único e o nome do departamento vinculado ao seu registro de funcionário.
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/me" \
--header "Authorization: string required Exemplo: \"Bearer {token}\"" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/me"
);
const headers = {
"Authorization": "string required Exemplo: "Bearer {token}"",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"uuid": "9b12e345-e89b-12d3-a456-426614174000",
"name": "João Silva",
"email": "joao.silva@empresa.com.br",
"avatar_url": "lh3.googleusercontent.com...",
"role": {
"id": 2,
"name": "gerente"
},
"department": {
"id": 2,
"name": "Marketing"
},
"status": "active",
"created_at": "2025-12-19T16:10:00Z",
"updated_at": "2025-12-19T16:10:00Z"
}
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Atualizar perfil do usuário autenticado.
requires authentication
Este endpoint permite que o usuário logado atualize suas informações pessoais. A operação é realizada de forma atômica (transação).
Example request:
curl --request PUT \
"https://apione.homologa.grupofaveni.com/api/v1/me" \
--header "Authorization: string required Exemplo: \"Bearer {token}\"" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"João Silva\",
\"role_id\": 1,
\"department_id\": 2,
\"email\": \"joao.silva@empresa.com\"
}"
const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/me"
);
const headers = {
"Authorization": "string required Exemplo: "Bearer {token}"",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "João Silva",
"role_id": 1,
"department_id": 2,
"email": "joao.silva@empresa.com"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"uuid": "9b12e345-e89b-12d3-a456-426614174000",
"name": "João Silva",
"email": "joao.silva@empresa.com",
"avatar_url": "lh3.googleusercontent.com...",
"role_id": 1,
"department": "Tecnologia",
"status": "active",
"created_at": "2025-12-19T16:15:00Z",
"updated_at": "2025-12-19T16:20:00Z"
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"department_id": [
"O departamento selecionado é inválido."
],
"role": [
"O cargo selecionado é inválido."
]
}
}
Example response (500):
{
"message": "Erro interno ao atualizar perfil."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lista usuários paginados.
requires authentication
Rota: GET /v1/users Descrição: Lista usuários paginados com filtros (status) e ordena mediante ao nome da coluna.
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/users?status=approved&order_by=name&direction=asc&page=1&limit=10" \
--header "Authorization: string required" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/users"
);
const params = {
"status": "approved",
"order_by": "name",
"direction": "asc",
"page": "1",
"limit": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "string required",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"data": [
{ "uuid":"...", "name":"...", "email":"...", "role":"admin", "department":"Tecnologia", "status":"active" }
],string
"meta": { "current_page":1, "last_page":10, "per_page":15, "total":150 }
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Obter perfil de determinado usuário.
requires authentication
Este endpoint permite que o adminstrador consiga as informações de um determinado usuário
Example request:
curl --request GET \
--get "https://apione.homologa.grupofaveni.com/api/v1/users/2" \
--header "Authorization: string required Exemplo: \"Bearer {token}\"" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/users/2"
);
const headers = {
"Authorization": "string required Exemplo: "Bearer {token}"",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"uuid": "d8933aba-2cb7-44d2-925b-7337226b4934",
"name": "Juliana Paes",
"email": "juliana.paes@empresa.com",
"avatar_url": null,
"role": {
"id": 2,
"name": "gerente"
},
"department": {
"id": 2,
"name": "Marketing"
},
"status": "pending",
"is_active": false,
"email_verified_at": "2025-12-31T08:43:10.000000Z",
"created_at": "2025-12-31T08:43:10.000000Z",
"updated_at": "2025-12-31T08:43:10.000000Z"
}
Example response (401):
{
"message": "Unauthenticated."
}
Example response (404):
{
"message": "Usuário não encontrado."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Atualizar perfil de determinado usuário.
requires authentication
Este endpoint permite que o adminstrador atualize as informações de um usuário.
Example request:
curl --request PUT \
"https://apione.homologa.grupofaveni.com/api/v1/users/2" \
--header "Authorization: string required Exemplo: \"Bearer {token}\"" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"João Silva\",
\"role_id\": 1,
\"department_id\": 2,
\"is_active\": true,
\"email\": \"joao.silva@empresa.com\"
}"
const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/users/2"
);
const headers = {
"Authorization": "string required Exemplo: "Bearer {token}"",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "João Silva",
"role_id": 1,
"department_id": 2,
"is_active": true,
"email": "joao.silva@empresa.com"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
'message': 'Usuário atualizado com sucesso.',
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"department_id": [
"O departamento selecionado é inválido."
],
"role": [
"O cargo selecionado é inválido."
]
}
}
Example response (500):
{
"message": "Erro interno ao atualizar usuário."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Moderação de usuário (aprovar/rejeitar).
requires authentication
Este endpoit permite que um administrador aprove ou rejeite um usuário pendente. caso aprovado o campo 'approved_by' será preenchido com o id do administrador que realizou a ação. caso rejeitado o usuário será excluído.
Example request:
curl --request PATCH \
"https://apione.homologa.grupofaveni.com/api/v1/users/2/moderation" \
--header "Authorization: string required" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"status\": \"architecto\"
}"
const url = new URL(
"https://apione.homologa.grupofaveni.com/api/v1/users/2/moderation"
);
const headers = {
"Authorization": "string required",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status": "architecto"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
'message' => 'Moderação realizada com sucesso.',
}
Example response (422):
{
"message": "Este usuário já foi processado e não está mais pendente."
}
Example response (500):
{
'message' => 'Erro interno ao processar a moderação do usuário.',
'error' => 'Detalhes do erro',
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.