Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

English (US)

This documentation describes the features of the Pontoweb system's Results Calculation API. The API allows you to start calculation processes, monitor their status, consult the results calculated and manage the re-consumption of events that have already been processed.

The operations have been developed for integration with payroll systems, accounting systems or other corporate applications that need to access employees' time and attendance data and accounting events.

All requests require authentication via HTTP Basic Auth, using a service type user. Some routes also require specific versioning headers.

Responses are in JSON format, with clear error and success messages to facilitate handling by client applications.


Section
Deck of Cards
id001
Card
labelAuthentication

ITG2.0-01 Authentication

Card
label1. Request calculated results
Starts the process of calculating accounting events and clockings for employees in a given period. It allows you to filter by location, specific employees and optional features such as daily totals, daily punches and monthly totals.


Informações
  • A maximum of 3 daily processes are allowed for the “full base” for each type of ‘feature’ parameter consumed (daily.totals, daily.punches, and monthly).

  • In calls informing the registration filter (not “full base”), consumption is free.
  • A maximum of 4 simultaneous processes are allowed to start.

Item

Description

Flow:Client → PontoWeb
URL API:https://api.ahgora.com.br/reckons/process/start
Method:POST
Auth:Basic (show)


Body Request:

FieldTypeRequiredDescription
registersarraySituationalList of employee registrations, if empty, considers all employees. When the rescission field is true, this field becomes mandatory and must contain at least one register.
rescissionbooleanYesIndicates whether to consider dismissed employees. Default: false.
monthstringYesCalculation month, expected format: “MM”.
yearstringYesCalculation year, expected format: “YYYY”.
paymentDatestringNoDate of payment, expected format: “YYYY-MM-DD”.
infotypestringNoIdentification of the event type. Default: 0015.
allowEmptybooleanNoDisplays employees without data. Default: false.
locationsarray NoFilters employees by location registered with Pontoweb.
featuresarrayNoType of processing requested. Options:
  • "daily.punches"
  • "daily.totals"
  • "monthly"

    Default: monthly.
    You can request a specific one or more than one. If you don't enter one, the default one will be generated.


Request examples:


Body Request:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "registers": ["98a159Q"],
    "rescission": false,
    "month": "04",
    "year": "2025",
    "paymentDate": "2025-04-30",
    "infotype": "0015",
    "allowEmpty": false,
    "locations": [],
    "features": ["daily.punches", "daily.totals", "monthly"]
}


Responses examples:


Response when SUCCESS - Code 200:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "process": "6b28ff7e-dda5-415c-b5b4-ff776f92142b",
    "company": "a133595",
    "created_at": "2025-04-28T13:49:32.334Z"
}


Authentication ERROR - Code 401:

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


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.


Validation ERROR - Code 400:

Bloco de código
themeEmacs
linenumberstrue
collapsetrue
{
    "error": "\"rescission\" is required"
}

Note: Check the mandatory parameters of the request.

Card
label2. Check the process status

Once you have requested processing, you can query the status. This query returns the status of a previously initiated calculation process. It informs you whether processing has been completed, whether there have been any errors and the progress. You must provide the process identifier.


Item

Description

Flow:Client → PontoWeb
URL API:https://api.ahgora.com.br/reckons/process/status/:process
Method:GET
Auth:Basic (show)
Parameters:Process

This is the identifier code of the initiated process, obtained on the response from the start process request.

Example: 6b28ff7e-dda5-415c-b5b4-ff776f92142b



Query Params
KeyValue
Accept-Versionv1
v2


Response body:

FieldTypeDescription
processstringInitiated process code.
companystringCompany code in the PontoWeb system.
statusstring

Current process status:

processing – Processing in progress;

done – Processing completed successfully;

error – Processing completed with error.

uniquestringUnique identifier code for process control.
progress.donenumberNumber of employees with completed processing.
progress.totalnumberTotal number of employees to be processed.


Response examples:


Response when in PROCESS - Code 200:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "status": "processing",
    "unique": "323256d",
    "process": "323256d-d0df-4c0d-a6c1-8d9ca6fed06b",
    "company": "a133595",
     "progress": {
        "done": 0,
        "total": 0
    }
}


Response when SUCCESS - Code 200:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "status": "done",
    "unique": "3234ca5d",
    "process": "3234ca5d-d0df-4c0d-a6c1-8d9ca6fed06b",
    "company": "a133595",
    "progress": {
        "done": 1,
        "total": 1
    }
}


Validation ERROR - Code 400:

Accept-Version v1
Bloco de código
themeEmacs
linenumberstrue
collapsetrue
{
    "error": {
        "message": "Process not found",
        "code": 400
    }
}

