Short answer
The POST /api/v1/tests/reports/search endpoint returns testing reports with the current saved filter applied. All request body fields are optional; without a body, the API uses page = 0, size = 50 and view = all. Access requires a Bearer token with the tests.read scope, and lang can control the language of localised testing resources.
Which endpoint is used?
Use POST /api/v1/tests/reports/search. The endpoint returns a page of company testing reports with the current saved filter applied.
| Parameter | Value |
|---|---|
| Method | POST |
| Endpoint | /api/v1/tests/reports/search |
| Base URL | [https://smartway.pro](https://smartway.pro) |
| Auth | Bearer token |
| Content-Type | application/json |
What is this API endpoint used for?
This endpoint is used to retrieve company testing reports with pagination, view mode and full-name search. It is used by HR integrations, backend services and technical administrators to build report lists and open PDF reports.
What prerequisites are required before sending the request?
-
A Bearer token with company context is required.
-
The token must include the
tests.readscope. -
The current saved filter must be considered or reset before retrieving the required data.
| Prerequisite | Description | Required |
|---|---|---|
access_token |
Bearer token with company context | Yes |
tests.read |
Scope for reading testing reports | Yes |
| Saved filter | The filter from GET/PUT /api/v1/tests/reports/filter is applied additionally |
No |
Which parameters must be sent in the request?
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization |
string | Yes | Bearer token in the Bearer <access_token> format |
Accept |
string | Yes | application/json |
Content-Type |
string | Required when a body is sent | application/json |
Path parameters
Path parameters are absent.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
lang |
string | No | Language of localised testing resources; default en, available languages: uk, ru, en |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
page |
int32 | No | Page number; default 0; this parameter is 0-based |
size |
int32 | No | Page size; default 50, maximum 200 |
view |
string | No | Selection mode; only all, candidate, employee are allowed |
query |
string | No | Full-name search |
curl example
Example request without body:
curl -X POST 'https://smartway.pro/api/v1/tests/reports/search' \
-H 'Authorization: Bearer <access_token>' \
-H 'Accept: application/json'
Example request with parameters:
curl -X POST 'https://smartway.pro/api/v1/tests/reports/search?lang=en' \
-H 'Authorization: Bearer <access_token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"page": 0,
"size": 20,
"view": "all",
"query": "Ivan"
}'
What response does the API return?
A successful request returns 200 OK and a PublicTestReportListResponse object with reports and pagination metadata.
{
"data": [
{
"uniqueId": "abc12345",
"candidateId": 1001,
"name": "Ivan Petrenko",
"dateSend": "2026-03-10",
"dateReceipt": "2026-03-12",
"active": true,
"testNames": "Conflict Test, Adaptive Sales",
"department": "Sales",
"jobTitle": "Manager"
}
],
"meta": {
"page": 0,
"size": 20,
"totalElements": 1,
"totalPages": 1,
"hasNext": false
}
}
What do the API response fields mean?
| Field | Type | Description |
|---|---|---|
data[].uniqueId |
string | Unique testing report identifier |
data[].candidateId |
integer | Candidate ID |
data[].name |
string | Candidate or employee full name |
data[].dateSend |
string | Testing send date |
data[].dateReceipt |
string | Result receipt date |
data[].active |
boolean | Whether the report is active |
data[].testNames |
string | Test names in the report |
data[].department |
string | Department |
data[].jobTitle |
string | Job title |
meta.page |
integer | Current page number |
meta.size |
integer | Page size |
meta.totalElements |
integer | Total number of elements |
meta.totalPages |
integer | Total number of pages |
meta.hasNext |
boolean | Whether a next page exists |
What happens under the hood?
-
Tenant visibility of reports is determined server-side from
companyIdin the Bearer token as company-level / HRADMIN-equivalent scope. -
Reporting is not limited to candidates invited via the current API key or the HR owner of the key.
-
The API returns all company testing reports available at HRADMIN level.
-
The current saved filter from
GET/PUT /api/v1/tests/reports/filteris additionally applied:active,startDate,endDate,testIds,departments,jobTitles. -
langis optional; if it is not sent, the API usesen. -
Access requires the
tests.readscope.
Which edge cases should be considered?
| Scenario | API behaviour | Integrator action |
|---|---|---|
| Request without body | API uses page = 0, size = 50, view = all |
Do not send a body when default values are required |
| Page numbering | page is 0-based |
Send page = 0 for the first page |
Invalid view |
API returns 400 Bad Request |
Use only all, candidate, employee |
| Saved filter is active | The filter is applied additionally | Configure or reset the filter before searching |
lang not sent |
API uses en |
Send lang when another language is required |
Which errors can the API return?
| HTTP status | Description |
|---|---|
400 Bad Request |
Invalid view or other invalid search parameters |
401 Unauthorized |
Missing or invalid Bearer token |
403 Forbidden |
Insufficient permissions |
500 Internal Server Error |
Unexpected error |
503 Service Unavailable |
Internal integration failure |
How to use the result in subsequent API requests?
Use meta.page, meta.size, meta.totalPages and meta.hasNext for pagination. Use uniqueId from the list to download a PDF report.
Example subsequent request to download a PDF report:
curl -X GET 'https://smartway.pro/api/v1/tests/reports/pdf?uniqueId=abc12345&lang=en' \
-H 'Authorization: Bearer <access_token>' \
-H 'Accept: application/pdf' \
--output test-report-abc12345.pdf
Which mistakes should integrators avoid?
-
Treating
page = 1as the first page. -
Ignoring the active saved filter before search.
-
Sending a
viewvalue other thanall,candidateoremployee. -
Expecting the API to return only reports for candidates invited via the current API key.
FAQ
Is request body required?
No. If the endpoint is called without a body, the API uses page = 0, size = 50 and view = all.
Which page number starts pagination?
page is 0-based: page = 0 is the first page and page = 1 is the second page.
Which values does view support?
Only all, candidate and employee are allowed.
Is the saved filter applied?
Yes. The filter from GET/PUT /api/v1/tests/reports/filter is applied additionally.
Which scope is required?
The tests.read scope is required.