· View as Markdown

Experiences

Organizations only. You need an organization account with access to Experiences; other accounts get a 403. If your account does not have Experiences enabled, please contact organizations@ridewithgps.com.

To publish a tour step by step, follow Publish a multi-day tour.

See also: Guide page blocks, Photos, Tasks.

Experiences

Returns a list of experiences

GET /api/v1/experiences.json

Returns a paginated list of the organization's experiences.

Experiences endpoints are only available to organization accounts with access to Experiences.

Supports filtering by name and archived.

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)
  • archived string query
    Filter by archived status
    One of: true, false

Response 200

  • experiences array of objects
    23 fields
    • id integer
    • url string
    • name string
    • description string or null
    • location string
    • starts_on string or null
    • ends_on string or null
    • active boolean
      False hides the experience from the app.
    • archived boolean
    • publish_status string
      updates means the experience changed since the last published package. failed means the last build failed; publish again to retry.
      One of: unpublished, queued, processing, updates, published, failed
    • logo_url string or null
    • cover_url string or null
    • expire_after_days integer or null
      Days a guest keeps access after joining. Null or 0 means access does not expire. Organizations without unlimited experiences can only use 15 or 30.
    • unlimited boolean
      True when guests join with one shared guest code; false when each guest needs a limited code.
    • show_routes boolean
    • reference_id string
    • require_name boolean
      Ask guests for their name when they join.
    • require_email boolean
    • require_phone boolean
    • require_zip_code boolean
    • require_reference_id boolean
    • 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

  • 403 Forbidden - Not an organization account
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/experiences.json
Response 200
{
  "experiences": [
    {
      "id": 123,
      "url": "https://ridewithgps.com/api/v1/experiences/123.json",
      "name": "Oregon Coast tour",
      "description": "Five days along the Oregon coast",
      "location": "Portland, OR",
      "starts_on": "2000-01-01",
      "ends_on": "2000-01-01",
      "active": false,
      "archived": false,
      "publish_status": "unpublished",
      "logo_url": "https://ridewithgps.com/files/logo.jpg",
      "cover_url": "https://ridewithgps.com/files/cover.jpg",
      "expire_after_days": 30,
      "unlimited": false,
      "show_routes": false,
      "reference_id": "TOUR-2000-01",
      "require_name": false,
      "require_email": false,
      "require_phone": false,
      "require_zip_code": false,
      "require_reference_id": 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/experiences.json?page=2"
    }
  }
}

Returns an experience

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

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

Response 200

  • experience object
    27 fields
    • id integer
    • url string
    • name string
    • description string or null
    • location string
    • starts_on string or null
    • ends_on string or null
    • active boolean
      False hides the experience from the app.
    • archived boolean
    • publish_status string
      updates means the experience changed since the last published package. failed means the last build failed; publish again to retry.
      One of: unpublished, queued, processing, updates, published, failed
    • logo_url string or null
    • cover_url string or null
    • expire_after_days integer or null
      Days a guest keeps access after joining. Null or 0 means access does not expire. Organizations without unlimited experiences can only use 15 or 30.
    • unlimited boolean
      True when guests join with one shared guest code; false when each guest needs a limited code.
    • show_routes boolean
    • reference_id string
    • require_name boolean
      Ask guests for their name when they join.
    • require_email boolean
    • require_phone boolean
    • require_zip_code boolean
    • require_reference_id boolean
    • created_at date-time
    • updated_at date-time
    • tags array of strings
    • route_ids array of integers
      Routes in the order guests see them.
    • guest_code string or null
      Active code guests enter in the app to join.
    • guide_code string or null
      Active code for guides; guides never expire.

Errors

  • 404 Another organization's experience
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/experiences/123.json
Response 200
{
  "experience": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123.json",
    "name": "Oregon Coast tour",
    "description": "Five days along the Oregon coast",
    "location": "Portland, OR",
    "starts_on": "2000-01-01",
    "ends_on": "2000-01-01",
    "active": false,
    "archived": false,
    "publish_status": "unpublished",
    "logo_url": "https://ridewithgps.com/files/logo.jpg",
    "cover_url": "https://ridewithgps.com/files/cover.jpg",
    "expire_after_days": 30,
    "unlimited": false,
    "show_routes": false,
    "reference_id": "TOUR-2000-01",
    "require_name": false,
    "require_email": false,
    "require_phone": false,
    "require_zip_code": false,
    "require_reference_id": false,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z",
    "tags": [
      "Tags"
    ],
    "route_ids": [
      1
    ],
    "guest_code": "COAST2000",
    "guide_code": "GUIDE2000"
  }
}

Creates an experience

POST /api/v1/experiences.json

Creates an experience for the organization.

Send source_experience_id to create a copy of one of the organization's experiences, with its routes and guide pages. Other fields sent with it override the copied values.

route_ids sets the experience's routes, in order. Only routes owned by the organization are accepted.

