Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Filters, Errors and Examples

Learn how to use filters to narrow down assessment results by candidate, activity, or date.

This page covers the available filtering options, examples of common requests, and how the API responds when no records match or a request cannot be processed.

Filtering Results

The Speaking Test API supports query parameters that help you retrieve the records relevant to your application.

Filters can be added to the URL of the appropriate results endpoint.

Supported query parameters

The table below summarizes the available filtering parameters and indicates which results endpoints support each one.

Parameter

Assessment Results

Activity Results

Candidate Results

username

Supported

Supported

—

email

Supported

Supported

—

speechace_user_id

Supported

Supported

—

date_from

Supported

Supported

Supported

date_to

Supported

Supported

Supported

attempts

Supported

Supported

—

attempt_state

Supported

Supported

—

result_level

—

—

Supported

include_incomplete

—

—

Supported

Filtering by attempt status

The Get Assessment Results and Get Activity Results endpoints support optional parameters for controlling which attempts are returned.

  • attempts: Controls which attempts are included in the response. Use all to request all attempts.

  • attempt_state: Filters results by attempt status. Use completed to retrieve completed attempts, or all to include attempts across statuses.

To include incomplete results when retrieving results for a specific candidate, use the include_incomplete parameter on Get Candidate Results.

Invalid values for supported filter parameters return 400 Bad Request with an error message describing the invalid choice.


Example — Filter Results by Date

Retrieve assessment results for attempts recorded during a specific date range.

Example request

The below example demonstrates how to retrieve assessment results within a specified date range using the date_from and date_to query parameters. Select your preferred programming language to view the corresponding request code.

Dates use ISO 8601 timestamps with timezone information. The Z suffix indicates UTC.

These date filters are also available on the Get Activity Results and Get Candidate Results endpoints.


Empty Results

For the Assessment Results endpoint, a successful request with no matching attempts returns an empty candidate_records array.

Example response — 200 OK

The below example shows a successful API response when no candidate attempts match the specified filters. The response returns an empty candidate_records array while retaining the assessment and result-period information.


Error Responses

When a request cannot be processed, the API returns an HTTP error status and a JSON error message.

The following examples illustrate common API errors, their corresponding HTTP status codes, and the JSON responses developers may encounter when a request fails.

Common errors observed

HTTP status

Scenario

Error message

400 Bad Request

Date range is reversed

date_from must not be later than date_to.

400 Bad Request

Invalid timestamp format

ISO 8601 timestamp required

400 Bad Request

Unsupported query parameter

Unsupported query parameter: include_incomplete.

401 Unauthorized

Missing or invalid API key

Invalid API key.

404 Not Found

Requested resource not found

The requested resource was not found.

401 — Invalid API Key

A 401 error occurs when a request is made without a valid API key.

Check that the API key is valid and included as a Bearer token in the Authorization header.

404 — Resource Not Found

A 404 error occurs when the requested resource cannot be found. Check that the workspace, assessment, activity, or result ID is correct and accessible.

400 — Invalid Date Range

A 400 error occurs when date_from is later than date_to. Make sure the start date is earlier than or equal to the end date before sending the request.

400 — Invalid Date Format

A 400 error occurs when a date parameter isn't provided in the expected format. Use an ISO 8601 timestamp with a timezone, such as 2026-09-01T00:00:00Z.

400 — Unsupported Query Parameter

A 400 error occurs when a request includes a query parameter that isn't supported by the endpoint. Check the supported query parameters before sending the request again.

Query parameters are endpoint-specific. A parameter supported by one endpoint may not be accepted by another. For example, include_incomplete is documented for Get Candidate Results but should not be used with Get Assessment Results unless supported.

400 — Invalid Attempt Filter

A 400 Bad Request response may occur when an unsupported value is supplied for attempts or attempt_state.

For example below , an invalid attempt_state value may return:

Check that the filter value is supported by the endpoint before retrying the request.


Troubleshooting

If an API request doesn't return the expected data, check the endpoint URL, workspace and assessment identifiers, query parameters, and API key.

For empty responses, confirm that the selected candidate, activity, or date range has matching assessment records.

Error responses include a request_id that can help identify a specific failed request when contacting Speechace support.

Last updated