Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.
Comentário: adicionei versõe de tradução do arquivo

Índice
outlinetrue

Portuguese (Brasil)

Afastamentos (Absences)


Serviço utilizado para cadastrar. alterar e remover afastamentos do Ahgora PontoWeb.


Aviso

Permitido envio em lote, máximo 1000 registros por requisição, ou 1mb (mega)


Afastamentos (absences)

Item

Descrição

Fluxo:Cliente → PontoWeb
Rotahttps://api.ahgora.com.br/absences
Método:POST
Afastamentos - Absences
CampoTipoObrig.DescriçãoRegra
matriculaStringSimMatrícula do Funcionário
motivoStringSimMotivo do Afastamento*String do motivo de afastamento cadastrado no PontoWeb
Enviar o Código ou o Motivo, é obrigatória uma das informações
inicioStringSimData e/ou hora Inicial do AfastamentoYYYY-MM-DDTHH:MM
fimStringSimData e/ou hora Final do AfastamentoYYYY-MM-DDTHH:MM (Enviando hora final 24:00 corresponde ao dia total)
cod_internoString*SimCódigo interno do Afastamento*Obrigatório para manutenções via integração.
Este campo é chave para acessar o registro. A manutenção da ausência depende deste campo, caso o mesmo não seja informado não será possível alterar ou remover a ausência pela integração.
Ele deve ser único para todos os afastamentos cadastrados pela integração.
operationStringSimAção a ser realizadaINS operação para inserção
ALT para alterar
DEL para remoção da ausência


Exemplos de Requisições (Requests)


Corpo da Requisição - Inclusão:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
[
  {
    "matricula": "00000001",
    "motivo": "Atestado médico",
    "inicio": "2024-01-11T10:00",
    "fim": "2024-01-15T23:00",
    "cod_interno": "w289fdf2",
    "operation": "INS"
  }
]


Corpo da Requisição - Exclusão:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
[
  {
    "matricula": "00000001",
    "motivo": "Atestado médico",
    "inicio": "2024-01-11T10:00",
    "fim": "2024-01-15T23:00",
    "cod_interno": "w289fdf2",
    "operation": "DEL"
  }
]



Exemplos de Retornos (Responses)


Resposta quando SUCESSO - Code 200:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
  "company": "a000101",
  "unique": "bd751350",
  "message": "Absences Integration on progress"
}
Dica

Para obter mais detalhe, utilize o serviço Process. Para saber mais entre no link.


ERRO de Validação - Code 400:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
  "message": "Request format must be an Array",
  "code": 400
}


ERRO de Autenticação - Code 401:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
  "message": "Unauthorized",
  "code": 401
}


ERRO de Permissão - Code 403:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "error": {
        "message": "Forbidden",
        "code": 403
    }
}

Observação: Verificar as permissões do usuário para acessar a rota/serviço.


English (US)

Absences


Service used to register, change and remove leave from Ahgora PontoWeb.


Aviso

Batch sending allowed, maximum 1000 records per request, or 1mb (mega)


Afastamentos (absences)

Item

Description

Flow:Client → PontoWeb
Routehttps://api.ahgora.com.br/absences
Method:POST
Absences
FieldTypeRequiredDescriptionRule
matriculaStringYesEmployee's registration
motivoStringYesReason for absence*String of the leave reason registered in PontoWeb
Send the Code or Reason, one of the following is mandatory
inicioStringYesStart date and/or time of absenceExpected format: "YYYY-MM-DDTHH:MM"
fimStringYesEnd date and/or time of absenceExpected formta: "YYYY-MM-DDTHH:MM" (Sending end time 24:00 corresponds to the total day)
cod_internoStringYes*Internal code for absence*Mandatory for maintenance via integration.
This field is key to accessing the record. Maintenance of the absence depends on this field; if it is not entered, it will not be possible to change or remove the absence via the integration.
It must be unique for all absences registered via the integration.
operationStringYesAction to be takenINS (insertion operation)
ALT (to alter)
DEL (to remove the absence)


Requests examples:


Body Request - Inclusion:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
[
  {
    "matricula": "00000001",
    "motivo": "Medical certificate",
    "inicio": "2024-01-11T10:00",
    "fim": "2024-01-15T23:00",
    "cod_interno": "w289fdf2",
    "operation": "INS"
  }
]


Body Resquest - Exclusion:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
[
  {
    "matricula": "00000001",
    "motivo": "Medical certificate",
    "inicio": "2024-01-11T10:00",
    "fim": "2024-01-15T23:00",
    "cod_interno": "w289fdf2",
    "operation": "DEL"
  }
]



Responses examples:


Response when SUCCESS - Code 200:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
  "company": "a000101",
  "unique": "bd751350",
  "message": "Absences Integration on progress"
}
Dica
titletip

For more details, use the Process service. To find out more, click here.


Validation ERROR - Code 400:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
  "message": "Request format must be an Array",
  "code": 400
}


Authentication ERROR - Code 401:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
  "message": "Unauthorized",
  "code": 401
}


Permission ERROR - Code 403:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "error": {
        "message": "Forbidden",
        "code": 403
    }
}

Note: Check the user's permissions to access the route/service.