Get payroll information by service

This endpoint returns the payroll report information of the employees assigned to a service.

GET /api/v1/business/{businessId}/service/{serviceId}/payroll/from/{yyyy-MM-dd}/to/{yyyy-MM-dd}

If the data included in the request is correct —both businessId and serviceId— and the query interval does not exceed 40 days, the response will contain the information defined for the payroll report of all employees in the service, including for each of them the following fields:

  • employeeId: external identifier of the employee.

  • incidences: information about the employee’s incidences. Only those incidences configured to be displayed in the payroll report at service level will appear here (Store configuration > Store params > Reports > Payroll report shown incidence types). The following information is included:

    • name: name of the incidence type.

    • shortName: abbreviation of the incidence type.

    • fullDay: indicates whether the incidence type is a full-day (true) or not (false).

    • typeId: external identifier of the incidence type.

    • values: list of values with the date and the number of minutes accounted for by the incidence. If the incidence type is Non-computable, the value will be 0.0.

  • counters: information about the employee’s counters. Only those counters configured to be displayed in the payroll report at service level will appear here (Store configuration > Store params > Reports > Payroll report shown counters). The following information is included:

    • key: counter key defined internally.

    • shortName: abbreviation of the counter.

    • values: list with the days and the counter value depending on its time scope (daily, by minutes, etc.).

  • locations: information about the tasks performed by the employee. Only those tasks configured to be displayed in the payroll report at service level will appear here (Store configuration > Store params > Reports > Payroll report show task time). The following information is included:

    • name: task name.

    • shortName: task abbreviation.

    • id: external identifier of the task.

    • values: list of values with the date and the number of minutes dedicated to the task.

    • zone: physical location of the service (store, restaurant, etc.) where the task is performed.

  • worked: list of days when the employee was available to work.

  • attendance: list of days when the employee had an assignment.

  • otherIncidences: list of days with records of other incidences different from those configured at service level to be displayed in the payroll report.

  • bags: information about hour bags. Only those bags configured to be displayed in the payroll report at service level will appear here (Store configuration > Store params > Reports > Payroll report shown bags). The following information is included:

    • name: bag name.

    • id: external identifier of the bag.

    • values: list with the days and the bag value depending on its configuration (hours and minutes or numeric value).

    • symbol: if a numeric value has been set for the bag, the symbol configured for that value.

Below is an example with a sample response fragment:

[
    {
        "employeeId": "XXXX",
        "incidences": [
            {
                "name": "SICK LEAVE",
                "shortName": "SL",
                "fullDay": true,
                "typeId": "03",
                "values": {
                    "2025-08-27": 0.0,
                    "2025-08-25": 0.0,
                    "2025-08-26": 0.0
                }
            },
            {
                "name": "MEDICAL APPOINTMENT",
                "shortName": "MA",
                "fullDay": false,
                "typeId": "01",
                "values": {
                    "2025-08-12": 120.0,
                    "2025-08-06": 60.0
                }
            }
        ],
        "counters": [
            {
                "key": "counter.daily_sunday_bank_holiday",
                "shortName": "SBD",
                "values": {
                    "2025-08-24": 1.0,
                    "2025-08-31": 1.0
                }
            },
            {
                "key": "counter.sundays_worked_per_month",
                "shortName": "DTM",
                "values": {
                    "2025-08-24": 1.0,
                    "2025-08-10": 0.0,
                    "2025-08-17": 0.0,
                    "2025-08-03": 0.0,
                    "2025-08-31": 1.0
                }
            }
        ],
        "locations": [
            {
                "name": "OPENING",
                "shortName": "OP",
                "id": "01",
                "values": {
                    "2025-08-24": 300.0,
                    "2025-08-31": 720.0
                },
                "zone": "General"
            }
        ],
        "worked": [
            "2025-08-29",
            "2025-08-24",
            "2025-08-22",
            "2025-08-17",
            "2025-08-02",
            "2025-08-30",
            "2025-08-20",
            "2025-08-15",
            "2025-08-10",
            "2025-08-05",
            "2025-08-28",
            "2025-08-23",
            "2025-08-18",
            "2025-08-13",
            "2025-08-08",
            "2025-08-03",
            "2025-08-21",
            "2025-08-31",
            "2025-08-16",
            "2025-08-11",
            "2025-08-01",
            "2025-08-19",
            "2025-08-14",
            "2025-08-09",
            "2025-08-04"
        ],
        "attendance": [
            "2025-08-24",
            "2025-08-31"
        ],
        "otherIncidences": [
            "2025-08-07"
        ],
        "bags": [
            {
                "name": "Worked hours",
                "id": "WH",
                "values": {
                    "2025-08-23": 0.0,
                    "2025-08-01": 0.0,
                    "2025-08-24": 300.0,
                    "2025-08-02": 0.0,
                    "2025-08-21": 0.0,
                    "2025-08-22": 0.0,
                    "2025-08-27": 300.0,
                    "2025-08-05": 0.0,
                    "2025-08-28": 300.0,
                    "2025-08-06": 0.0,
                    "2025-08-25": 300.0,
                    "2025-08-03": 0.0,
                    "2025-08-26": 300.0,
                    "2025-08-04": 0.0,
                    "2025-08-20": 0.0,
                    "2025-08-18": 0.0,
                    "2025-08-19": 0.0,
                    "2025-08-12": 0.0,
                    "2025-08-13": 0.0,
                    "2025-08-10": 0.0,
                    "2025-08-11": 0.0,
                    "2025-08-16": 0.0,
                    "2025-08-17": 0.0,
                    "2025-08-14": 0.0,
                    "2025-08-15": 0.0,
                    "2025-08-30": 300.0,
                    "2025-08-31": 1020.0,
                    "2025-08-09": 0.0,
                    "2025-08-29": 300.0,
                    "2025-08-07": 0.0,
                    "2025-08-08": 0.0
                }
            }
        ]
    }
]

The response will contain the data defined to be displayed in the payroll report, so some fields may not appear. For example, if no hour bags have been configured, bags will not appear in the response.

Fields with no data to display will also not appear. For example, if there are no incidences registered for the employee in the query period, they will not appear in the response even if they are configured to be displayed in the payroll report.

Finally, the values returned in each of the elements will depend on the business configuration. For example, whether the incidence is full-day or non-computable, whether the hour bag takes into account clock-ins or assignments, etc.

Considerations

If the service specified in the URL does not exist in the business, the request will return a 404 Not Found error indicating not exits.

If the query interval specified in the URL exceeds 40 days, the request will return a 406 Not Acceptable error.

If there are no employees in the specified service, the request will return an empty array [].

What is an incidence?

What is a counter?

What is a task?

What is an hour bag?