Skip to main content
GET
Get Free-Float Trip History

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer <key>. Create one in the SWITCH Copilot under Settings → API keys (needs the API keys permission in your company), or with POST /auth/api-keys. The key is shown once, at creation.

Path Parameters

provider
string
required

Identifier of the mobility provider whose data you analyse, e.g. acme-bikes. It must be the provider of a data source enabled for your company's free-floating trip-history analytics; any other value is refused with 404 no_data_binding (kind: source). Your SWITCH contact tells you the provider identifiers and locations enabled for your company.

Query Parameters

geolabel
string
required

Location to analyse, e.g. milan: one of the locations (or their geolabels) that your company's trip-history analytics are enabled for with this provider. Any other value is refused (404 no_data_binding, or 403 for providers whose trips are stored per location).

Minimum string length: 1
Examples:

"milan"

"turin"

start_date
string<date-time>
required

Start of the analysis period, an ISO 8601 date-time, e.g. 2026-10-01T00:00:00Z.

Example:

"2026-10-01T00:00:00Z"

end_date
string<date-time>
required

End of the analysis period, an ISO 8601 date-time, e.g. 2026-10-31T23:59:59Z.

Example:

"2026-10-31T23:59:59Z"

start_hour
integer | null

Keep only trips starting at or after this hour of the day (0-23, in the data source's time zone, UTC unless configured otherwise).

Required range: 0 <= x <= 23
Example:

7

end_hour
integer | null

Keep only trips ending at or before this hour of the day (0-23, same time zone as start_hour). Alone, it applies to the trip start hour.

Required range: 0 <= x <= 23
Example:

10

Response

Trip history retrieved. Returns spatial distribution, temporal patterns, trip counts, and usage statistics.

Comprehensive trip history analysis response containing spatial, temporal, and usage pattern insights for free-floating vehicle systems.

trip_locations
TripLocationCount · object[]
required

Spatial distribution of trips aggregated by rounded coordinates. Each location represents a cluster of nearby trip origins/destinations.

Example:
hourly_distribution
HourlyDistribution · object[]
required

Temporal distribution showing trip patterns by hour of day. Useful for identifying peak usage periods and demand planning.

Example:
date_distribution
DateDistribution · object[]
required

Trip volume by calendar period over the analysis range. The date is the bucket label for each period.

Example:
total_trips
integer
required

Completed rides in the selected data set

Required range: x >= 0
date_bucket
enum<string>
required

Calendar period represented by each date-distribution point

Available options:
day,
week,
fortnight,
month,
quarter
feasibility
string
required

Analysis execution status indicating success or error state

Examples:

"success"

"error"

"partial"

message
string
required

Human-readable message describing analysis results or errors

Examples:

"Analysis completed successfully. Found 1,234 locations with trip data."

"Error during trip history analysis: Invalid date range provided."