Get employees by product
This endpoint retrieves information about all employees within a product.
GET /api/v2/businesses/{businessId}/products/{productId}/employees
If the data included in the request is correct —both businessId and productId— the response will contain the list of employees in the product 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 product. 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 product 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 product, the request will return an empty array []
.