Get Business Travel
Retrieve detailed information about a specific business travel record by its unique identifier.
Request
Bearer token for authenticationExample: Bearer sk_live_1234567890abcdef
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa
Path Parameters
The unique identifier (UUID) of the business travel recordExample: 550e8400-e29b-41d4-a716-446655440000
Response
Date of the business travel
Mode of transport: car, metro, train, trolleybus, bus, motorbike, aircraft, ferry
Distance traveled in kilometers
Starting location address
Whether this is a round trip
Vehicle size (for car/motorbike): small, medium, large, average
Fuel type (for car/motorbike)
Flight type (for aircraft): domestic, short_haul_international, long_haul_international
Cabin class (for aircraft): economy, premium_economy, business, first, average
Current status: active, pending, error
Calculated CO2 equivalent emissions in kg
Timestamp when the record was created
Timestamp when the record was last updated
Example
curl -X GET "https://api.dcycle.io/v1/business-travels/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
Successful Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"travel_date": "2024-12-01",
"transport_type": "train",
"distance_km": 621.5,
"origin": "Madrid, Spain",
"destination": "Barcelona, Spain",
"travel_number": 2,
"round_trip": false,
"vehicle_size": null,
"fuel_type": null,
"flight_type": null,
"cabin_class": null,
"status": "active",
"co2e": 24.86,
"created_at": "2024-12-01T10:30:00Z",
"updated_at": "2024-12-01T10:30:00Z"
}
Common Errors
401 Unauthorized
Cause: Missing or invalid API key
{
"detail": "Invalid API key",
"code": "INVALID_API_KEY"
}
404 Not Found
Cause: Business travel not found or doesn’t belong to your organization
{
"detail": "BusinessTravel with id=550e8400-e29b-41d4-a716-446655440000 not found",
"code": "BUSINESS_TRAVEL_NOT_FOUND"
}
Solution: Verify that:
- The business travel ID is correct
- The business travel belongs to the organization specified in
x-organization-id