Multipart uploads: To upload a logo or cover image, send multipart/form-data with experience[logo] and experience[cover].

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 application/json

  • experience object required
    21 fields
    • source_experience_id integer
      Create only. Copies this experience and its guide pages. The copy shares the original's routes; no new routes are created.
    • name string
    • description string
    • location string
    • starts_on string
    • ends_on string
    • active boolean
    • archived boolean
    • expire_after_days integer or null
    • unlimited boolean
    • show_routes boolean
    • reference_id string
    • require_name boolean
    • require_email boolean
    • require_phone boolean
    • require_zip_code boolean
    • require_reference_id boolean
    • route_ids array of integers
      Replaces the route list, in this order.
    • tags array of strings
      Replaces the tags.
    • logo file
      Multipart only.
    • cover file
      Multipart only.

Response 201

  • experience object
    27 fields
    • id integer
    • url string
    • name string
    • description string or null
    • location string
    • starts_on string or null
    • ends_on string or null
    • active boolean
      False hides the experience from the app.
    • archived boolean
    • publish_status string
      updates means the experience changed since the last published package. failed means the last build failed; publish again to retry.
      One of: unpublished, queued, processing, updates, published, failed
    • logo_url string or null
    • cover_url string or null
    • expire_after_days integer or null
      Days a guest keeps access after joining. Null or 0 means access does not expire. Organizations without unlimited experiences can only use 15 or 30.
    • unlimited boolean
      True when guests join with one shared guest code; false when each guest needs a limited code.
    • show_routes boolean
    • reference_id string
    • require_name boolean
      Ask guests for their name when they join.
    • require_email boolean
    • require_phone boolean
    • require_zip_code boolean
    • require_reference_id boolean
    • created_at date-time
    • updated_at date-time
    • tags array of strings
    • route_ids array of integers
      Routes in the order guests see them.
    • guest_code string or null
      Active code guests enter in the app to join.
    • guide_code string or null
      Active code for guides; guides never expire.

Errors

  • 404 Source experience not found
  • 422 Validation error
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "experience": {
    "source_experience_id": 123,
    "name": "Oregon Coast tour",
    "description": "Five days along the Oregon coast",
    "location": "Portland, OR",
    "starts_on": "2000-01-01",
    "ends_on": "2000-01-01",
    "active": false,
    "archived": false,
    "expire_after_days": 30,
    "unlimited": false,
    "show_routes": false,
    "reference_id": "TOUR-2000-01",
    "require_name": false,
    "require_email": false,
    "require_phone": false,
    "require_zip_code": false,
    "require_reference_id": false,
    "route_ids": [
      1
    ],
    "tags": [
      "Tags"
    ]
  }
}' \
  https://ridewithgps.com/api/v1/experiences.json
Response 201
{
  "experience": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123.json",
    "name": "Oregon Coast tour",
    "description": "Five days along the Oregon coast",
    "location": "Portland, OR",
    "starts_on": "2000-01-01",
    "ends_on": "2000-01-01",
    "active": false,
    "archived": false,
    "publish_status": "unpublished",
    "logo_url": "https://ridewithgps.com/files/logo.jpg",
    "cover_url": "https://ridewithgps.com/files/cover.jpg",
    "expire_after_days": 30,
    "unlimited": false,
    "show_routes": false,
    "reference_id": "TOUR-2000-01",
    "require_name": false,
    "require_email": false,
    "require_phone": false,
    "require_zip_code": false,
    "require_reference_id": false,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z",
    "tags": [
      "Tags"
    ],
    "route_ids": [
      1
    ],
    "guest_code": "COAST2000",
    "guide_code": "GUIDE2000"
  }
}

Updates an experience

PATCH /api/v1/experiences/{id}.json

Updates an experience. Only the fields sent are changed.

route_ids replaces the whole route list, in the order given. Send an empty array to remove every route. active: false hides the experience from the app; publish a package to make it available again.

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

Request body application/json

  • experience object required
    21 fields
    • source_experience_id integer
      Create only. Copies this experience and its guide pages. The copy shares the original's routes; no new routes are created.
    • name string
    • description string
    • location string
    • starts_on string
    • ends_on string
    • active boolean
    • archived boolean
    • expire_after_days integer or null
    • unlimited boolean
    • show_routes boolean
    • reference_id string
    • require_name boolean
    • require_email boolean
    • require_phone boolean
    • require_zip_code boolean
    • require_reference_id boolean
    • route_ids array of integers
      Replaces the route list, in this order.
    • tags array of strings
      Replaces the tags.
    • logo file
      Multipart only.
    • cover file
      Multipart only.

