Skip to content

List ride sessions

Rate limit 120 requests/min (authenticated)

GET
/devices/{device}/ride-sessions
curl --request GET \
--url 'https://app.ridebox.my/api/devices/YOUR_DEVICE_UUID/ride-sessions?from=2026-09-01&to=2026-09-12&min_distance_km=10&sort=-started_at&page=1&per_page=15' \
--header 'Authorization: Bearer <token>' \
--header 'X-API-Version: v1'

Ride history for the device, with date, distance and sort filters.

Authenticated tier: 120 requests/min per user.

device
required
string format: uuid

The device uuid.

Example

YOUR_DEVICE_UUID
X-API-Version
string
default: v1
Allowed values: v1

Selects the API version. With no version header the request is served as v1. An Accept: application/vnd.ridebox+v1+json header selects the version too; X-API-Version is read first when both are sent. An unsupported version answers 400 with supported_versions.

Example

v1
from
string format: date

Sessions starting on or after this date.

Example

2026-09-01
to
string format: date

Sessions starting on or before this date.

Example

2026-09-12
min_distance_km
number format: float

Minimum session distance in kilometres.

Example

10
sort
string
default: -started_at
Allowed values: -started_at started_at

Sort order.

Example

-started_at
page
integer
default: 1 >= 1

Page number, 1-based.

Example

1
per_page
integer
default: 15 >= 1

Items per page. Defaults to 15. A value above 100 is clamped to 100, not rejected.

Example

15

Paginated ride sessions.

Media type application/json
object
data
required
Array
links
required
Pagination links
object
first
required
string | null format: uri
last
required
string | null format: uri
prev
required
string | null format: uri
next
required
string | null format: uri
meta
required
Pagination meta
object
current_page
required
integer
>= 1
last_page
required
integer
>= 1
per_page
required

Never exceeds 100; a larger request is clamped, not rejected.

integer
>= 1 <= 100
total
required
integer
data
required
Array<object>
Ride session summary

A ride session as returned by the list endpoint.

object
id
required
string format: uuid
started_at
required
string format: date-time
ended_at
required

Null while the session is still open.

string | null format: date-time
distance_km
required
number format: float
moving_s
required

Seconds spent moving, excluding stops.

integer
max_speed
required

Maximum speed in km/h.

number format: float

Example

{
"links": {
"first": "https://app.ridebox.my/api/alerts?page=1",
"last": "https://app.ridebox.my/api/alerts?page=3",
"prev": null,
"next": "https://app.ridebox.my/api/alerts?page=2"
},
"meta": {
"current_page": 1,
"last_page": 3,
"per_page": 15,
"total": 41
},
"data": [
{
"id": "YOUR_RIDE_SESSION_UUID",
"started_at": "2026-09-11T08:00:00Z",
"ended_at": "2026-09-11T09:12:00Z",
"distance_km": 42.7,
"moving_s": 3900,
"max_speed": 118
}
]
}
X-API-Version
string
Allowed value: v1

The API version that served this response. Always v1 on this surface.

Example
v1
X-RateLimit-Limit
integer

Requests permitted in the current window for the applicable tier.

Example
120
X-RateLimit-Remaining
integer

Requests remaining in the current window.

Example
0

Missing, invalid, expired or revoked token. When a token was presented, code tells an expired token from a revoked one.

Media type application/json
Error envelope

The single shape used by every non-2xx response. message is always present and safe to display. errors is present only on 422. code is present on a 401 that presented a token.

object
message
required

Human-readable, safe to display to the end user.

string
errors

Present only on 422. Field name to array of messages.

object
key
additional properties
Array<string>
code
Machine-readable error code

Tells an expired token, which you can replace by signing in again, from a revoked one.

string
Allowed values: token_expired token_revoked

Examples

No token presented

{
"message": "Unauthenticated."
}
X-API-Version
string
Allowed value: v1

The API version that served this response. Always v1 on this surface.

Example
v1

Not found, or owned by another account. The two cases are deliberately indistinguishable.

Media type application/json
Error envelope

The single shape used by every non-2xx response. message is always present and safe to display. errors is present only on 422. code is present on a 401 that presented a token.

object
message
required

Human-readable, safe to display to the end user.

string
errors

Present only on 422. Field name to array of messages.

object
key
additional properties
Array<string>
code
Machine-readable error code

Tells an expired token, which you can replace by signing in again, from a revoked one.

string
Allowed values: token_expired token_revoked

Example

{
"message": "Not found."
}
X-API-Version
string
Allowed value: v1

The API version that served this response. Always v1 on this surface.

Example
v1

Validation failed. errors is keyed by field name.

Media type application/json
Error envelope

The single shape used by every non-2xx response. message is always present and safe to display. errors is present only on 422. code is present on a 401 that presented a token.

object
message
required

Human-readable, safe to display to the end user.

string
errors

Present only on 422. Field name to array of messages.

object
key
additional properties
Array<string>
code
Machine-readable error code

Tells an expired token, which you can replace by signing in again, from a revoked one.

string
Allowed values: token_expired token_revoked

Example

{
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
]
}
}
X-API-Version
string
Allowed value: v1

The API version that served this response. Always v1 on this surface.

Example
v1

Rate limited. Back off and honour Retry-After.

Media type application/json
Error envelope

The single shape used by every non-2xx response. message is always present and safe to display. errors is present only on 422. code is present on a 401 that presented a token.

object
message
required

Human-readable, safe to display to the end user.

string
errors

Present only on 422. Field name to array of messages.

object
key
additional properties
Array<string>
code
Machine-readable error code

Tells an expired token, which you can replace by signing in again, from a revoked one.

string
Allowed values: token_expired token_revoked

Example

{
"message": "Too many requests. Please try again shortly."
}
Retry-After
required
integer
>= 1

Seconds to wait before retrying.

Example
42
X-RateLimit-Limit
integer

Requests permitted in the current window for the applicable tier.

Example
120
X-RateLimit-Remaining
integer

Requests remaining in the current window.

Example
0
X-RateLimit-Reset
integer

Unix timestamp at which the current window resets. Sent on 429.

Example
1789180500
X-API-Version
string
Allowed value: v1

The API version that served this response. Always v1 on this surface.

Example
v1