Árvore de páginas

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

tip

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.