Response 200

  • experience object
    27 fields
    • id integer
    • url string
    • name string
    • description string or null
    • location string
    • starts_on string or null
    • ends_on string or null
    • active boolean
      False hides the experience from the app.
    • archived boolean
    • publish_status string
      updates means the experience changed since the last published package. failed means the last build failed; publish again to retry.
      One of: unpublished, queued, processing, updates, published, failed
    • logo_url string or null
    • cover_url string or null
    • expire_after_days integer or null
      Days a guest keeps access after joining. Null or 0 means access does not expire. Organizations without unlimited experiences can only use 15 or 30.
    • unlimited boolean
      True when guests join with one shared guest code; false when each guest needs a limited code.
    • show_routes boolean
    • reference_id string
    • require_name boolean
      Ask guests for their name when they join.
    • require_email boolean
    • require_phone boolean
    • require_zip_code boolean
    • require_reference_id boolean
    • created_at date-time
    • updated_at date-time
    • tags array of strings
    • route_ids array of integers
      Routes in the order guests see them.
    • guest_code string or null
      Active code guests enter in the app to join.
    • guide_code string or null
      Active code for guides; guides never expire.

Errors

  • 422 Validation error
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{
  "experience": {
    "source_experience_id": 123,
    "name": "Oregon Coast tour",
    "description": "Five days along the Oregon coast",
    "location": "Portland, OR",
    "starts_on": "2000-01-01",
    "ends_on": "2000-01-01",
    "active": false,
    "archived": false,
    "expire_after_days": 30,
    "unlimited": false,
    "show_routes": false,
    "reference_id": "TOUR-2000-01",
    "require_name": false,
    "require_email": false,
    "require_phone": false,
    "require_zip_code": false,
    "require_reference_id": false,
    "route_ids": [
      1
    ],
    "tags": [
      "Tags"
    ]
  }
}' \
  https://ridewithgps.com/api/v1/experiences/123.json
Response 200
{
  "experience": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123.json",
    "name": "Oregon Coast tour",
    "description": "Five days along the Oregon coast",
    "location": "Portland, OR",
    "starts_on": "2000-01-01",
    "ends_on": "2000-01-01",
    "active": false,
    "archived": false,
    "publish_status": "unpublished",
    "logo_url": "https://ridewithgps.com/files/logo.jpg",
    "cover_url": "https://ridewithgps.com/files/cover.jpg",
    "expire_after_days": 30,
    "unlimited": false,
    "show_routes": false,
    "reference_id": "TOUR-2000-01",
    "require_name": false,
    "require_email": false,
    "require_phone": false,
    "require_zip_code": false,
    "require_reference_id": false,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z",
    "tags": [
      "Tags"
    ],
    "route_ids": [
      1
    ],
    "guest_code": "COAST2000",
    "guide_code": "GUIDE2000"
  }
}

Deletes an experience

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

Deletes an experience. An experience that guests have already joined is hidden instead, so their access history is kept.

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

Response 204

Experience deleted

Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X DELETE \
  https://ridewithgps.com/api/v1/experiences/123.json
Response 204
// Experience deleted

Experience Guide Pages

Returns an experience's guide pages

GET /api/v1/experiences/{experience_id}/guide_pages.json

Returns every guide page of the experience, each top-level page followed by the pages under it.

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

  • experience_id integer path required

Response 200

  • guide_pages array of objects
    12 fields
    • id integer
    • url string
    • experience_id integer
    • parent_id integer or null
      The top-level page this page sits under, or null.
    • position integer
      Place among the pages that share the parent, starting at 1.
    • title string
    • header boolean
      A header page only lists the pages under it and has no blocks.
    • live boolean
      Live pages update in the app without publishing a new package.
    • blocks array of objects
      10 fields
      • type string
        One of: text, photo, route, elevation_profile
      • markdown string
        text blocks.
      • photo_id integer
        photo blocks. A photo owned by the organization; upload one with POST /api/v1/photos.
      • on_tap string
        photo blocks. What tapping the photo does. Defaults to none.
        One of: none, enlarge, open_link
      • link_url string or null
        photo blocks with on_tap: open_link.
      • route_id integer
        route and elevation_profile blocks. A route owned by the organization.
      • url string or null
        Read only. The photo image, for photo blocks.
      • name string
        Read only. The route name shown on a route card.
      • distance number
        Read only. Meters, as shown on a route card.
      • elevation_gain number
        Read only. Meters, as shown on a route card.
    • file object or null
      Present on PDF pages.
      4 fields
      • name string
      • filename string
      • content_type string
      • size integer
    • created_at date-time
    • updated_at date-time

Errors

  • 404 Another organization's experience
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/experiences/123/guide_pages.json
Response 200
{
  "guide_pages": [
    {
      "id": 123,
      "url": "https://ridewithgps.com/api/v1/experiences/123/guide_pages/123.json",
      "experience_id": 123,
      "parent_id": 123,
      "position": 1,
      "title": "Day 1: Portland to Tillamook",
      "header": false,
      "live": false,
      "blocks": [
        {
          "type": "text",
          "markdown": "Welcome to the tour! Today we ride from Portland to the coast.",
          "photo_id": 123,
          "on_tap": "none",
          "link_url": "https://example.com",
          "route_id": 123,
          "url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
          "name": "Forest Park loop",
          "distance": 40237,
          "elevation_gain": 457
        }
      ],
      "file": {
        "name": "day1.pdf",
        "filename": "day1.pdf",
        "content_type": "application/pdf",
        "size": 1093417
      },
      "created_at": "2000-01-01T12:00:00Z",
      "updated_at": "2000-01-01T12:00:00Z"
    }
  ]
}

