· View as Markdown

Routes

A route is a planned track. Upload a GPX, TCX, KML or FIT file to create routes: the upload runs in the background and returns a task.

See also: Routes and trips, Track points, Points of interest.

Returns a list of routes

GET /api/v1/routes.json

Returns a paginated list of routes for the authenticated user.

Supports filtering by name, visibility, distance_min, distance_max, elevation_gain_min, elevation_gain_max and archived status.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • page integer query
    Page number for pagination
  • page_size integer query
    Number of items per page (20-200)
  • name string query
    Filter by name (partial match)
  • visibility string query
    Filter by visibility
    One of: public, followers_only, mutual_followers_only, private
  • distance_min integer query
    Minimum distance in meters
  • distance_max integer query
    Maximum distance in meters
  • elevation_gain_min integer query
    Minimum elevation gain in meters
  • elevation_gain_max integer query
    Maximum elevation gain in meters
  • archived string query
    Filter by archived status
    One of: true, false

Response 200

  • routes array of objects
    29 fields
    • id integer
    • user_id integer
    • url string
    • html_url string
    • visibility string
    • name string
    • description string or null
    • locality string or null
    • administrative_area string or null
    • country_code string or null
    • distance number
      Distance in meters
    • elevation_gain number
      Elevation gain in meters
    • elevation_loss number
      Elevation loss in meters
    • first_lat number
    • first_lng number
    • last_lat number
    • last_lng number
    • sw_lat number
      Southwest bounding box latitude
    • sw_lng number
      Southwest bounding box longitude
    • ne_lat number
      Northeast bounding box latitude
    • ne_lng number
      Northeast bounding box longitude
    • track_type string or null
    • terrain string or null
    • difficulty string or null
    • unpaved_pct number or null
    • surface string or null
    • archived boolean or null
      null for non owned routes
    • created_at date-time
    • updated_at date-time
  • meta object
    1 field
    • pagination object
      4 fields
      • record_count integer
        Total number of records
      • page_count integer
        Total number of pages
      • page_size integer
        Number of records per page
      • next_page_url string or null
        URL for the next page (null if last page)

Errors

  • 401 Unauthorized
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/routes.json
Response 200
{
  "routes": [
    {
      "id": 123,
      "user_id": 123,
      "url": "https://ridewithgps.com/api/v1/routes/123.json",
      "html_url": "https://ridewithgps.com/routes/123",
      "visibility": "public",
      "name": "Forest Park loop",
      "description": "Morning ride through Forest Park",
      "locality": "Portland",
      "administrative_area": "OR",
      "country_code": "US",
      "distance": 40237,
      "elevation_gain": 457,
      "elevation_loss": 461,
      "first_lat": 45.521529,
      "first_lng": -122.691804,
      "last_lat": 45.521529,
      "last_lng": -122.691804,
      "sw_lat": 45.432536,
      "sw_lng": -122.836749,
      "ne_lat": 45.652881,
      "ne_lng": -122.471777,
      "track_type": "loop",
      "terrain": "rolling",
      "difficulty": "moderate",
      "unpaved_pct": 12,
      "surface": "mostly_paved",
      "archived": false,
      "created_at": "2000-01-01T12:00:00Z",
      "updated_at": "2000-01-01T12:00:00Z"
    }
  ],
  "meta": {
    "pagination": {
      "record_count": 45,
      "page_count": 3,
      "page_size": 20,
      "next_page_url": "https://ridewithgps.com/api/v1/routes.json?page=2"
    }
  }
}

Returns the specified route

GET /api/v1/routes/{id}.json

Returns detailed information about a specific route

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • id integer path required
    Route ID
  • privacy_code string query
    Privacy code for the non public asset

