Skip to main content
PATCH
Update trip
If google_start_place_id or google_end_place_id change and no distance is provided, the driving distance is recomputed automatically and distance_source becomes COMPUTED. Providing an explicit distance always takes precedence and sets distance_source to MANUAL. Changing the place IDs to an incomplete pair without providing a distance returns a 400.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json.

Path Parameters

businessId
string<uuid>
required

The UUID of the business.

tripId
string<uuid>
required

The UUID of the trip.

Body

application/json

All fields are optional. Only provided fields will be updated. If google_start_place_id or google_end_place_id change and no distance is provided, the driving distance is recomputed automatically; changing them to an incomplete pair without a distance returns a 400.

vehicle_id
string<uuid>

The UUID of the vehicle used for this trip.

external_id
string | null

An optional external identifier for the trip.

distance
string

The distance traveled in miles, as a decimal string. Providing a distance always takes precedence and marks the trip distance as MANUAL.

trip_date
string<date>

The date of the trip (YYYY-MM-DD).

purpose
enum<string>

The purpose classification of the trip.

Available options:
UNREVIEWED,
BUSINESS,
PERSONAL
Example:

"BUSINESS"

start_address
string | null

The starting address of the trip.

end_address
string | null

The ending address of the trip.

google_start_place_id
string | null

Google Maps place ID of the trip start address, from the address suggestion endpoints.

google_end_place_id
string | null

Google Maps place ID of the trip end address, from the address suggestion endpoints.

start_latitude
string | null

Latitude of the start address, as a decimal string.

start_longitude
string | null

Longitude of the start address, as a decimal string.

end_latitude
string | null

Latitude of the end address, as a decimal string.

end_longitude
string | null

Longitude of the end address, as a decimal string.

description
string | null

An optional description or notes about the trip.

Response

The updated trip.

data
object
required