Á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
ignora_bloqueioStringNãoIgnora bloqueios de períodos

Ignora o bloqueio de apurações.

Se o período de apuração onde o afastamento tem interferência, estiver bloqueado, utilize o "ignora_bloqueio" para alterar dados do afastamento.

Caso deseje inserir um afastamento em um período bloqueado, também pode utiliza-lo.

0 = false (default quando o campo não é enviado)
1 = true

Obs: Ele só vai interferir na apuração da competência bloqueada se o período for desbloqueado.

Exemplo: Um afastamento de doença, inserido em se ele retornasse ao trabalho dia , se os períodos anteriores estiverem bloqueados, deve-se utilizar o "ignora_bloqueio" = "1".

Caso não utilize e os períodos anteriores estiverem bloqueados, não será permitido alterar. 


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 - Alteraçã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": "ALT",
    "ignora_bloqueio"= "1"
  }
]


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)
ignora_bloqueioStringNoBypasses period blocks

Ignore the clearance block.
If the reporting period in which the leave interferes is locked, use “ignore_bloqueio” to change the leave data.
If you want to insert a leave in a blocked period, you can also use it.

0 = false (default when the field is not sent)
1 = true

Note: It will only affect the calculation of the blocked period if the period is unblocked.

Example: A sick leave, entered on 10/10/2000 if he returned to work on 05/05/2025 , if the previous periods are blocked, “ignore_bloqueio” = “1” must be used. 
If you don't use it and the previous periods are blocked, you won't be allowed to change them. 


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 Request - Changes:

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": "ALT",
    "ignora_bloqueio"= "1"
  }
]


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.