Skip to main content

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:

ParamTypeRequiredDescription
first_namestringNoFilter by name
last_namestringNoFilter by last name
emailstringNoFilter by email
departmentstringNoFilter by department
countrystringNoFilter by country
positionstringNoFilter 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.

ParamTypeRequiredDescriptionDefault Value
pageintegerNoCurrent page (standard pagination)
per_pageintegerNoAmount per page20

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​

CodeMessageCouse
401UnauthorizedAPI Key invalid or missing
400Bad RequestOne or more filters have an invalid format
429Too Many RequestsThe limit of requests was exceeded
500Internal Server ErrorUnexpected server error

➤ Test Request​