Get incidences by product

This endpoint allows querying the registered incidences linked to a product within a specified period of time not exceeding 30 days.

GET /api/v2/businesses/{businessId}/products/{productId}/incidences/from/{yyyy-MM-dd}/to/{yyyy-MM-dd}

If the data included in the request is correct —both the businessId and the productId—, the response will contain the list of incidences for the product within the defined time interval.

Response example

[
    {
        "personId": "0001",
        "from": "2026-08-12",
        "to": "2026-08-12",
        "initTime": "10:00",
        "endTime": "10:30",
        "workedMinutes": 0,
        "type": {
            "name": "UNJUSTIFIED ABSENCE",
            "shortName": "UNJ",
            "fullDay": false,
            "color": "#51d9ff",
            "calculationType": "NOT_COMPUTABLE",
            "holidays": false
        }
    },
    {
        "id": "0712",
        "personId": "0002",
        "from": "2025-07-12",
        "to": "9999-12-31",
        "workedMinutes": 0,
        "type": {
            "id": "02",
            "name": "HOLIDAYS",
            "shortName": "HOL",
            "fullDay": true,
            "color": "#5ea226",
            "calculationType": "PROPORTIONAL",
            "workedDays": 7,
            "holidays": true
        }
    },
    {
        "personId": "0003",
        "from": "2026-08-12",
        "to": "2026-08-12",
        "initTime": "12:00",
        "endTime": "13:00",
        "workedMinutes": 0,
        "type": {
            "id": "01",
            "name": "MEDICAL APPOINTMENT",
            "shortName": "MED",
            "fullDay": false,
            "color": "#60b5ff",
            "calculationType": "DURATION",
            "holidays": false
        }
    }
]
Details
  • id: external identifier of the incidence.

  • personId: external identifier of the employee linked to the incidence.

  • reason: free text with the reason for the incidence.

  • from: date when the incidence starts, in yyyy-MM-dd format.

  • to: date when the incidence ends, in yyyy-MM-dd format.

  • initTime: start time of the incidence, in HH:mm format. Refers to local time, that is, the time zone of the service.

  • endTime: end time of the incidence, in HH:mm format. Refers to local time, that is, the time zone of the service.

  • workedMinutes: time, in minutes, that the incidence computes.

  • type: type of incidence, as configured in the business’s incidence catalog. Contains the following fields:

    • id: external identifier of the incidence type.

    • name: name of the incidence type.

    • shortName: abbreviation of the incidence type.

    • fullDay: determines whether the incidence occupies the full working day (true) or a specific time interval (false).

    • color: color configured for the incidence type.

    • calculationType: method used to calculate the computed time. Possible values are DURATION, PROPORTIONAL, NOT_COMPUTABLE, FIXED, ASSIGNMENT, or DAILY_LIMIT_AND_PATTERNS.

    • workedMinutes: equivalent minutes the incidence computes when calculationType is FIXED.

    • workedDays: working days per week assigned to this incidence type, used as the basis for prorating annual working days.

    • holidays: determines whether the incidence type represents employee holidays (used in counters and reports). Can only be true if calculationType is PROPORTIONAL or NOT_COMPUTABLE.

As seen in the example, the request will return the information previously defined in the catalog of incidences: name, abbreviation, etc., as well as the specific details of the incidence type.

Considerations

The initTime and endTime fields return the local time, that is, the time zone configured for the service.

If there are no incidences for the period indicated in the URL, the request will return an empty array [].

If the product/service indicated in the URL does not exist in the business, the request will return a 404 Not Found error, specifying in the message not exists.

If the interval indicated in the URL exceeds 31 days, the request will return a 406 Not Acceptable error.