Status Changes API Documentation
Overview
The Status Changes API returns records of advertiser status transitions (e.g. applied → approved, applied → rejected). Results are powered by Searchkick (Elasticsearch/OpenSearch) when available, with an SQL fallback. Results are scoped to the publisher(s) you are authorized to see (your publisher, or all publishers if you are an admin).
Key Features
- Searchkick – Full-text and filtered search when the search service is available.
- Filters – Optional
from_status,to_status,advertiser_id, and free-textq. - Pagination –
pageandper_page(orlimit). - Publisher scoping – You only see status changes for advertisers belonging to your publisher (or all if admin).
Endpoint
List status changes
GET /api/v1/status_changes
Returns paginated status changes, ordered by changed_at descending.
Authentication
X-Api-Key: YOUR_API_KEY
Sign in to get your API key.
API Playground
Use the table below to see how to perform common actions. Click Test to run a request and preview the JSON response, or Open to open the URL in a new tab. Sign in to enable live testing with your API key.
| Action | Method | Endpoint | Description |
|---|---|---|---|
| List status changes | GET |
/api/v1/status_changes |
Paginated list; optional page, per_page (or limit). |
| Filter by from_status | GET |
/api/v1/status_changes?from_status=applied |
Previous status (e.g. applied, approved). |
| Filter by to_status | GET |
/api/v1/status_changes?to_status=approved |
New status (e.g. approved, rejected, stopped). |
| Filter by advertiser | GET |
/api/v1/status_changes?advertiser_id=:id |
Advertiser ID or slug. |
| Free-text search | GET |
/api/v1/status_changes?q=... |
Searchkick free-text search when available. |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | No | Free-text search (Searchkick). |
from_status | string | No | Filter by previous status (e.g. applied, approved). |
to_status | string | No | Filter by new status (e.g. approved, rejected, stopped). |
advertiser_id | string | No | Advertiser ID or slug (friendly). |
page | integer | No | Page number (default 1). |
per_page | integer | No | Results per page (default 20, max 100). |
limit | integer | No | Alias for per_page. |
Response Format
JSON:API-style data array plus meta (pagination):
{
"data": [
{
"id": "456",
"type": "status_change",
"attributes": {
"from_status": "applied",
"to_status": "approved",
"changed_at": "2024-01-15T10:30:00Z",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"advertiser_id": 123,
"advertiser_name": "Example Advertiser"
}
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total_count": 42,
"total_pages": 3
}
}
Error Handling
- 401 Unauthorized – Missing or invalid API key.
- When Searchkick is unavailable, the API falls back to SQL; you still get results with the same filters and pagination.