Afastamentos (Absences)


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


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 para inserir ou alterar registro de afastamento em período de bloqueio.

Caso utilize o recurso "bloqueio de competências" no PontoWeb. Para alterar afastamentos ou incluir quando a competência estiver bloqueada deverá utilizar este campo para alterar ou incluir.

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

(aviso) A alteração ou inclusão só será aplicada na apuração da competência bloqueada se o período for desbloqueado.

Exemplo: No caso de um afastamento inserido no sistema com data início 10/10/2000 e data fim 10/10/2050 e utilizado o recurso de "bloqueio de competência", se necessário alterar ou a data inicio ou a data fim desse afastamento, deve-se utilizar o "ignora_bloqueio = 1" para que o afastamento seja alterado com sucesso.


Exemplos de Requisições (Requests)


Corpo da Requisição - Inclusão:

[
  {
    "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:

[
  {
    "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:

[
  {
    "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:

{
  "company": "a000101",
  "message": "Absences's Integration on progress",
  "unique": "bd751350",
  "subunique": "dc8ab430"
}

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


ERRO de Validação - Code 400:

{
  "message": "Request format must be an Array",
  "code": 400
}


ERRO de Autenticação - Code 401:

{
  "message": "Unauthorized",
  "code": 401
}


ERRO de Permissão - Code 403:

{
    "error": {
        "message": "Forbidden",
        "code": 403
    }
}

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


Absences


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


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

Bypasses the calculation lock to insert or change a leave record in a lock period.

If you use the "competency lock" feature in PontoWeb. To change leave or add it when the competence is blocked, you must use this field to change or add it.

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

1 = true

(aviso)  The change or inclusion will only be applied to the calculation of the locked period if the period is unlocked.

Example: In the case of a leave of absence entered in the system with a start date of 10/10/2000 and an end date of 10/10/2050 and the "blocking of competence" feature is used, if it is necessary to change either the start date or the end date of this leave of absence, "ignora_bloqueio = 1" must be used so that the leave of absence is successfully changed.


Requests examples:


Body Request - Inclusion:

[
  {
    "matricula": "00000001",
    "motivo": "Medical certificate",
    "inicio": "2024-01-11T10:00",
    "fim": "2024-01-15T23:00",
    "cod_interno": "w289fdf2",
    "operation": "INS"
  }
]


Body Request - Changes:

[
  {
    "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:

[
  {
    "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:

{
  "company": "a000101",
  "message": "Absences's Integration on progress",
  "unique": "bd751350",
  "subunique": "dc8ab430"
}

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


Validation ERROR - Code 400:

{
  "message": "Request format must be an Array",
  "code": 400
}


Authentication ERROR - Code 401:

{
  "message": "Unauthorized",
  "code": 401
}


Permission ERROR - Code 403:

{
    "error": {
        "message": "Forbidden",
        "code": 403
    }
}

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