Skip to main content

Sending statistics

This page describes how to send statistics data from navigation to api.

Route details#

  • Url: https://velo-europe.de/api/{lang}/proxy/{userRiddenTrackId}/statistics
  • Method: POST
  • Authentication required

Path params#

  • userRiddenTrackId - integer - required

Request body object#

  • points - array of navigation data objects - required
  • timeStarted - required - yyyy-MM-dd'T'HH:mm:ss.SSSZZZ
  • routeStatus - integer - required
    • by default you should send 0 (pending)
    • if you want to finish this track ride you can send 1, but then all the data you send in the request body will be ignored.
  • stageId - integer - reuired - stage id from listed stages endpoint or current stage field from route object
  • totalTime - integer - reuired - seconds
  • totalTimeWithoutPauses - integer - reuired - seconds
  • totalAscent - integer - reuired - meters
  • totalDescent - integer - reuired - meters

Example request body#

{
"points" : [
{
"spd" : 11,
"lat" : 37.3304337,
"alt" : 15,
"lon" : -122.0301625,
"dst": 200
},
{
"spd" : 18,
"lat" : 37.3304337,
"alt" : 15,
"lon" : -122.0301625,
"dst" : 300
}
],
"timeStarted" : "2020-11-16T10:30:00.000+02:00" ,
"routeStatus": 0,
"stageId": 161,
"totalTime": 100,
"totalTimeWithoutPauses": 100,
"totalAscent": 15,
"totalDescent": 25
}

Example request#

curl --location --request POST 'https://velo-europe.de/api/de/proxy/425/statistics' \
--header 'accept: application/json' \
--header 'authorization: Bearer ZDQ5OTc2NjI4YzA2NThiMjY5NjE3Zjg3OTc4Y2RjNTg0NjUzYTU2NDAwMDI2ZDdlMDNlMzk2Y2Q0YjA1NjYwZQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"points" : [
{
"spd" : 11,
"lat" : 37.3304337,
"alt" : 15,
"lon" : -122.0301625,
"dst": 200
},
{
"spd" : 18,
"lat" : 37.3304337,
"alt" : 15,
"lon" : -122.0301625,
"dst" : 300
}
],
"timeStarted" : "2020-11-16T10:30:00.000+02:00" ,
"routeStatus": 0,
"stageId": 161,
"totalTime": 100,
"totalTimeWithoutPauses": 100,
"totalAscent": 15,
"totalDescent": 25
}'

Response body#

{
"success": true
}