Trip Creation Old
From EveryTrail API Developer Documentation
Contents |
Version 2
There are 3 steps to creating a trip.
Create a basic trip
- username (username of the user creating the account)
- password
- title
- description
- time (yyyy-mm-dd hh:mm:ss)
- activity (String. you can see the list on everytrail.com. They are case sensitive. If the activity exists, we will link it to that activity. You can also give them an "other" option, where they enter a string)
- activity_id (see Activity List. Don't include or use 0 if no activity. If you want to specify an activity not on the list, put it in the "activity" parameter).
- gps_device_id (see GpsDevice List
- is_private 0/1 (1 means private)
You will receive an XML response in this format: <trip>###</trip>, where ### is the new trip_id
adding/updating the GPS information (tracks and waypoints)
You do this by sending an HTTP Post request to http://www.everytrail.com/api/trip/updategpx with the following parameters:
- trip_id
- gpx (binary data)
You will receive an XML response in this format:<status>1</status> if successful, or <errror>#</error> if there was a problem.
Completing the trip
The trip will not be listed (or marked as finished) until you make this call to http://www.everytrail.com/api/trip/complete with the following parameter:
- trip_id
Version 1
You create a trip by sending an HTTP post request to http://www.everytrail.com/api/trips.php with the following variables:
- username (username of the user creating the account)
- password
- gpx (binary data)
- title
- desc
- tags (separated by commas)
- time (yyyy-mm-dd hh:mm:ss)
- activity (you can see the list on everytrail.com. They are case sensitive. If the activity exists, we will link it to that activity. You can also give them an "other" option, where they enter a string)
- activity_id (see Activity List. Don't include or use 0 if no activity. If you want to specify an activity not on the list, put it in the "activity" parameter).
- gps_device_id (see GpsDevice List
- is_private 0/1 (1 means private)
If the trip creation is successful, you will receive the following response body <trip>###</trip>, where ### is the new trip_id You will receive a 401 if the username/password combo is incorrect