Returns a guide page

GET /api/v1/experiences/{experience_id}/guide_pages/{id}.json

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

  • experience_id integer path required
  • id integer path required

Response 200

  • guide_page object
    12 fields
    • id integer
    • url string
    • experience_id integer
    • parent_id integer or null
      The top-level page this page sits under, or null.
    • position integer
      Place among the pages that share the parent, starting at 1.
    • title string
    • header boolean
      A header page only lists the pages under it and has no blocks.
    • live boolean
      Live pages update in the app without publishing a new package.
    • blocks array of objects
      10 fields
      • type string
        One of: text, photo, route, elevation_profile
      • markdown string
        text blocks.
      • photo_id integer
        photo blocks. A photo owned by the organization; upload one with POST /api/v1/photos.
      • on_tap string
        photo blocks. What tapping the photo does. Defaults to none.
        One of: none, enlarge, open_link
      • link_url string or null
        photo blocks with on_tap: open_link.
      • route_id integer
        route and elevation_profile blocks. A route owned by the organization.
      • url string or null
        Read only. The photo image, for photo blocks.
      • name string
        Read only. The route name shown on a route card.
      • distance number
        Read only. Meters, as shown on a route card.
      • elevation_gain number
        Read only. Meters, as shown on a route card.
    • file object or null
      Present on PDF pages.
      4 fields
      • name string
      • filename string
      • content_type string
      • size integer
    • created_at date-time
    • updated_at date-time
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/experiences/123/guide_pages/123.json
Response 200
{
  "guide_page": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123/guide_pages/123.json",
    "experience_id": 123,
    "parent_id": 123,
    "position": 1,
    "title": "Day 1: Portland to Tillamook",
    "header": false,
    "live": false,
    "blocks": [
      {
        "type": "text",
        "markdown": "Welcome to the tour! Today we ride from Portland to the coast.",
        "photo_id": 123,
        "on_tap": "none",
        "link_url": "https://example.com",
        "route_id": 123,
        "url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
        "name": "Forest Park loop",
        "distance": 40237,
        "elevation_gain": 457
      }
    ],
    "file": {
      "name": "day1.pdf",
      "filename": "day1.pdf",
      "content_type": "application/pdf",
      "size": 1093417
    },
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Creates a guide page

POST /api/v1/experiences/{experience_id}/guide_pages.json

Adds a guide page to the experience. Without parent_id and position, the page goes last at the top level.

Content is a list of blocks: Markdown text, photos, route cards and elevation profiles. Photos and routes must belong to the organization. See Guide page blocks for every block type and the Markdown text blocks accept.

PDF pages: send multipart/form-data with guide_page[title] and guide_page[file] instead of blocks.

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

  • experience_id integer path required

Request body application/json

  • guide_page object required
    7 fields
    • title string
    • header boolean
      Create only.
    • live boolean
    • parent_id integer or null
      A top-level page of the experience, or null for top level. A page with pages under it stays top level.
    • position integer
      Place among the pages that share the parent, starting at 1. Defaults to last.
    • blocks array of objects
      Replaces the page content.
      10 fields
      • type string required
        One of: text, photo, route, elevation_profile
      • markdown string
        text blocks.
      • photo_id integer
        photo blocks. A photo owned by the organization; upload one with POST /api/v1/photos.
      • on_tap string
        photo blocks. What tapping the photo does. Defaults to none.
        One of: none, enlarge, open_link
      • link_url string or null
        photo blocks with on_tap: open_link.
      • route_id integer
        route and elevation_profile blocks. A route owned by the organization.
      • url string or null
        Read only. The photo image, for photo blocks.
      • name string
        Read only. The route name shown on a route card.
      • distance number
        Read only. Meters, as shown on a route card.
      • elevation_gain number
        Read only. Meters, as shown on a route card.
    • file file
      Create only, multipart. A PDF, sent instead of blocks.

Response 201

  • guide_page object
    12 fields
    • id integer
    • url string
    • experience_id integer
    • parent_id integer or null
      The top-level page this page sits under, or null.
    • position integer
      Place among the pages that share the parent, starting at 1.
    • title string
    • header boolean
      A header page only lists the pages under it and has no blocks.
    • live boolean
      Live pages update in the app without publishing a new package.
    • blocks array of objects
      10 fields
      • type string
        One of: text, photo, route, elevation_profile
      • markdown string
        text blocks.
      • photo_id integer
        photo blocks. A photo owned by the organization; upload one with POST /api/v1/photos.
      • on_tap string
        photo blocks. What tapping the photo does. Defaults to none.
        One of: none, enlarge, open_link
      • link_url string or null
        photo blocks with on_tap: open_link.
      • route_id integer
        route and elevation_profile blocks. A route owned by the organization.
      • url string or null
        Read only. The photo image, for photo blocks.
      • name string
        Read only. The route name shown on a route card.
      • distance number
        Read only. Meters, as shown on a route card.
      • elevation_gain number
        Read only. Meters, as shown on a route card.
    • file object or null
      Present on PDF pages.
      4 fields
      • name string
      • filename string
      • content_type string
      • size integer
    • created_at date-time
    • updated_at date-time

Errors

  • 422 Invalid blocks
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "guide_page": {
    "title": "Day 1: Portland to Tillamook",
    "header": false,
    "live": false,
    "parent_id": 123,
    "position": 1,
    "blocks": [
      {
        "type": "text",
        "markdown": "Welcome to the tour! Today we ride from Portland to the coast.",
        "photo_id": 123,
        "on_tap": "none",
        "link_url": "https://example.com",
        "route_id": 123,
        "url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
        "name": "Forest Park loop",
        "distance": 40237,
        "elevation_gain": 457
      }
    ]
  }
}' \
  https://ridewithgps.com/api/v1/experiences/123/guide_pages.json