Response 200

  • route object
    36 fields
    • id integer
    • user_id integer
    • url string
    • html_url string
    • visibility string
    • name string
    • description string or null
    • locality string or null
    • administrative_area string or null
    • country_code string or null
    • distance number
      Distance in meters
    • elevation_gain number
      Elevation gain in meters
    • elevation_loss number
      Elevation loss in meters
    • first_lat number
    • first_lng number
    • last_lat number
    • last_lng number
    • sw_lat number
      Southwest bounding box latitude
    • sw_lng number
      Southwest bounding box longitude
    • ne_lat number
      Northeast bounding box latitude
    • ne_lng number
      Northeast bounding box longitude
    • track_type string or null
    • terrain string or null
    • difficulty string or null
    • unpaved_pct number or null
    • surface string or null
    • archived boolean or null
      null for non owned routes
    • created_at date-time
    • updated_at date-time
    • tags array of strings
      Tags. Only present on club-owned routes.
    • activity_types array of strings
      Activity types for this route. See Activity Types reference.
      One of: cycling:generic, cycling:road, cycling:gravel, cycling:mountain, cycling:commute, walking:generic, walking:hiking, running:generic, driving:generic, motorcycling:generic, swimming:generic, snow:generic
    • track_points array of objects
      6 fields
      • x number
        Longitude
      • y number
        Latitude
      • d number
        Distance from start in meters
      • e number
        Elevation in meters
      • S integer
        Surface type
      • R integer
        Highway tag
    • course_points array of objects
      7 fields
      • x number
        Longitude
      • y number
        Latitude
      • d number
        Distance from start in meters
      • i integer
        Cue track index
      • t string
        Type of cue
      • n string
        Cue text
      • _e boolean
        User edited cue
    • points_of_interest array of objects
      12 fields
      • id integer
      • user_id integer
      • type string
      • type_id integer
      • type_name string
      • name string
      • description string or null
      • url string
      • lat number
      • lng number
      • distances array of numbers
        Distances from start in meters for waypoints
      • tag_names array of strings
    • photos array of objects
      12 fields
      • id integer
      • url string
      • highlighted boolean
      • caption string or null
      • lat number or null
      • lng number or null
      • elevation integer or null
      • location string or null
      • locality string or null
      • administrative_area string or null
      • country_code string or null
      • created_at date-time
    • collections array of objects
      10 fields
      • id integer
      • user_id integer
      • url string
      • html_url string
      • visibility string
      • name string or null
      • description string or null
      • cover string or null
      • created_at date-time
      • updated_at date-time

Errors

  • 401 Unauthorized
  • 403 Forbidden - Route not visible to user
  • 404 not Found - Route not found
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/routes/123.json
Response 200
{
  "route": {
    "id": 123,
    "user_id": 123,
    "url": "https://ridewithgps.com/api/v1/routes/123.json",
    "html_url": "https://ridewithgps.com/routes/123",
    "visibility": "public",
    "name": "Forest Park loop",
    "description": "Morning ride through Forest Park",
    "locality": "Portland",
    "administrative_area": "OR",
    "country_code": "US",
    "distance": 40237,
    "elevation_gain": 457,
    "elevation_loss": 461,
    "first_lat": 45.521529,
    "first_lng": -122.691804,
    "last_lat": 45.521529,
    "last_lng": -122.691804,
    "sw_lat": 45.432536,
    "sw_lng": -122.836749,
    "ne_lat": 45.652881,
    "ne_lng": -122.471777,
    "track_type": "loop",
    "terrain": "rolling",
    "difficulty": "moderate",
    "unpaved_pct": 12,
    "surface": "mostly_paved",
    "archived": false,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z",
    "tags": [
      "Tags"
    ],
    "activity_types": [
      "cycling:generic"
    ],
    "track_points": [
      {
        "x": -122.691804,
        "y": 45.521529,
        "d": 12487.3,
        "e": 153.6,
        "S": 1,
        "R": 1
      }
    ],
    "course_points": [
      {
        "x": -122.691804,
        "y": 45.521529,
        "d": 12487.3,
        "i": 412,
        "t": "Right",
        "n": "Turn right onto NW Thurman St",
        "_e": false
      }
    ],
    "points_of_interest": [
      {
        "id": 123,
        "user_id": 123,
        "type": "coffee",
        "type_id": 123,
        "type_name": "Coffee",
        "name": "Coffee stop",
        "description": "Good espresso before the climb",
        "url": "https://ridewithgps.com/api/v1/points_of_interest/123.json",
        "lat": 45.521529,
        "lng": -122.691804,
        "distances": [
          12487.3
        ],
        "tag_names": [
          "Tag names"
        ]
      }
    ],
    "photos": [
      {
        "id": 123,
        "url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
        "highlighted": false,
        "caption": "View from Pittock Mansion",
        "lat": 45.521529,
        "lng": -122.691804,
        "elevation": 290,
        "location": "Pittock Mansion",
        "locality": "Portland",
        "administrative_area": "OR",
        "country_code": "US",
        "created_at": "2000-01-01T12:00:00Z"
      }
    ],
    "collections": [
      {
        "id": 123,
        "user_id": 123,
        "url": "https://ridewithgps.com/api/v1/collections/123.json",
        "html_url": "https://ridewithgps.com/collections/123",
        "visibility": "public",
        "name": "Portland favorites",
        "description": "Our best rides around Portland",
        "cover": null,
        "created_at": "2000-01-01T12:00:00Z",
        "updated_at": "2000-01-01T12:00:00Z"
      }
    ]
  }
}

