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.
[ { "vehicle_id": 1, "date": "2021-05-26", "entries": [ { "number_of_people": "Jim, Pam", "distance": "12.5" }, { "number_of_people": "1", "distance": "12" } ], } ]
Param name | Description |
---|---|
vehicle_id
required |
Mileage vehicle (from user/company mileage vehicle categories) Validations:
|
date
required |
Trip date, e.g. “2021-05-26” Validations:
|
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:
|
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:
|
entries[distance]
required |
Trip distance in kilometers Validations:
|
Trip costs break down in cents
Param name | Description |
---|---|
mileage
required |
Mileage cost of the trip. Validations:
|
additional_passengers
required |
Additional passengers cost of the trip. Validations:
|
total_including_tax
required |
Total cost of the trip, including tax. Validations:
|
tax
required |
Total tax. Validations:
|
total_to_reimburse
required |
Total cost of the trip excluding tax. Validations:
|
total
required |
Total cost of the trip. The same value as in Validations:
|
emissions
required |
CO₂ emissions estimate (in kg CO₂e). Validations:
|