# social.passports.amtrak.ride

> Published by [passports.social](https://lexicon.garden/identity/did:plc:ssdgllkzfwekkpmu7expw6cv)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ssdgllkzfwekkpmu7expw6cv/social.passports.amtrak.ride)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ssdgllkzfwekkpmu7expw6cv/social.passports.amtrak.ride/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ssdgllkzfwekkpmu7expw6cv/social.passports.amtrak.ride/examples)

## Definitions

### `social.passports.amtrak.ride`

**Type**: `record`

One Amtrak ride: the route or routes it counts for, the stations, and when. Every ride has a record, whether it was added by hand or came from a Travel leg (then travelLeg links to that leg's record and the stations and date are copied here), so the rail map can be rebuilt from these records alone.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `accommodation` | `string` | No |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `destination` | `ref` → `#station` | No | Where the ride ended. |
| `note` | `string` | No | The rider's note about this ride. |
| `origin` | `ref` → `#station` | No | Where the ride started. |
| `rideDate` | `string` | No | Date of the ride in YYYY-MM-DD format. Left out when the rider hides dates. |
| `routes` | `array` | No | The routes the ride counts for. Usually one; a ride on shared track counts for each route on it (New York to Washington on the Northeast Corridor counts for the Cardinal, Crescent, Silver Meteor and Palmetto). Absent while a ride between two stations could be several routes and the rider hasn't said which. |
| `status` | `string` | No | ridden: the train ran and was taken. canceled: Amtrak canceled it, so the stretch counts as a freebie. busBridge: a bus ran in place of the train. |
| `substituteLeg` | `string` (at-uri) | No | For a canceled ride or a bus bridge: the social.passports.travel.leg record of what the rider took instead, when it's published. |
| `trainNumber` | `string` | No | The train number, e.g. '48'. |
| `travelLeg` | `string` (at-uri) | No | The social.passports.travel.leg record this ride came from. A plain at-uri, not a strongRef: the leg is edited in place at the same address, and a pinned CID would be out of date after the first edit. |

### `social.passports.amtrak.ride#station`

**Type**: `object`

An Amtrak station.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string` | Yes | Amtrak's station code, e.g. 'GSC'. |
| `name` | `string` | No | The station's name, e.g. 'Glenwood Springs'. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "One Amtrak ride: the route or routes it counts for, the stations, and when. Every ride has a record, whether it was added by hand or came from a Travel leg (then travelLeg links to that leg's record and the stations and date are copied here), so the rail map can be rebuilt from these records alone.",
      "key": "tid",
      "record": {
        "properties": {
          "accommodation": {
            "knownValues": [
              "Coach",
              "Business",
              "Roomette",
              "Bedroom",
              "Family Bedroom"
            ],
            "maxLength": 30,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "destination": {
            "description": "Where the ride ended.",
            "ref": "#station",
            "type": "ref"
          },
          "note": {
            "description": "The rider's note about this ride.",
            "maxLength": 3000,
            "type": "string"
          },
          "origin": {
            "description": "Where the ride started.",
            "ref": "#station",
            "type": "ref"
          },
          "rideDate": {
            "description": "Date of the ride in YYYY-MM-DD format. Left out when the rider hides dates.",
            "maxLength": 10,
            "type": "string"
          },
          "routes": {
            "description": "The routes the ride counts for. Usually one; a ride on shared track counts for each route on it (New York to Washington on the Northeast Corridor counts for the Cardinal, Crescent, Silver Meteor and Palmetto). Absent while a ride between two stations could be several routes and the rider hasn't said which.",
            "items": {
              "knownValues": [
                "coast_starlight",
                "empire_builder",
                "california_zephyr",
                "southwest_chief",
                "sunset_limited",
                "texas_eagle",
                "city_of_new_orleans",
                "lake_shore_limited",
                "floridian",
                "cardinal",
                "crescent",
                "silver_meteor",
                "palmetto"
              ],
              "maxLength": 50,
              "type": "string"
            },
            "maxLength": 13,
            "type": "array"
          },
          "status": {
            "description": "ridden: the train ran and was taken. canceled: Amtrak canceled it, so the stretch counts as a freebie. busBridge: a bus ran in place of the train.",
            "knownValues": [
              "ridden",
              "canceled",
              "busBridge"
            ],
            "maxLength": 20,
            "type": "string"
          },
          "substituteLeg": {
            "description": "For a canceled ride or a bus bridge: the social.passports.travel.leg record of what the rider took instead, when it's published.",
            "format": "at-uri",
            "type": "string"
          },
          "trainNumber": {
            "description": "The train number, e.g. '48'.",
            "maxLength": 20,
            "type": "string"
          },
          "travelLeg": {
            "description": "The social.passports.travel.leg record this ride came from. A plain at-uri, not a strongRef: the leg is edited in place at the same address, and a pinned CID would be out of date after the first edit.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "station": {
      "description": "An Amtrak station.",
      "properties": {
        "code": {
          "description": "Amtrak's station code, e.g. 'GSC'.",
          "maxLength": 8,
          "type": "string"
        },
        "name": {
          "description": "The station's name, e.g. 'Glenwood Springs'.",
          "maxLength": 100,
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "type": "object"
    }
  },
  "id": "social.passports.amtrak.ride",
  "lexicon": 1
}
```
