Skip to content

Instantly share code, notes, and snippets.

@agraebe
Created September 27, 2019 23:12
Show Gist options
  • Save agraebe/424b48a8a7d72f7a19741cf6ce9bcb62 to your computer and use it in GitHub Desktop.
Save agraebe/424b48a8a7d72f7a19741cf6ce9bcb62 to your computer and use it in GitHub Desktop.
Create a trip with geofences
payload='{
"device_id": "<YOUR_DEVICE_ID>",
"geofences": [{
"geometry": {
"type": "Point",
"coordinates": [-121.3980960195712, 38.7930386903944]
},
"metadata": {
"stop_id": "12345XYZ",
"stop_name": "SF office"
}
}]
}'
curl -X POST \
-u <YOUR_ACCOUNT_ID>:<YOUR_SECRET_KEY> \
https://v3.api.hypertrack.com/trips/ \
-H 'Content-Type: application/json' \
-d $payload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment