Skip to main content
PATCH
/
v0
/
business
/
{business_id}
/
trips
/
{trip_id}
Update a trip
curl --request PATCH \
  --url https://api.sandbox.getasset.com/v0/business/{business_id}/trips/{trip_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "vehicle_id": "<string>",
  "external_id": "<string>",
  "trip_date": "2023-12-25",
  "distance": 1,
  "start_address": "<string>",
  "end_address": "<string>",
  "notes": "<string>"
}
'
{
  "data": {
    "business_id": "<string>",
    "vehicle_id": "<string>",
    "trip_date": "2023-12-25",
    "distance": 123,
    "start_address": "123 Main St, San Francisco, CA",
    "end_address": "456 Market St, San Francisco, CA",
    "id": "<string>",
    "external_id": "1234567890",
    "notes": "Client lunch meeting",
    "purpose": "personal",
    "amount": 7.25,
    "amount_reason": "Standard rate applied"
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

business_id
string<biz_string>
required
trip_id
string<trp_string>
required

Body

application/json
vehicle_id
string<vhc_string> | null

The id of the Vehicle used for the trip

external_id
string | null

The external ID of the Trip

Maximum string length: 255
trip_date
string<date> | null

The date the trip occurred

distance

The distance travelled, in units defined by distance_unit

Required range: x > 0
distance_unit
enum<string> | null

The unit of measurement for distance

Available options:
miles,
kilometers
purpose
enum<string> | null

Whether the trip was for business or personal use

Available options:
business,
personal
start_address
string | null

Where the trip started (unstructured)

Maximum string length: 500
end_address
string | null

Where the trip ended (unstructured)

Maximum string length: 500
notes
string | null

Free-form notes about the trip from the user

Maximum string length: 1000

Response

Successful Response

data
TripPublic · object
required