Returns the polyline for the specified route

GET /api/v1/routes/{id}/polyline.json

Returns a simplified polyline of the route geometry, suitable for displaying on a map. The data field is a Google Encoded Polyline.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • id integer path required
    Route ID
  • privacy_code string query
    Privacy code for the non public asset

Response 200

  • polyline object
    3 fields
    • parent_type string
      Type of parent object (route or trip)
    • parent_id integer
      ID of the parent object
    • data string or null
      Google Encoded Polyline (precision 5, [latitude, longitude] order); simplified geometry.

Errors

  • 401 Unauthorized
  • 403 Forbidden - Route not visible to user
  • 404 Not Found - Route not found
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/routes/123/polyline.json
Response 200
{
  "polyline": {
    "parent_type": "route",
    "parent_id": 123,
    "data": "en`sFbhlaSiAoDlCaBa@mAWi@sBwC"
  }
}

Downloads the specified route as a GPS file

GET /api/v1/routes/{id}.{format}

Returns the route as a GPS file, ready to load on a GPS device or into another application. The extension picks the format:

Extension Content type File
gpx application/gpx+xml GPX 1.1 track at full resolution, without waypoints
tcx application/tcx+xml TCX course with the route cues as course points
fit application/vnd.ant.fit FIT course with the route cues as course points
kml application/vnd.google-earth.kml+xml Google Earth track

For users whose subscription includes device navigation, the TCX and FIT cues are placed 30 meters ahead of the turn so the device warns before it. For other users the cues sit on the turn itself.

The file is sent as an attachment with a filename derived from the route name. Visibility rules are the same as for the JSON record: a non public route needs a privacy_code unless it belongs to the authenticated user.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • id integer path required
    Route ID
  • format string path required
    File format
    One of: gpx, tcx, fit, kml
  • privacy_code string query
    Privacy code for the non public asset

Response 200

GPS file

Errors

  • 401 Unauthorized
  • 403 Forbidden - Route not visible to user
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/routes/123.gpx
Response 200
// GPS file

Uploads a file to create routes

POST /api/v1/routes.json

Creates one or more routes from an uploaded GPS file. Accepted formats are GPX, TCX, KML and FIT.

Multipart uploads: This endpoint accepts only Content-Type: multipart/form-data. Send the following fields: - file - GPS file (binary), required - name - Name for the created route, otherwise taken from the file - description - Description for the created route

Processing happens in the background. The response is a task with status: "pending", and its Location header points at the task. Poll that url until status becomes completed, then read the items array for the routes that were created and the errors array for anything that failed.

Route visibility always follows the account's default privacy setting for routes and cannot be set through this endpoint.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Request body multipart/form-data

  • file file required
    GPS file
  • name string
    Name for the created route, otherwise taken from the file
  • description string
    Description for the created route

