radarlabs / react-native-radar

React Native module for Radar, the leading geofencing and location tracking platform
https://radar.com
Apache License 2.0
170 stars 32 forks source link

Create new trip from API?? #154

Closed janogarciardz closed 1 year ago

janogarciardz commented 3 years ago

Create new trip from API??

rstims commented 2 years ago

Create new trip from API??

@janogarciardz I was informed the following call will "upsert" a trip.

curl --location --request PATCH 'https://api-staging.radar.io/v1/trips/12345' \
--header "Authorization: apikey" \
--header 'Content-Type: application/json' \
--data-raw '{
    "mode": "car",
    "status": "pending",
    "destinationGeofenceTag": "tag",
    "destinationGeofenceExternalId": "12345"
}'
brettguenther commented 1 year ago

thanks @rstims - we have an updated POST endpoint to create a trip (also used in new SDK versions). Documentation here: https://radar.com/documentation/api#create-a-new-trip