Note: Check the unique code entered.


Validation ERROR - Code 400:

Accept-Version v2:
Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "error": "Process not found"
}

Note: Check the unique code entered.


Authentication ERROR - Code 401:

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

Note: Check the username and password entered.

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.

Card
label3. Get calculated results

Obtains the generated processing results, based on the unique identifier code. The data returned can include monthly events, daily totals and punches (clockings), as defined in the request asking for the results.
The data is available for 72 hours for consumption; after this period, it automatically expires.


Important: once the process data has been successfully queried, the events returned are marked as “consumed” and will not be displayed again in future calls.
To obtain the same events, you will need to enable the re-consumption of events via route 4. Enable re-consumption of events.


Item

Description

Flow:Client → PontoWeb
URL API:https://api.ahgora.com.br/reckons/:unique
Method:GET
Auth:Basic (show)
Parameter:
  • Unique (string): is the unique identifier code for control.

    Example: 3234ca5d
  • Limit (number) (optional): is the limit of records/events that will be returned in the response.
    • Default: 1000.
    • Max: 1000.


Response examples:


Response - monthly

Example of a response when the “features” field is entered with “monthly” in the request for calculated results:

FieldTypeDescription

unique

stringUnique process identifier code.
companystringCompany code in the PontoWeb system.
totalnumberTotal number of employees.
dataarrayContains a list of employee and event information.
data.employeestringEmployee's registration.
data.paymentDatestringDate of payment, expected format: “YYYY-MM-DD”.
data.infotypestringIdentifying the type of event.
data.resultsarrayIt contains a list of monthly events.
data.results.namestringName of the accounting code.
data.results.eventstringAccounting code for the event.
data.results.valuestring/number

Value of the accounting event.

Example:
Events in Days: 2;
Events in Hours: "16:00" (For Sexagesimals)
Events in Hours: "16,60" (For Centesimals)

data.results.typestringType of accounting event. Can be:
  • "days"
  • "hours"


Response when SUCCESS - Code 200:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
	"company": "a133595",
    "unique": "3234ca5d",
    "total": 1,
    "data": [
        {
            "employee": "98a159Q",
            "paymentDate": "2025-04-30",
            "infotype": "0015",
            "results": [
                {
                      "name": "Horas previstas",
                      "event": "9077",
                      "value": "71:20",
                      "type": "hours"
                  },
                  {
                      "name": "Dias previstos",
                      "event": "9078",
                      "value": 1,
                      "type": "days"
                  }
            ]
        }
    ]
}


Response - daily.punches

Example of a response when the “features” field is entered with “daily.punches” in the request for calculated results:

FieldTypeDescription

unique

stringUnique process identifier code.
companystringCompany code in the PontoWeb system.
totalnumberTotal number of days counted.
dataarrayContains a list of employee and clock-in information.
data.employeestringMatrícula do colaborador.
data.paymentDatestringDate of payment, expected format: “YYYY-MM-DD”.
data.infotypestringIdentifying the type of event.
data.dailyarrayContains the list of clockings.
data.daily.daystringDay on which the clock-in occurred, expected format: “YYYY-MM-DD”.
data.daily.punchesarrayList of appointment information.
data.daily.punches.datestringEffective date of clock-in.
data.daily.punches.hourstringTime of clocking in, expected format:  "HHMM".
data.daily.punches.typestring

Record type. Can be:

  • "O" - ETR (Electronic Time Recording) or Online Clocking.
  • "I"   - Manual Entry.
  • "BI" - Break Records.
data.daily.punches.labelstringIndicates whether the record is incoming or outgoing.


Response when SUCCESS - Code 200:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
	"company": "a133595",
    "unique": "3234ca5d", 
    "total": 1,
    "data": [
        {
            "employee": "98a159Q",
            "paymentDate": "2022-08-08",
            "infotype": "0015",
            "daily": [
                {
                    "day": "2022-07-29",
                    "punches": [
                        {
                            "date": "2022-07-28",
                            "hour": "0800",
                            "type": "O",
                            "label": "entrada-1"
                        },
                        {
                            "date": "2022-07-28",
                            "hour": "0900",
                            "type": "I",
                            "label": "saida-1"
                        }
                    ]
                }
            ]
        }
    ]
}


Response - daily.totals

Example response when the “features” field is entered with “daily.totals” in the request for calculated results:

FieldTypeDescription

unique

