Skip to content

Get Trip By Id

Request

Get trip

Security
oAuth2ClientCredentials
Path
trip_idstring, (uuid)(Trip Id)required
GET
/v1/trips/trip/{trip_id}
import requests

trip_id = "YOUR_trip_id_PARAMETER"
url = "https://api.qargo.com/v1/trips/trip/" + trip_id

headers = {"Authorization": "Bearer <YOUR_TOKEN_HERE>"}

response = requests.get(url, headers=headers)

data = response.json()
print(data)

Responses

Successful Response

Bodyapplication/json
idstring, (uuid)(Id)required

ID of the trip

namestring(Name)required

Name of the trip

statusstring(TripStatusOutput)required

Status of the trip

Enum:"CREATED""PLANNED""COMPLETED"
ordersArray of objects(Orders)required

List of orders associated with the trip

resource_allocationsArray of objects(Resource Allocations)

List of resources allocated to the trip

stopsArray of objects(Stops)required

List of stops associated with the trip

metricsTripMetrics (object) or null
Any of:

Trip distance and emission metrics

shipment_planning_groupPlanningGroup (object) or null
Any of:

Planning group linked to the trip

Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "status": "CREATED", "orders": [ {} ], "resource_allocations": [ {} ], "stops": [ {} ], "metrics": { "co2e_tank_to_wheel_kg": 0, "co2e_well_to_tank_kg": 0, "co2e_well_to_wheel_kg": 0, "distance_total_km": 0 }, "shipment_planning_group": { "name": "string", "code": "string" } }