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 {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

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"
}
 

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"
}
 

Request   

GET api/v1/auth/google/callback

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

state   string     

A URL de destino para onde o usuário deve ser redirecionado após o login. Example: meu-front.com

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());

Request   

POST api/v1/auth/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

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"
    }
]
 

Request   

GET api/v1/departments

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

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."
}
 

Request   

GET api/v1/disciplines

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

X-Domain-Name        

Example: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

name   string  optional    

Filtra pelo nome parcial da disciplina. validation.max. Example: Anatomia

page   integer  optional    

Número da página para navegação. validation.min. Example: 1

per_page   integer  optional    

Itens por página (Máx: 100). validation.min validation.max. Example: 15

order   string  optional    

Ordenação. Example: asc

Must be one of:
  • asc
  • desc
  • ASC
  • DESC
sort_by   string  optional    

Coluna para ordenação. Example: name

Must be one of:
  • name
  • id
  • created_at
  • source
  • term

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."
}
 

Request   

GET api/v1/disciplines/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

X-Domain-Name        

Example: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the discipline. Example: architecto

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."
}
 

Request   

GET api/v1/disciplines/{id}/curriculum

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

X-Domain-Name        

Example: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the discipline. Example: architecto

Query Parameters

name   string  optional    

Filtro textual pelo nome da matriz curricular (busca parcial). Example: Enfermagem 01/2026

order   string  optional    

Direção da ordenação: "asc" (crescente) ou "desc" (decrescente). Example: asc

sort_by   string  optional    

Coluna utilizada para ordenação. Aceita campos da matriz (name, source) ou do vínculo (term). Example: term

Must be one of:
  • id
  • name
  • created_at
  • updated_at
  • has_content
page   integer  optional    

Número da página atual para navegação. Example: 1

per_page   integer  optional    

Quantidade de itens retornados por página (Máx: 100). Example: 15

has_content   boolean  optional    

Filtrar disciplinas com ou sem conteudo. Example: false

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."
}
 

Request   

GET api/v1/domains

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

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."
}
 

Request   

GET api/v1/curriculum/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the curriculum Example: 123

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"
    }
]
 

Request   

GET api/v1/roles

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

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."
}
 

Request   

GET api/v1/curriculum-disciplines/{id}/sections

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string  optional    

O id da matriz_disciplina Example: 1

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());

Request   

POST api/v1/sections

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

X-Domain-Name        

Example: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome da seção. Example: John Doe

description   string  optional    

Descrição da Seção. Example: aaaaa

curriculum_discipline_id   integer     

Matriz disciplina. Example: 1

sort_order   integer  optional    

Ordem. Example: 1

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());

Request   

PATCH api/v1/sections/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

X-Domain-Name        

Example: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string  optional    

Id da seção Example: architecto

Body Parameters

name   string     

Nome da seção. Example: John Doe

description   string  optional    

Descrição da Seção. Example: aaaaa

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."
}
 

Request   

GET api/v1/sections/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

X-Domain-Name        

Example: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string  optional    

Id da seção Example: architecto

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());

Request   

DELETE api/v1/sections/{id}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

X-Domain-Name        

Example: faveni Identificador do Tenant/Domínio (Obrigatório para definir o contexto da requisição).

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the section. Example: architecto

int   string  optional    

$id Required Example: architecto

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"}
 

Request   

PATCH api/v1/sections/{id}/items/order

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

ID da seção Example: 1

Body Parameters

items   object[]     

Lista contendo os itens que tiveram sua posição alterada.

sort_order   integer     

Nova posição visual do item. Example: 1

contentable_id   integer     

ID original do recurso (documento, vídeo, etc). Example: 27

type   string     

O discriminador do tipo de recurso. Example: document

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"
}
 

Request   

PATCH api/v1/section-curriculum-disciplines/{curriculum_discipline_id}/sections/order

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

X-Domain-Name        

Example: Obrigatório para identificação do contexto

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

curriculum_discipline_id   string     

vinculo da matriz disciplina Example: 123

Body Parameters

items   object[]     
sort_order   integer     

Example: 16

section_id   integer     

Example: 16

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());

Request   

POST api/v1/sections/{id}/documents

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

X-Domain-Name        