stringUnique process identification code.
companystringCompany code in the PontoWeb system.
totalnumberTotal number of days counted.
dataarrayContains a list of employee information and daily events
data.employeestringEmployee's registration.
data.paymentDatestringDate of payment, expected format: “YYYY-MM-DD”.
data.infotypestringIdentification of the event type.
data.dailyarrayContains a list of the punches (clockings).
data.daily.daystringDay of the punches (clock-in), expected format: "YYYY-MM-DD".
data.daily.resultsarrayIt contains a list of daily events.
data.daily.results.namestringName of the accounting code.
data.daily.results.eventstring

Accounting code for the event.

data.daily.results.valuestring

Value of the accounting event.

Example:
Events in Days: 2;
Events in Hours: "16:00" (For Sexagesimals)
Events in Hours: "16,60" (For Centesimals)

data.daily.results.typestring

Type of accounting event. Can be:

  • "days"
  • "hours"


Response when SUCESSO - Code 200:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "company": "a133595",
    "unique": "3234ca5d",
    "total": 1,
    "data": [
        {
            "employee": "98a159Q",
            "paymentDate": "2022-08-08",
            "infotype": "0015",
            "daily": [
                {
                    "day": "2022-08-08",
                    "results": [
                        {
                            "name": "Horas previstas",
                            "event": "9077",
                            "value": "71:20",
                            "type": "hours"
                        },
                        {
                            "name": "Dias previstos",
                            "event": "9078",
                            "value": 1,
                            "type": "days"
                        }
                    ]
                }
            ]
        }
    ]
}


Response - daily.totals, daily.punches e monthly

Example answer when the “features” field contains all the options.

Resposta when SUCESSO - Code 200:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "company": "a133595",
    "unique": "3234ca5d",
    "total": 2,
    "data": [
        {
            "employee": "98a159Q",
            "paymentDate": "2022-08-08",
            "infotype": "0015",
            "daily": [
                {
                    "day": "2022-08-08",
                    "results": [
                        {
                            "name": "Horas previstas",
                            "event": "9077",
                            "value": "71:20",
                            "type": "hours"
                        },
                        {
                            "name": "Dias previstos",
                            "event": "9078",
                            "value": 1,
                            "type": "days"
                        }
                    ],
                    "punches": [
                        {
                            "date": "2022-07-28",
                            "hour": "0800",
                            "type": "O",
                            "label": "entrada-1"
                        },
                        {
                            "date": "2022-07-28",
                            "hour": "0900",
                            "type": "I",
                            "label": "saida-1"
                        }
                    ]
                }
            ]
        },
        {
            "employee": "98a159Q",
            "paymentDate": "2022-08-08",
            "infotype": "0015",
            "results": [
                {
                    "name": "Horas previstas",
                    "event": "9077",
                    "value": "71:20",
                    "type": "hours"
                },
                {
                    "name": "Dias previstos",
                    "event": "9078",
                    "value": 1,
                    "type": "days"
                }
            ]
        }
    ]
}

Authentication ERROR - Code 401

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

Note: Check the username and password entered.


ERRO de Permissão - 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.

Card
label4. Enable re-consumption of events

Restores the availability of events previously consumed in a calculation process. After executing this route, the data associated with the identifier entered can be obtained again via the results query route.


Item

Description

Flow:

Client → PontoWeb

URL API:https://api.ahgora.com.br/reckons/reconsume/:unique
Method:GET
Auth:Basic (show)
Parameter:
  • Unique (string): is the unique identification code for control.

    Example: 3234ca5d
Max limit:1000 times (The results calculation identified by unique)

Each refill is available for 72 hours for re-consumption.
After this time it is no longer accessible.


Response Body:

FieldTypeDescription
companystringCompany code in the PontoWeb system.
uniquestringUnique process identification code.

Response examples:

Response when SUCESSO - Code 200:

Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "company": "a133595",
    "unique": "3234ca5d"
}


Validation ERROR - Code 400:

Accept-Version v1
Bloco de código
themeEmacs
linenumberstrue
collapsetrue
{
    "error": {
        "message": "Process not found",
        "code": 400
    }
}

Note: Check the unique code entered.


Validation ERROR - Code 400:

Accept-Version v2:
Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "error": "Process not found"
}

Note: Check the unique code entered.


Authentication ERROR - Code 401:

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

Note: Check the username and password entered.


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.


Daily requisition limit exceeded ERROR - Code 429:

Accept-Version v1
Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "error": {
        "message": "The daily limit of 3 has been exceeded for the following features: daily.punches, daily.totals, monthly.",
        "code": 429
    }
}


Accept-Version v2
Bloco de código
languagetext
themeEmacs
linenumberstrue
collapsetrue
{
    "error": "The daily limit of 3 has been exceeded for the following features: daily.punches, daily.totals, monthly."
}



Composition Setup
deck.tab.inactive.background = #fffffff
deck.tab.active.background = #b3a5ef