Response 201
{
  "guide_page": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123/guide_pages/123.json",
    "experience_id": 123,
    "parent_id": 123,
    "position": 1,
    "title": "Day 1: Portland to Tillamook",
    "header": false,
    "live": false,
    "blocks": [
      {
        "type": "text",
        "markdown": "Welcome to the tour! Today we ride from Portland to the coast.",
        "photo_id": 123,
        "on_tap": "none",
        "link_url": "https://example.com",
        "route_id": 123,
        "url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
        "name": "Forest Park loop",
        "distance": 40237,
        "elevation_gain": 457
      }
    ],
    "file": {
      "name": "day1.pdf",
      "filename": "day1.pdf",
      "content_type": "application/pdf",
      "size": 1093417
    },
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Updates a guide page

PATCH /api/v1/experiences/{experience_id}/guide_pages/{id}.json

Updates a guide page. Only the fields sent are changed. blocks replaces the whole content. See Guide page blocks.

Send parent_id and/or position to move the page; the other pages are renumbered.

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

  • experience_id integer path required
  • id integer path required

Request body application/json

  • guide_page object required
    7 fields
    • title string
    • header boolean
      Create only.
    • live boolean
    • parent_id integer or null
      A top-level page of the experience, or null for top level. A page with pages under it stays top level.
    • position integer
      Place among the pages that share the parent, starting at 1. Defaults to last.
    • blocks array of objects
      Replaces the page content.
      10 fields
      • type string required
        One of: text, photo, route, elevation_profile
      • markdown string
        text blocks.
      • photo_id integer
        photo blocks. A photo owned by the organization; upload one with POST /api/v1/photos.
      • on_tap string
        photo blocks. What tapping the photo does. Defaults to none.
        One of: none, enlarge, open_link
      • link_url string or null
        photo blocks with on_tap: open_link.
      • route_id integer
        route and elevation_profile blocks. A route owned by the organization.
      • url string or null
        Read only. The photo image, for photo blocks.
      • name string
        Read only. The route name shown on a route card.
      • distance number
        Read only. Meters, as shown on a route card.
      • elevation_gain number
        Read only. Meters, as shown on a route card.
    • file file
      Create only, multipart. A PDF, sent instead of blocks.

Response 200

  • guide_page object
    12 fields
    • id integer
    • url string
    • experience_id integer
    • parent_id integer or null
      The top-level page this page sits under, or null.
    • position integer
      Place among the pages that share the parent, starting at 1.
    • title string
    • header boolean
      A header page only lists the pages under it and has no blocks.
    • live boolean
      Live pages update in the app without publishing a new package.
    • blocks array of objects
      10 fields
      • type string
        One of: text, photo, route, elevation_profile
      • markdown string
        text blocks.
      • photo_id integer
        photo blocks. A photo owned by the organization; upload one with POST /api/v1/photos.
      • on_tap string
        photo blocks. What tapping the photo does. Defaults to none.
        One of: none, enlarge, open_link
      • link_url string or null
        photo blocks with on_tap: open_link.
      • route_id integer
        route and elevation_profile blocks. A route owned by the organization.
      • url string or null
        Read only. The photo image, for photo blocks.
      • name string
        Read only. The route name shown on a route card.
      • distance number
        Read only. Meters, as shown on a route card.
      • elevation_gain number
        Read only. Meters, as shown on a route card.
    • file object or null
      Present on PDF pages.
      4 fields
      • name string
      • filename string
      • content_type string
      • size integer
    • created_at date-time
    • updated_at date-time

Errors

  • 422 Invalid move
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{
  "guide_page": {
    "title": "Day 1: Portland to Tillamook",
    "header": false,
    "live": false,
    "parent_id": 123,
    "position": 1,
    "blocks": [
      {
        "type": "text",
        "markdown": "Welcome to the tour! Today we ride from Portland to the coast.",
        "photo_id": 123,
        "on_tap": "none",
        "link_url": "https://example.com",
        "route_id": 123,
        "url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
        "name": "Forest Park loop",
        "distance": 40237,
        "elevation_gain": 457
      }
    ]
  }
}' \
  https://ridewithgps.com/api/v1/experiences/123/guide_pages/123.json
Response 200
{
  "guide_page": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123/guide_pages/123.json",
    "experience_id": 123,
    "parent_id": 123,
    "position": 1,
    "title": "Day 1: Portland to Tillamook",
    "header": false,
    "live": false,
    "blocks": [
      {
        "type": "text",
        "markdown": "Welcome to the tour! Today we ride from Portland to the coast.",
        "photo_id": 123,
        "on_tap": "none",
        "link_url": "https://example.com",
        "route_id": 123,
        "url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
        "name": "Forest Park loop",
        "distance": 40237,
        "elevation_gain": 457
      }
    ],
    "file": {
      "name": "day1.pdf",
      "filename": "day1.pdf",
      "content_type": "application/pdf",
      "size": 1093417
    },
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Deletes a guide page

DELETE /api/v1/experiences/{experience_id}/guide_pages/{id}.json

Deletes a guide page. Deleting a header also deletes the pages under it.

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

  • experience_id integer path required
  • id integer path required

Response 204

Guide page deleted

Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X DELETE \
  https://ridewithgps.com/api/v1/experiences/123/guide_pages/123.json
Response 204
// Guide page deleted

Experience Packages

Returns an experience's packages

GET /api/v1/experiences/{experience_id}/packages.json

Returns the packages built for the experience, newest first. Guests download the newest package.

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

  • experience_id integer path required
  • page integer query
    Page number for pagination
  • page_size integer query
    Number of items per page (20-200)

Response 200

  • packages array of objects
    7 fields
    • id integer
    • url string
    • experience_id integer
    • status string
      failed means the last build of the experience failed; the task of the publish request reports it too.
      One of: queued, processing, ready, failed
    • file_size integer or null
      Bytes, once the package is ready.
    • 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)
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/experiences/123/packages.json
Response 200
{
  "packages": [
    {
      "id": 123,
      "url": "https://ridewithgps.com/api/v1/experiences/123/packages/123.json",
      "experience_id": 123,
      "status": "queued",
      "file_size": 26381512,
      "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/experiences/123/packages.json?page=2"
    }
  }
}

Returns a package

GET /api/v1/experiences/{experience_id}/packages/{id}.json

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

  • experience_id integer path required
  • id integer path required

Response 200

  • package object
    7 fields
    • id integer
    • url string
    • experience_id integer
    • status string
      failed means the last build of the experience failed; the task of the publish request reports it too.
      One of: queued, processing, ready, failed
    • file_size integer or null
      Bytes, once the package is ready.
    • created_at date-time
    • updated_at date-time

Errors

  • 404 Another experience's package
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/experiences/123/packages/123.json
Response 200
{
  "package": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123/packages/123.json",
    "experience_id": 123,
    "status": "queued",
    "file_size": 26381512,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Publishes an experience

POST /api/v1/experiences/{experience_id}/packages.json

Makes the experience available to guests and builds a new package with its current routes and guide pages. The build runs in the background.

Returns a task. Poll the task URL, also given in the Location header, until its status is completed. A finished build lists the package in items; a failed one reports a build_failed error. Refused with a 409 while a build is queued or running, or when nothing changed since the last build.

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

  • experience_id integer path required

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

  • 409 A build is already running
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X POST \
  https://ridewithgps.com/api/v1/experiences/123/packages.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"
      }
    ]
  }
}

