Appearance
Conventions
These rules apply to every endpoint in the API.
Base URL
https://app.docrunner.io/apiFormat
- Request bodies are JSON. Send
Content-Type: application/json. - Response keys are
snake_case. - Timestamps are ISO 8601 in UTC.
- A single resource is wrapped in a key named for the resource, for example
{ "packet": { } }. - A list is wrapped in the plural key, with a
metaobject beside it.
List parameters
All list endpoints accept the same query parameters.
| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number. |
per_page | 25 | Results per page, from 1 to 1000. Values outside that range fall back to 25. |
paginate | true | Send false to return every result in one response. |
sort | name | id or name. |
order | ASC | ASC or DESC. |
search | none | Free-text search. |
filters[include_archived] | false | Send true to include archived records. |
Example:
bash
curl "https://app.docrunner.io/api/packets?page=2&per_page=50&sort=id&order=DESC" \
-H "X-API-Key: $DOCRUNNER_API_KEY"Pagination metadata
Paginated responses include these fields under meta:
json
{
"packets": [],
"meta": {
"current_page": 1,
"next_page": 2,
"previous_page": null,
"total_pages": 8,
"total_count": 15,
"per_page": 2,
"page_numbers": [1, 2, 3, 4, 5],
"filters": null,
"search": null,
"sort": null,
"order": null
}
}filters, search, sort and order echo back what you sent. When paginate=false, the paging fields are omitted.
Errors
Errors return a JSON body with a single error string.
json
{ "error": "Packet 999 not found" }| Status | Meaning |
|---|---|
401 Unauthorized | Missing or invalid API key. |
404 Not Found | The record does not exist in your account. |
406 Not Acceptable | The record failed validation. |
422 Unprocessable Content | The request was understood but could not be completed. The message says why. |