Response 202

  • task object
    9 fields
    • id integer
    • user_id integer
    • url string
      API url of the task, to poll until it completes
    • type string
      What kind of work the task performs. gps_file_upload for uploads, experience_package for experience packages
    • status string
      pending until the task has run, then completed
    • created_at date-time
    • updated_at date-time
    • items array of objects
      Assets created by the task. Empty while pending, and empty if nothing was created. A file holding several tracks creates one asset per track
      3 fields
      • item_type string
        Type of the created asset: route or trip for uploads, experience_package for experience packages
      • item_id integer
      • item_url string or null
        API url of the created asset
    • errors array of objects
      Anything that went wrong, one entry per track that could not be imported. Empty when the task succeeded entirely
      5 fields
      • code string
        Machine readable reason. One of duplicate, time_data_missing, no_tracks, empty_file, parse_failed, failed_to_process, weigh_in_failed, build_failed, error
      • message string
        Human readable description, always in English
      • item_type string or null
        Set when the error refers to an existing asset, as for a duplicate
      • item_id integer or null
      • item_url string or null

Errors

  • 400 No file provided
  • 401 Unauthorized
  • 422 Empty file or invalid parameter
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X POST \
  -F file=@route.gpx \
  -F name="Forest Park loop" \
  -F description="Morning ride through Forest Park" \
  https://ridewithgps.com/api/v1/routes.json
Response 202
{
  "task": {
    "id": 123,
    "user_id": 123,
    "url": "https://ridewithgps.com/api/v1/tasks/123.json",
    "type": "gps_file_upload",
    "status": "completed",
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z",
    "items": [
      {
        "item_type": "route",
        "item_id": 123,
        "item_url": "https://ridewithgps.com/api/v1/routes/123.json"
      }
    ],
    "errors": [
      {
        "code": "duplicate",
        "message": "This route already exists",
        "item_type": "route",
        "item_id": 123,
        "item_url": "https://ridewithgps.com/api/v1/routes/123.json"
      }
    ]
  }
}

Copies the specified route into your routes

POST /api/v1/routes/{id}/copy.json

Copies a route the authenticated user can see into their own routes, with its track, course points and points of interest. Organizations can turn copying off for their routes.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • id integer path required
    Route ID
  • privacy_code string query
    Privacy code for the non public asset

Request body application/json

  • route object
    2 fields
    • name string
      Defaults to the original name.
    • visibility string
      Defaults to private, or managers_only for an organization. User-owned: public, followers_only, mutual_followers_only or private. Organization-owned: public, members_only or managers_only. See Visibilities.

Response 201

  • route object
    29 fields
    • id integer
    • user_id integer
    • url string
    • html_url string
    • visibility string
    • name string
    • description string or null
    • locality string or null
    • administrative_area string or null
    • country_code string or null
    • distance number
      Distance in meters
    • elevation_gain number
      Elevation gain in meters
    • elevation_loss number
      Elevation loss in meters
    • first_lat number
    • first_lng number
    • last_lat number
    • last_lng number
    • sw_lat number
      Southwest bounding box latitude
    • sw_lng number
      Southwest bounding box longitude
    • ne_lat number
      Northeast bounding box latitude
    • ne_lng number
      Northeast bounding box longitude
    • track_type string or null
    • terrain string or null
    • difficulty string or null
    • unpaved_pct number or null
    • surface string or null
    • archived boolean or null
      null for non owned routes
    • created_at date-time
    • updated_at date-time

Errors

  • 400 Malformed body: route is not an object
  • 401 Unauthorized
  • 403 Forbidden - Route not visible to user, or its organization turned copying off
  • 404 Not Found - Route not found
  • 422 Invalid value
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "route": {
    "name": "Forest Park loop",
    "visibility": "private"
  }
}' \
  https://ridewithgps.com/api/v1/routes/123/copy.json
