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 |
---|---|
total required |
Total cost of the trip Validations:
|
mileage required |
Mileage cost of the trip Validations:
|
additional_passengers required |
Additional passengers cost of the trip Validations:
|