Example: Obrigatório para identificação do contexto

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the section. Example: architecto

Body Parameters

file   file     

O arquivo binário para upload. Formatos permitidos: pdf, doc, docx. Tamanho máximo: 20480KB. Must be a file. validation.max. Example: /tmp/phpqn6vh7f7s454476jDq0

name   string  optional    

O nome de exibição do documento. Se omitido, o sistema usará o nome original do arquivo. validation.max. Example: Apostila de Introdução.pdf

sort_order   integer  optional    

Define a posição numérica deste item na lista da seção. Se omitido, será adicionado ao final. Example: 5

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());

Request   

DELETE api/v1/sections/{id}/documents/{documentId}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

X-Domain-Name        

Example: Obrigatório para identificação do contexto

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

Id da seção Example: 1

documentId   integer     

Id do documento Example: 12

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
 

Request   

PUT api/v1/sections/{id}/items/documents/{documentId}

Headers

Authorization        

Example: Bearer {YOUR_AUTH_KEY}

X-Domain-Name        

Example: Obrigatório para identificação do contexto

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the section. Example: architecto

documentId   integer     

Id do documento antigo Example: 16

sectionId   integer     

Id da seção Example: 1

Body Parameters

file   file  optional    

O arquivo para substituição (opcional). Se enviado, substitui o anterior. Aceita PDF, DOC, DOCX. Máx: 5MB. Example: /tmp/phpsocm8247v38i8bOwHjQ

name   string  optional    

O novo nome de exibição do documento. Example: Apostila de Matemática V2

_method   string     

O truque para fazer upload via PUT/PATCH. Deve ser sempre "PUT" ou "PATCH". Example: PUT

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: \&quot;Bearer {token}\&quot;" \
    --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: &quot;Bearer {token}&quot;",
    "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."
}
 

Request   

GET api/v1/me

Headers

Authorization        

Example: string required Exemplo: "Bearer {token}"

Content-Type        

Example: application/json

Accept        

Example: application/json

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: \&quot;Bearer {token}\&quot;" \
    --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: &quot;Bearer {token}&quot;",
    "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."
}
 

Request   

PUT api/v1/me

Headers

Authorization        

Example: string required Exemplo: "Bearer {token}"

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string  optional    

Nome completo do usuário. Example: João Silva

role_id   integer  optional    

ID da role do funcionário a ser sincronizada. Example: 1

department_id   integer  optional    

ID do departamento vinculado ao funcionário. Example: 2

email   string  optional    

Endereço de e-mail. Example: joao.silva@empresa.com

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 }
}
 

Request   

GET api/v1/users

Headers

Authorization        

Example: string required

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

status   string  optional    

optional Filtra por status. Example: approved

order_by   string  optional    

optional Campo para ordenação. Example: name

direction   string  optional    

optional Direção da ordenação. Example: asc

page   integer  optional    

optional Página atual. Example: 1

limit   integer  optional    

optional Itens por página. Example: 10

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: \&quot;Bearer {token}\&quot;" \
    --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: &quot;Bearer {token}&quot;",
    "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."
}
 

Request   

GET api/v1/users/{user_uuid}

Headers

Authorization        

Example: string required Exemplo: "Bearer {token}"

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user_uuid   integer     

Example: 2

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: \&quot;Bearer {token}\&quot;" \
    --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: &quot;Bearer {token}&quot;",
    "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."
}
 

Request   

PUT api/v1/users/{user_uuid}

Headers

Authorization        

Example: string required Exemplo: "Bearer {token}"

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user_uuid   integer     

Example: 2

Body Parameters

name   string  optional    

Nome completo do usuário. Example: João Silva

role_id   integer  optional    

ID da role do funcionário a ser sincronizada. Example: 1

department_id   integer  optional    

ID do departamento vinculado ao funcionário. Example: 2

is_active   boolean  optional    

informa se o usário está ativo ou não. Example: true

email   string  optional    

Endereço de e-mail. Example: joao.silva@empresa.com

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',
}
 

Request   

PATCH api/v1/users/{user_uuid}/moderation

Headers

Authorization        

Example: string required

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

user_uuid   integer     

Example: 2

Body Parameters

status   string     

options: approved | rejected. Example: architecto