Get active employees by service
This endpoint retrieves information about all active employees within a service during a specified period.
GET /api/v2/businesses/{businessId}/services/{serviceId}/employees/between?from={yyyy-MM-dd}&to={yyyy-MM-dd}
If the data included in the request is correct —both businessId and serviceId—, the response will contain the list of employees in the service with all the defined information for them:
[
{
"name": "Theodore",
"surname": "Hayes",
"email": "theohayes@bsn.com",
"birthday": "1989-09-10",
"employeeId": "209_14",
"virtual": false
},
{
"name": "Melanie",
"surname": "Jenkins",
"employeeId": "555",
"virtual": false
},
{
"name": "Andrea",
"surname": "Meyer",
"employeeId": "444",
"virtual": false
},
{
"name": "Mariane",
"surname": "Ortega Acevedo",
"birthday": "2004-01-02",
"employeeId": "1006350",
"virtual": false
}
]
[
{
"name": "ARIANA",
"surname": "VISMARA",
"group": "Responsible",
"employeeId": "1493432",
"metadata": {
"language": "english"
},
"virtual": false
},
{
"name": "CLARA",
"surname": "SANDERS",
"group": "Merchandising",
"employeeId": "5690921",
"metadata": {
"or": "WOMAN"
},
"virtual": false
},
{
"name": "MAYA",
"surname": "SANTORO",
"group": "General",
"employeeId": "9454863",
"virtual": false
}
]
As shown in the examples, the request will return the defined information for each of the employees in the service. Thus, those non-mandatory fields whose information has not been defined in Orquest will not appear in the response. In the same way, metadata will only appear in businesses that have previously configured this information for their employees.
Considerations
If the service indicated in the URL does not exist in the business, the request will return a 404 Not Found
error, specifying not exits in the message.
If there are no employees in the indicated service, the request will return an empty array []
.