Experience Codes

Returns an experience's codes

GET /api/v1/experiences/{experience_id}/codes.json

Returns every code of the experience, active or not, newest first.

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

  • experience_id integer path required

Response 200

  • codes array of objects
    9 fields
    • id integer
    • url string
    • code string
      What guests enter in the app. Letters and digits, upper case.
    • kind string
      guest: the shared code of an unlimited experience. guide: for guides, whose access never expires. limited: a code with an access_limit, for experiences whose unlimited is false.
      One of: guest, guide, limited
    • active boolean
    • access_limit integer or null
      How many guests can join with a limited code.
    • times_used integer
    • created_at date-time
    • updated_at date-time
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/experiences/123/codes.json
Response 200
{
  "codes": [
    {
      "id": 123,
      "url": "https://ridewithgps.com/api/v1/experiences/123/codes/123.json",
      "code": "COAST2000",
      "kind": "guest",
      "active": false,
      "access_limit": 20,
      "times_used": 3,
      "created_at": "2000-01-01T12:00:00Z",
      "updated_at": "2000-01-01T12:00:00Z"
    }
  ]
}

Returns a code

GET /api/v1/experiences/{experience_id}/codes/{id}.json

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

  • experience_id integer path required
  • id integer path required

Response 200

  • code object
    9 fields
    • id integer
    • url string
    • code string
      What guests enter in the app. Letters and digits, upper case.
    • kind string
      guest: the shared code of an unlimited experience. guide: for guides, whose access never expires. limited: a code with an access_limit, for experiences whose unlimited is false.
      One of: guest, guide, limited
    • active boolean
    • access_limit integer or null
      How many guests can join with a limited code.
    • times_used integer
    • created_at date-time
    • updated_at date-time

