Posting GPS locations

Post a GPS location

HTTP Request

POST https://prod-api.spatula.io/v2/graph/role/vehicles/VEHICLE_ID/points?access_token=AUTH_TOKEN

URL component

Description

VEHICLE_ID

The vehicle's id

Field

Description

location location

The vehicle's location

speed double

The vehicle's speed in km/h

heading double

The vehicle's heading in degrees

reported integer

The time the data was reported as a unix millisecond timestamp

POST request body

[
{
"location": {
"lat": 36.1811,
"lon": -120.28288
},
"speed": 70.0,
"heading": 238.23,
"reported": 1484554018000
}
]

Example

shell
curl -X POST -d '[{"location": {"lat": 36.1811,"lon": -120.28288},"speed": 70.0,"heading": 238.23,"reported": 1484554018000}]' "https://prod-api.spatula.io/v2/graph/role/vehicles/VEHICLE_ID/points?access_token=AUTH_TOKEN"