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:

[
    {
        "employeeId": "00001",
        "status": "DENIED",
        "type": "MAYBE",
        "from": "2025-10-25",
        "to": "2025-10-25",
        "fromHour": "11:00",
        "toHour": "16:00"
    },
    {
        "employeeId": "00002",
        "status": "GRANTED",
        "type": "MAYBE",
        "from": "2025-10-25",
        "to": "2025-10-25",
        "fromHour": "08:00",
        "toHour": "09:00"
    },
    {
        "employeeId": "00003",
        "status": "DENIED",
        "type": "NON_WORKED",
        "from": "2025-10-31",
        "to": "2025-10-31"
    }
]

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?

What is the structure of a request in the Orquest API?