Update Trip API
Explore how to update a trip with our Trip API
Update Trip
PUT
https://api.roam.ai/v2/trips/:id
Updates the metadata, description and name of a trip. Details of existing stop locations like metadata, description, name and address can be updated except geometry_radius and geometry by passing stop location id. To add new stop location, add new stop location item to array without id. To remove the existing stop location, remove the entire item in the array which will remove the stop location only if it is not entered/existed by the assigned user.
You cannot update the user once the trip is started.
Path Parameters
id*
String
Updates the trip with the given ID.
Headers
Authorization*
String
Bearer <API-KEY>
Request Body
user_id
String
The user for which the trip is being tracked.
description
String
Description of the trip. By default the id is shown if the description is not set.
name
String
Name of the trip. By default the id is shown if the name is not set.
metadata
Dictionary
Set of key-value pairs that you can attach to the trip. This can be useful for storing additional information about the trip in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
stops
Array
For the trips with stop locations, add an array of stop locations.
stops.metadata
Dictionary
Set of key-value pairs that you can attach to the stop location. This can be useful for storing additional information about the stop location in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
stops.name
String
Name of the stop location. By default the id is shown if the name is not set.
stops.description
String
Description of the stop location. By default the id is shown if the description is not set.
stops.address
String
Address of the stop location.
stops.geometry_radius
Number
The radius in meters.
stops.geometry
Point
Location coordinates in GeoJSON format.
Example
Last updated