Examples

{
  "total_amount": "860.00",
  "total_records": "10",
  "collection": [
    {
      "id": 942,
      "description": "some trip to somewhere",
      "user_name": "John Smith",
      "state": "reviewing",
      "date": "2023-09-01",
      "cost_center_names": "Some Cost Center",
      "approved_by": "",
      "user_id": 34,
      "cost_center_ids": [42],
      "cost_center_external_ids": ["ABC01"],
      "sent_at": null,
      "created_by": "John Smith",
      "updated_at": "2023-09-04",
      "paid_at": null,
      "batch_reference_number": null,
      "vehicle_name": "Autolla",
      "passengers": 1,
      "total_cost": "86.00",
      "cost_per_unit": "0.43",
      "vehicle_category_unit": "km",
      "total_distance": 200.0,
      "debit_account_code": "7870"
    }
  ]
}

Params

Param name Description
page
optional

Page number.

Validations:

  • Must be a Integer

per_page
optional

Number of records per page. Default: 25.

Validations:

  • Must be a Integer

q
optional

Query to filter trips by description or amount, e.g.: “Helsinki”, “12.40”.

Validations:

  • Must be a String

date_range
optional

Date range to filter trips by. Format: “DD/MM/YYYY - DD/MM/YYYY”, e.g. “01/09/2023 - 04/09/2023”.

Validations:

  • Must be a String

user_id
optional

User ID to filter trips by.

Validations:

  • Must be a Integer

cost_center_id
optional

Cost center ID to filter trips by.

Validations:

  • Must be a Integer

state
optional

State to filter trips by.

Validations:

  • Must be one of: draft, reviewing, unapproved, queue, accounted, failed.

updated_at_range
optional

Date range when trips were last updated to filter by. Format: “DD/MM/YYYY - DD/MM/YYYY”, e.g. “01/09/2023 - 04/09/2023”.

Validations:

  • Must be a String

sort
optional

Parameter to sort trips by. Sorted by updated date in descending order by default.

Validations:

  • Must be one of: description, end_time, paid_at, sent_at, start_time, state, total_cost, updated_at, user_name, vehicle_name.

order
optional

Sort trips by sort param in ascending or descending order. Default: asc.

Validations:

  • Must be one of: asc, desc.

Returns

Code: 200

Description:

OK

Param name Description
total_amount
required

Total amount for trips matching filtering criteria, e.g. “415.90”.

Validations:

  • Must be a String

total_records
required

Total number of trips matching filtering criteria, e.g. “3”.

Validations:

  • Must be a String

collection
required

List of trips.

Validations:

  • Must be an array of any type