Errors

  • 404 Another experience's code
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/experiences/123/codes/123.json
Response 200
{
  "code": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123/codes/123.json",
    "code": "COAST2000",
    "kind": "guest",
    "active": false,
    "access_limit": 20,
    "times_used": 3,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Creates a code

POST /api/v1/experiences/{experience_id}/codes.json

Creates a code guests enter in the app to join the experience. Omit code to get a random one.

A new guest or guide code replaces the active code of the same kind: guests who already joined keep their access, and the old code stops working. A replaced code nobody used is deleted.

guest codes are for experiences whose unlimited is true. limited codes are for experiences whose unlimited is false; they add to the existing ones and need an access_limit. guide codes need the guide shortcut in the organization's plan.

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

  • experience_id integer path required

Request body application/json

  • code object required
    3 fields
    • kind string required
      One of: guest, guide, limited
    • code string
      4 to 20 letters or digits. Stored upper case.
    • access_limit integer
      limited codes only.

Response 201

  • code object
    9 fields
    • id integer
    • url string
    • code string
      What guests enter in the app. Letters and digits, upper case.
    • kind string
      guest: the shared code of an unlimited experience. guide: for guides, whose access never expires. limited: a code with an access_limit, for experiences whose unlimited is false.
      One of: guest, guide, limited
    • active boolean
    • access_limit integer or null
      How many guests can join with a limited code.
    • times_used integer
    • created_at date-time
    • updated_at date-time

Errors

  • 422 Invalid code
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "code": {
    "kind": "guest",
    "code": "SMITH2000",
    "access_limit": 20
  }
}' \
  https://ridewithgps.com/api/v1/experiences/123/codes.json
