GET Employees
GET /companies/v1/victimsapi
Get a paginated list of employees with partial filters (LIKE) for multiple fields.
➤ URL
GET https://back.whalemate.com/api/companies/v1/victimsapi
➤ Headers
{
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
}
➤ Filtering
Filters can be applied to the route using the following structure:
filter[filter_name]=value
Each filter corresponds to a specific field and helps refine the query results. Below is an explanation of the available filters:
| Param | Type | Required | Description |
|---|---|---|---|
first_name | string | No | Filter by name |
last_name | string | No | Filter by last name |
email | string | No | Filter by email |
department | string | No | Filter by department |
country | string | No | Filter by country |
position | string | No | Filter by position |
Example Usage
Multiple filters can be combined in a single request to refine the search results. Example:
filter[department]=Sales,IT&filter[country]=Argentina
This query will return all records of people who work in the Sales or IT departments and whose country is Argentina.
➤ Pagination
Pagination parameters allow controlling the number of results per page and navigating through pages.
| Param | Type | Required | Description | Default Value |
|---|---|---|---|---|
page | integer | No | Current page (standard pagination) | |
per_page | integer | No | Amount per page | 20 |
Example Usage
filter[country]=Argentina,USA&per_page=25&page=2
This query will return the second page of people whose country is Argentina or USA, showing up to 25 records on that page.
➤ Types
{
id: integer,
first_name: string,
last_name: string,
email: string,
department: string,
country: string,
position: string
}[]
➤ Response
Example of successful response (200 OK)
[
{
id: 1,
first_name: "Laura",
last_name: "Pérez",
email: "laura.perez@empresa.com",
department: "IT",
country: "Argentina",
position: "Analista de Seguridad" ,
}
]
➤ Common Errors
| Code | Message | Couse |
|---|---|---|
| 401 | Unauthorized | API Key invalid or missing |
| 400 | Bad Request | One or more filters have an invalid format |
| 429 | Too Many Requests | The limit of requests was exceeded |
| 500 | Internal Server Error | Unexpected server error |