Get the list of all trips accessible by the current user. Can be paginated and/or filtered by trip state
GET /api/trips
200
[
{
"id": 1,
"description": "MyText",
"_id": "trip-1",
"user_name": "Wellington Nikolaus IV",
"state": "queue",
"user_id": 4,
"type": "trip",
"updated_at": "2021-05-26T20:11:19.064Z",
"cost_center_ids": [],
"date": "2021-05-26",
"approvers": [],
"approved_by": null,
"approved_by_ids": [],
"current_approvers_ids": [],
"transaction_approvers": [],
"created_at": "2021-05-26T20:11:19.064Z",
"company_id": 2,
"paid_at": null,
"taxable": 1.0,
"mileage_vehicle_id": 1,
"cost_center_id": 0,
"user": {
"id": 4,
"name": "Wellington Nikolaus IV",
"email": "quinten@bernhardward.name",
"country": {
"id": 2,
"name": "quam exercitationem a",
"currency": "EUR",
"currency_symbol": "€"
}
},
"cost_centers": [],
"comments": [],
"entries": [
{
"id": 1,
"trip_transaction_id": 1,
"distance": 10.0,
"number_of_people": "1",
"cost_cents": 100,
"cost_currency": "EUR",
"original_amount_cents": 100,
"original_amount_currency": "EUR",
"route": null,
"emissions": "16.6639"
}
],
"vehicle": {
"id": 1,
"name": "id",
"country": {
"id": 3,
"name": "et dolores ut",
"currency": "EUR",
"created_at": "2021-05-26T20:11:18.944Z",
"updated_at": "2021-05-26T20:11:18.944Z",
"code": null
},
"years": [
{
"id": 1,
"year": 2021,
"cost_cents": "10.0",
"additional_passenger_cents": "0.0"
}
]
},
"documents": []
}
]
| Param name | Description |
|---|---|
|
archived_after
optional |
Return only trips accounted on and after the supplied date. Date format: YYYYMMDD (example: 20180702) Validations:
|
|
page
optional |
Return only one page of trips. Default per-page is 10 Validations:
|
|
per_page
optional |
Number of trips returned per page. Works only in combination with “page” param. Default value is 10 Validations:
|
|
state
optional |
Validations:
|