Get the total cost, mileage cost, and additional passengers cost of the trip in cents, based on vehilcle_id, entries’ distance and number_of_people.

Examples

[
  {
    "vehicle_id": 1,
    "date": "2021-05-26",
    "entries": [
      {
        "number_of_people": "Jim, Pam",
        "distance": "12.5"
      },
      {
        "number_of_people": "1",
        "distance": "12"
      }
    ],
  }
] 

Params

Param name Description
vehicle_id
required

Mileage vehicle (from user/company mileage vehicle categories)

Validations:

  • Must be a Integer

date
required

Trip date, e.g. “2021-05-26”

Validations:

  • Must be a String

entries
required

An array with the specific entry attributes (number_of_people, distance) to pass to calculator. At least one item should be present in array

Validations:

  • Must be an Array of nested elements

entries[number_of_people]
required

Either a number, e.g. “2” or a comma-separated list of passengers, e.g. “Brian Kernigan,Dennis Ritchie,Ken Thompson”

Validations:

  • Must be a String

entries[distance]
required

Trip distance in kilometers

Validations:

  • Must be a Integer

Returns

Code: 200

Description:

Trip costs break down in cents

Param name Description
mileage
required

Mileage cost of the trip.

Validations:

  • Must be a Integer

additional_passengers
required

Additional passengers cost of the trip.

Validations:

  • Must be a Integer

total_including_tax
required

Total cost of the trip, including tax.

Validations:

  • Must be a Integer

tax
required

Total tax.

Validations:

  • Must be a Integer

total_to_reimburse
required

Total cost of the trip excluding tax.

Validations:

  • Must be a Integer

total
required

Total cost of the trip. The same value as in total_including_tax.

Validations:

  • Must be a Integer

emissions
required

CO₂ emissions estimate (in kg CO₂e).

Validations:

  • Must be a Float