Response 201
{
  "code": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123/codes/123.json",
    "code": "COAST2000",
    "kind": "guest",
    "active": false,
    "access_limit": 20,
    "times_used": 3,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Updates a code

PATCH /api/v1/experiences/{experience_id}/codes/{id}.json

Turns a code on or off, or changes the access_limit of a limited code. The limit cannot go below the times the code was used.

Turning a guest or guide code back on makes it the experience's code of that kind again. The active guest code cannot be turned off, and neither can the active guide code when the plan includes the guide shortcut: create a new code to replace it.

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

  • experience_id integer path required
  • id integer path required

Request body application/json

  • code object required
    2 fields
    • active boolean
    • access_limit integer

Response 200

  • code object
    9 fields
    • id integer
    • url string
    • code string
      What guests enter in the app. Letters and digits, upper case.
    • kind string
      guest: the shared code of an unlimited experience. guide: for guides, whose access never expires. limited: a code with an access_limit, for experiences whose unlimited is false.
      One of: guest, guide, limited
    • active boolean
    • access_limit integer or null
      How many guests can join with a limited code.
    • times_used integer
    • created_at date-time
    • updated_at date-time

Errors

  • 422 Invalid change
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{
  "code": {
    "active": false,
    "access_limit": 20
  }
}' \
  https://ridewithgps.com/api/v1/experiences/123/codes/123.json
Response 200
{
  "code": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123/codes/123.json",
    "code": "COAST2000",
    "kind": "guest",
    "active": false,
    "access_limit": 20,
    "times_used": 3,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Experience Guests

Returns an experience's guests

GET /api/v1/experiences/{experience_id}/guests.json

Returns the guests who joined the experience with a code and downloaded it, newest first.

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

  • experience_id integer path required
  • page integer query
    Page number for pagination
  • page_size integer query
    Number of items per page (20-200)

Response 200

  • guests array of objects
    11 fields
    • id integer
    • url string
    • code string
      The code the guest joined with.
    • code_kind string
      One of: guest, guide, limited
    • details object
      What the guest entered when the experience asks for it (require_name, require_email, ...).
      5 fields
      • name string
      • email string
      • phone string
      • zip_code string
      • reference_id string
    • can_email boolean
      The guest agreed to be emailed.
    • download_count integer
    • expires_at date-time or null
      When access ends. Null means it does not expire.
    • removed_by_guest boolean
      The guest removed the experience from the app. Entering the code again brings it back.
    • joined_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)
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/experiences/123/guests.json
Response 200
{
  "guests": [
    {
      "id": 123,
      "url": "https://ridewithgps.com/api/v1/experiences/123/guests/123.json",
      "code": "COAST2000",
      "code_kind": "guest",
      "details": {
        "name": "Alex Rider",
        "email": "alex@example.com",
        "phone": "+1 503 555 0100",
        "zip_code": "97209",
        "reference_id": "BOOKING-1234"
      },
      "can_email": false,
      "download_count": 1,
      "expires_at": "2000-01-01T12:00:00Z",
      "removed_by_guest": false,
      "joined_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/experiences/123/guests.json?page=2"
    }
  }
}

Returns a guest

GET /api/v1/experiences/{experience_id}/guests/{id}.json

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

  • experience_id integer path required
  • id integer path required

Response 200

  • guest object
    11 fields
    • id integer
    • url string
    • code string
      The code the guest joined with.
    • code_kind string
      One of: guest, guide, limited
    • details object
      What the guest entered when the experience asks for it (require_name, require_email, ...).
      5 fields
      • name string
      • email string
      • phone string
      • zip_code string
      • reference_id string
    • can_email boolean
      The guest agreed to be emailed.
    • download_count integer
    • expires_at date-time or null
      When access ends. Null means it does not expire.
    • removed_by_guest boolean
      The guest removed the experience from the app. Entering the code again brings it back.
    • joined_at date-time
    • updated_at date-time

Errors

  • 404 Another experience's guest
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/experiences/123/guests/123.json
Response 200
{
  "guest": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123/guests/123.json",
    "code": "COAST2000",
    "code_kind": "guest",
    "details": {
      "name": "Alex Rider",
      "email": "alex@example.com",
      "phone": "+1 503 555 0100",
      "zip_code": "97209",
      "reference_id": "BOOKING-1234"
    },
    "can_email": false,
    "download_count": 1,
    "expires_at": "2000-01-01T12:00:00Z",
    "removed_by_guest": false,
    "joined_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Updates a guest's access

PATCH /api/v1/experiences/{experience_id}/guests/{id}.json

Sets when the guest loses access. Send a past time to end access now, or null so it never expires. Unless the organization has unlimited expiry, the time can be at most expire_after_days days from now, and null is refused when the experience sets expire_after_days.

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

  • experience_id integer path required
  • id integer path required

Request body application/json

  • guest object required
    1 field
    • expires_at date-time or null

Response 200

  • guest object
    11 fields
    • id integer
    • url string
    • code string
      The code the guest joined with.
    • code_kind string
      One of: guest, guide, limited
    • details object
      What the guest entered when the experience asks for it (require_name, require_email, ...).
      5 fields
      • name string
      • email string
      • phone string
      • zip_code string
      • reference_id string
    • can_email boolean
      The guest agreed to be emailed.
    • download_count integer
    • expires_at date-time or null
      When access ends. Null means it does not expire.
    • removed_by_guest boolean
      The guest removed the experience from the app. Entering the code again brings it back.
    • joined_at date-time
    • updated_at date-time

Errors

  • 422 Unreadable time
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{
  "guest": {
    "expires_at": "2000-01-01T12:00:00Z"
  }
}' \
  https://ridewithgps.com/api/v1/experiences/123/guests/123.json
Response 200
{
  "guest": {
    "id": 123,
    "url": "https://ridewithgps.com/api/v1/experiences/123/guests/123.json",
    "code": "COAST2000",
    "code_kind": "guest",
    "details": {
      "name": "Alex Rider",
      "email": "alex@example.com",
      "phone": "+1 503 555 0100",
      "zip_code": "97209",
      "reference_id": "BOOKING-1234"
    },
    "can_email": false,
    "download_count": 1,
    "expires_at": "2000-01-01T12:00:00Z",
    "removed_by_guest": false,
    "joined_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Experience Messages

Returns an experience's messages

GET /api/v1/experiences/{experience_id}/messages.json

Returns the messages sent to the guests of the experience, newest first. Requires messaging for the organization.

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

  • experience_id integer path required
  • page integer query
    Page number for pagination
  • page_size integer query
    Number of items per page (20-200)

Response 200

  • messages array of objects
    4 fields
    • id integer
    • content string
    • 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

  • 403 Messaging is not enabled for the organization
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/experiences/123/messages.json
Response 200
{
  "messages": [
    {
      "id": 123,
      "content": "Meet in the hotel lobby at 8:00 for the day 2 briefing.",
      "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/experiences/123/messages.json?page=2"
    }
  }
}

Sends a message

POST /api/v1/experiences/{experience_id}/messages.json

Sends a message to the experience's guests. Guests get a push notification and find the message in the app.

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

  • experience_id integer path required

Request body application/json

  • message object required
    1 field
    • content string required

Response 201

  • message object
    4 fields
    • id integer
    • content string
    • created_at date-time
    • updated_at date-time

Errors

  • 422 Empty message
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "message": {
    "content": "Rain tomorrow: we start at 10:00 instead of 8:30."
  }
}' \
  https://ridewithgps.com/api/v1/experiences/123/messages.json
Response 201
{
  "message": {
    "id": 123,
    "content": "Meet in the hotel lobby at 8:00 for the day 2 briefing.",
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}