Query with Metadata
The metadata parameter can be used in the Get users/geofence/trips API to query on top of the metadata field.
Example :
1
curl --location --request GET 'https://api.roam.ai/v1/api/user/?start_date=2021-12-15&end_date=2021-12-20&metadata=name:nokia,external_id:bcy573b892' \
2
--header 'Api-key: xxxxxxxxxxx' \
3
--data-raw ''
Copied!
You can query the trips and users via the API and use metadata values as filters to get the respective results.
You need to make sure the external_id or metadata values are not duplicated since this might end up in multiple results. So that's something that needs to be handled from your side.
get
/v1/api
/user
Get user list

Sample Request

1
curl --location --request GET 'https://api.roam.ai/v1/api/user/?start_date=2021-12-27&end_date=2021-12-29&metadata=name:new_test,external_id:02' \
2
--header 'Api-key: xxxxxxxxx'
Copied!
get
/v1/api
/trips
Get Trip list

Sample Request

1
curl --location --request GET 'https://api.roam.ai/v1/api/trips/?metadata=delivery:fast_delivery,order_id:63g773832&start_date=2021-12-20&end_date=2021-12-21' \
2
--header 'Api-Key: xxxxxxxxxxxxxx'
Copied!
get
/v1/api
/geofence
Get Geofence list

Sample Request

1
curl --location --request GET 'https://api.roam.ai/v1/api/geofence/?start_date=2021-12-27&end_date=2021-12-29&metadata=name:type_1,id:01' \
2
--header 'Api-Key: xxxxxxxxxxxxxx'
Copied!