Response 201
{
  "route": {
    "id": 123,
    "user_id": 123,
    "url": "https://ridewithgps.com/api/v1/routes/123.json",
    "html_url": "https://ridewithgps.com/routes/123",
    "visibility": "public",
    "name": "Forest Park loop",
    "description": "Morning ride through Forest Park",
    "locality": "Portland",
    "administrative_area": "OR",
    "country_code": "US",
    "distance": 40237,
    "elevation_gain": 457,
    "elevation_loss": 461,
    "first_lat": 45.521529,
    "first_lng": -122.691804,
    "last_lat": 45.521529,
    "last_lng": -122.691804,
    "sw_lat": 45.432536,
    "sw_lng": -122.836749,
    "ne_lat": 45.652881,
    "ne_lng": -122.471777,
    "track_type": "loop",
    "terrain": "rolling",
    "difficulty": "moderate",
    "unpaved_pct": 12,
    "surface": "mostly_paved",
    "archived": false,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Updates the specified route

PUT /api/v1/routes/{id}.json

Updates details of a route owned by the authenticated user. Only the fields sent are changed. The track cannot be changed.

Any invalid value returns a 422 and nothing is saved. Values of the wrong type, such as an object for name, may be ignored.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • id integer path required
    Route ID

Request body application/json

  • route object required
    5 fields
    • name string or null
      null or empty resets the name to its default.
    • description string or null
      At most 16,000 characters.
    • visibility string
      User-owned: public, followers_only, mutual_followers_only or private. Organization-owned: public, members_only or managers_only. See Visibilities.
    • activity_types array of strings
      Replaces the current activity types. An empty array clears them. See Activity Types.
      One of: cycling:generic, cycling:road, cycling:gravel, cycling:mountain, cycling:commute, walking:generic, walking:hiking, running:generic, driving:generic, motorcycling:generic, swimming:generic, snow:generic
    • archived boolean
      Archives or unarchives the route.

Response 200

  • route object
    36 fields
    • id integer
    • user_id integer
    • url string
    • html_url string
    • visibility string
    • name string
    • description string or null
    • locality string or null
    • administrative_area string or null
    • country_code string or null
    • distance number
      Distance in meters
    • elevation_gain number
      Elevation gain in meters
    • elevation_loss number
      Elevation loss in meters
    • first_lat number
    • first_lng number
    • last_lat number
    • last_lng number
    • sw_lat number
      Southwest bounding box latitude
    • sw_lng number
      Southwest bounding box longitude
    • ne_lat number
      Northeast bounding box latitude
    • ne_lng number
      Northeast bounding box longitude
    • track_type string or null
    • terrain string or null
    • difficulty string or null
    • unpaved_pct number or null
    • surface string or null
    • archived boolean or null
      null for non owned routes
    • created_at date-time
    • updated_at date-time
    • tags array of strings
      Tags. Only present on club-owned routes.
    • activity_types array of strings
      Activity types for this route. See Activity Types reference.
      One of: cycling:generic, cycling:road, cycling:gravel, cycling:mountain, cycling:commute, walking:generic, walking:hiking, running:generic, driving:generic, motorcycling:generic, swimming:generic, snow:generic
    • track_points array of objects
      6 fields
      • x number
        Longitude
      • y number
        Latitude
      • d number
        Distance from start in meters
      • e number
        Elevation in meters
      • S integer
        Surface type
      • R integer
        Highway tag
    • course_points array of objects
      7 fields
      • x number
        Longitude
      • y number
        Latitude
      • d number
        Distance from start in meters
      • i integer
        Cue track index
      • t string
        Type of cue
      • n string
        Cue text
      • _e boolean
        User edited cue
    • points_of_interest array of objects
      12 fields
      • id integer
      • user_id integer
      • type string
      • type_id integer
      • type_name string
      • name string
      • description string or null
      • url string
      • lat number
      • lng number
      • distances array of numbers
        Distances from start in meters for waypoints
      • tag_names array of strings
    • photos array of objects
      12 fields
      • id integer
      • url string
      • highlighted boolean
      • caption string or null
      • lat number or null
      • lng number or null
      • elevation integer or null
      • location string or null
      • locality string or null
      • administrative_area string or null
      • country_code string or null
      • created_at date-time
    • collections array of objects
      10 fields
      • id integer
      • user_id integer
      • url string
      • html_url string
      • visibility string
      • name string or null
      • description string or null
      • cover string or null
      • created_at date-time
      • updated_at date-time

Errors

  • 400 Empty body
  • 401 Unauthorized
  • 403 Forbidden - cannot update route owned by another user
  • 404 Route not found
  • 422 Invalid value
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d '{
  "route": {
    "name": "Forest Park loop",
    "description": "Morning ride through Forest Park",
    "visibility": "public",
    "activity_types": [
      "cycling:generic"
    ],
    "archived": false
  }
}' \
  https://ridewithgps.com/api/v1/routes/123.json
Response 200
{
  "route": {
    "id": 123,
    "user_id": 123,
    "url": "https://ridewithgps.com/api/v1/routes/123.json",
    "html_url": "https://ridewithgps.com/routes/123",
    "visibility": "public",
    "name": "Forest Park loop",
    "description": "Morning ride through Forest Park",
    "locality": "Portland",
    "administrative_area": "OR",
    "country_code": "US",
    "distance": 40237,
    "elevation_gain": 457,
    "elevation_loss": 461,
    "first_lat": 45.521529,
    "first_lng": -122.691804,
    "last_lat": 45.521529,
    "last_lng": -122.691804,
    "sw_lat": 45.432536,
    "sw_lng": -122.836749,
    "ne_lat": 45.652881,
    "ne_lng": -122.471777,
    "track_type": "loop",
    "terrain": "rolling",
    "difficulty": "moderate",
    "unpaved_pct": 12,
    "surface": "mostly_paved",
    "archived": false,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z",
    "tags": [
      "Tags"
    ],
    "activity_types": [
      "cycling:generic"
    ],
    "track_points": [
      {
        "x": -122.691804,
        "y": 45.521529,
        "d": 12487.3,
        "e": 153.6,
        "S": 1,
        "R": 1
      }
    ],
    "course_points": [
      {
        "x": -122.691804,
        "y": 45.521529,
        "d": 12487.3,
        "i": 412,
        "t": "Right",
        "n": "Turn right onto NW Thurman St",
        "_e": false
      }
    ],
    "points_of_interest": [
      {
        "id": 123,
        "user_id": 123,
        "type": "coffee",
        "type_id": 123,
        "type_name": "Coffee",
        "name": "Coffee stop",
        "description": "Good espresso before the climb",
        "url": "https://ridewithgps.com/api/v1/points_of_interest/123.json",
        "lat": 45.521529,
        "lng": -122.691804,
        "distances": [
          12487.3
        ],
        "tag_names": [
          "Tag names"
        ]
      }
    ],
    "photos": [
      {
        "id": 123,
        "url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
        "highlighted": false,
        "caption": "View from Pittock Mansion",
        "lat": 45.521529,
        "lng": -122.691804,
        "elevation": 290,
        "location": "Pittock Mansion",
        "locality": "Portland",
        "administrative_area": "OR",
        "country_code": "US",
        "created_at": "2000-01-01T12:00:00Z"
      }
    ],
    "collections": [
      {
        "id": 123,
        "user_id": 123,
        "url": "https://ridewithgps.com/api/v1/collections/123.json",
        "html_url": "https://ridewithgps.com/collections/123",
        "visibility": "public",
        "name": "Portland favorites",
        "description": "Our best rides around Portland",
        "cover": null,
        "created_at": "2000-01-01T12:00:00Z",
        "updated_at": "2000-01-01T12:00:00Z"
      }
    ]
  }
}

Deletes the specified route

DELETE /api/v1/routes/{id}.json

Deletes a route owned by the authenticated user

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • id integer path required
    Route ID

Response 204

Route deleted successfully

Errors

  • 401 Unauthorized
  • 403 Forbidden - cannot delete route owned by another user
  • 404 Route not found
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X DELETE \
  https://ridewithgps.com/api/v1/routes/123.json
Response 204
// Route deleted successfully