Get requests by product

This endpoint returns employee requests for a product within a time interval of no more than 31 days.

GET /api/v2/businesses/{businessId}/products/{productId}/requests?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 requests from the product employees in the time interval indicated in the URL.

Response example

[
    {
        "employeeId": "1006350",
        "status": "REQUESTED",
        "type": "MANDATORY",
        "from": "2026-08-27",
        "to": "2026-08-27",
        "fromHour": "20:00",
        "toHour": "22:00",
        "requestedAt": "2026-08-20T10:15:32.123Z"
    },
    {
        "employeeId": "1006350",
        "status": "GRANTED",
        "type": "MAYBE",
        "from": "2026-08-29",
        "to": "2026-08-29",
        "fromHour": "20:00",
        "toHour": "22:00",
        "requestedAt": "2026-08-22T16:42:10.500Z"
    }
]
Details
  • employeeId: external identifier of the employee.

  • status: status of the request. The possible values are REQUESTED, GRANTED and DENIED.

  • type: type of availability that applies to the request. The possible values are MANDATORY (work availability), MAYBE (availability) and NON_WORKED (free day).

  • from: start date of the request in yyyy-MM-dd format.

  • to: end date of the request in yyyy-MM-dd format.

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

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

  • comments: free text that can accompany the request.

  • recover: type of recovery indicating how the employee’s request could be compensated. The options are FREE (free day) or NONE (no compensation is offered for the request).

  • requestedAt: date and time the request was created, in yyyy-MM-ddTHH:mm:ss.SSSZ format.

As can be seen in the example, the response information will depend on the data defined for each request and its status in the system.

Considerations

The fromHour and toHour fields return values in local time, determined by the time zone configured for the service.

If the time period specified in the URL is longer than 31 days, the request will return a 400 Bad Request error indicating from and to cannot be greater than 31.

If the product identifier is incorrect, the request will return a 404 Not Found error indicating not exits.

If there are no requests for the product in the query interval, the request will return an empty array [].

What is a request?