FlyerTalk Forums - View Single Post - Amtrak removes real time seat availability information
Old Dec 24, 2023 | 7:28 am
  #6  
boswash52
10 Countries Visited
20 Countries Visited
30 Countries Visited
10 Years on Site
 
Join Date: Nov 2012
Posts: 27
The percent full indication used to be the capacitySold key in the JSON returned by the booking selection web page and stored in the searchresults session storage.
It was buried under journeySolutionOptions.journeyLegs[].journeyLegOptions[].seatCapacityInfo.capacitySold.
I had noticed that it was undefined a few weeks ago but didn't stop to think about it.

But that key was always weird because the seatCapacityInfo object also includes availableInventory and criticalCapacity, and was the rounded quotient of those two values (except sometimes criticalCapacity is zero for some fare types but usually it's non-zero for at least one fare type within a given class). So if you're willing to poke through the JSON data (whether by hand or by automation), this information is still available by dividing two numbers. Or maybe the actual number of available seats is more interesting, though of course consists vary in length.

Of course, I can't speak to reliability. Pricing seems to have gotten more complicated lately and the understanding I had of the simple "bucket" model appears to be incomplete.

Here's the seatCapacityInfo from the JSON for Train 160 from New York to Boston on Christmas Day, the 9am departure:

Code:
"seatCapacityInfo": {
              "seatCapacityTravelClasses": [
                {
                  "travelClass": "Coach",
                  "criticalCapacity": 0,
                  "availableInventory": 34,
                  "baseRbdCode": "Y",
                  "trainNumber": "160"
                },
                {
                  "travelClass": "Coach",
                  "criticalCapacity": 0,
                  "availableInventory": 34,
                  "baseRbdCode": "Y",
                  "trainNumber": "160"
                },
                {
                  "travelClass": "Business",
                  "criticalCapacity": 0,
                  "availableInventory": 17,
                  "baseRbdCode": "JY",
                  "trainNumber": "160"
                },
                {
                  "travelClass": "Coach",
                  "criticalCapacity": 360,
                  "availableInventory": 160,
                  "baseRbdCode": "Y",
                  "trainNumber": "160"
                },
                {
                  "travelClass": "Business",
                  "criticalCapacity": 61,
                  "availableInventory": 33,
                  "baseRbdCode": "JY",
                  "trainNumber": "160"
                }
              ]
And here's the whole JSON for train 160:
Code:
              {
                "accommodationFare": {
                  "dollarsAmount": {
                    "accommodation": "0.00",
                    "rail": "178.00",
                    "total": "178.00"
                  },
                  "pricingUnit": "DOLLARS"
                },
                "isAdditionalProduct": false,
                "travelLegAccommodations": [
                  {
                    "additionalProducts": [],
                    "passengers": [
                      {
                        "passengerFare": {
                          "dollarsAmount": {
                            "accommodation": "0.00",
                            "rail": "178.00",
                            "total": "178.00"
                          },
                          "pricingUnit": "DOLLARS"
                        },
                        "id": "P1",
                        "initialType": "F",
                        "isDiscounted": false,
                        "isModified": false,
                        "type": "F",
                        "ageGroup": "adult"
                      }
                    ],
                    "reservableProduct": {
                      "availableInventory": 34,
                      "code": "1027",
                      "count": 1,
                      "lowAvailabilityThreshold": 4,
                      "lowestAvailabilityThreshold": null,
                      "maxAllowedCount": 1,
                      "name": "Coach Seat",
                      "rbd": "YB",
                      "rbdType": "Coach",
                      "isSelectedRoom": false,
                      "capacity": 1,
                      "seatAssignRBD": false
                    },
                    "travelLegFare": {
                      "dollarsAmount": {
                        "accommodation": "0.00",
                        "rail": "178.00",
                        "total": "178.00"
                      },
                      "farePlan": "YBFD",
                      "pricingUnit": "DOLLARS"
                    },
                    "travelLegId": "10e59077_2023-12-25T09:00:00",
                    "isUnaccompaniedChild": false
                  }
                ],
                "category": "RG",
                "travelClass": "Coach",
                "fareFamily": "FLX",
                "isThroughfare": false,
                "saleIndicator": false,
                "isMixedClass": false
              },
              {
                "accommodationFare": {
                  "dollarsAmount": {
                    "accommodation": "61.00",
                    "rail": "178.00",
                    "total": "239.00"
                  },
                  "pricingUnit": "DOLLARS"
                },
                "isAdditionalProduct": false,
                "travelLegAccommodations": [
                  {
                    "additionalProducts": [],
                    "passengers": [
                      {
                        "passengerFare": {
                          "dollarsAmount": {
                            "accommodation": "61.00",
                            "rail": "178.00",
                            "total": "239.00"
                          },
                          "pricingUnit": "DOLLARS"
                        },
                        "id": "P1",
                        "initialType": "F",
                        "isDiscounted": false,
                        "isModified": false,
                        "type": "F",
                        "ageGroup": "adult"
                      }
                    ],
                    "reservableProduct": {
                      "availableInventory": 17,
                      "code": "1023",
                      "count": 1,
                      "lowAvailabilityThreshold": 4,
                      "lowestAvailabilityThreshold": null,
                      "maxAllowedCount": 1,
                      "name": "Business Class Seat",
                      "rbd": "JB",
                      "rbdType": "Business",
                      "isSelectedRoom": false,
                      "capacity": 1,
                      "seatAssignRBD": true
                    },
                    "travelLegFare": {
                      "dollarsAmount": {
                        "accommodation": "61.00",
                        "rail": "178.00",
                        "total": "239.00"
                      },
                      "farePlan": "YBFD",
                      "pricingUnit": "DOLLARS"
                    },
                    "travelLegId": "10e59077_2023-12-25T09:00:00",
                    "isUnaccompaniedChild": false
                  }
                ],
                "category": "RG",
                "travelClass": "Business",
                "fareFamily": "NA",
                "isThroughfare": false,
                "saleIndicator": false,
                "isMixedClass": false
              }
            ],
            "nonReservableAccommodations": [
              {
                "category": "RG",
                "travelClass": "Coach",
                "fareFamily": "COR",
                "isThroughfare": false,
                "saleIndicator": false,
                "message": "NOT AVAILABLE",
                "reason": "NOT AVAILABLE",
                "isBorderCross": false
              },
              {
                "category": "RG",
                "travelClass": "Coach",
                "fareFamily": "SAL",
                "isThroughfare": false,
                "saleIndicator": false,
                "message": "NOT AVAILABLE",
                "reason": "NOT AVAILABLE",
                "isBorderCross": false
              }
            ],
            "travelLegs": [
              {
                "destination": {
                  "schedule": {
                    "arrivalDateTime": "2023-12-25T13:35:00"
                  },
                  "code": "BOS",
                  "name": "Boston, MA"
                },
                "origin": {
                  "schedule": {
                    "departureDateTime": "2023-12-25T09:00:00"
                  },
                  "code": "NYP",
                  "name": "New York, NY"
                },
                "travelService": {
                  "amenities": [
                    {
                      "code": "S",
                      "name": "Cafe"
                    },
                    {
                      "code": "Q",
                      "name": "Quiet Car"
                    },
                    {
                      "code": "N",
                      "name": "Free WiFi"
                    },
                    {
                      "code": "A",
                      "name": "Seat Selection"
                    }
                  ],
                  "carrier": "AMTRAK",
                  "name": "Northeast Regional",
                  "number": "160",
                  "type": "TRAIN",
                  "isAcela": false
                },
                "elapsedTime": "P0DT4H35M",
                "id": "10e59077_2023-12-25T09:00:00",
                "isBorderCross": false,
                "isCancelled": false,
                "isRestricted": false,
                "salesOverrideFlag": false,
                "numberOfStops": 0,
                "isSelfTransfer": false,
                "elapsedSeconds": 16500
              }
            ],
            "isCoachSelected": false,
            "isBusinessSelected": false,
            "isSleeperSelected": false,
            "isFirstSelected": false,
            "hasUpperAndLowerBearths": false,
            "addedToCart": false,
            "selectedIndex": null,
            "selectedTravelClass": "",
            "totalPrice": 0,
            "totalPoints": 0,
            "passriderPolicies": [],
            "citySegments": [
              "NYP",
              "BOS"
            ],
            "isOvernight": false,
            "first": {
              "name": "First",
              "lowestPrice": null,
              "lowestPriceIndex": null,
              "lowestPoints": null,
              "lowestPointsIndex": null,
              "accoms": [],
              "pwdAccoms": [],
              "nonResAccoms": [],
              "pwdNonResAccoms": [],
              "availabilityStatus": 2,
              "leftOuts": "",
              "isMixedAccom": false
            },
            "segments": [],
            "selectedSegments": [],
            "isMultiSegment": false,
            "isPWDCompanion": false,
            "isRegularPWD": false,
            "isPWD": false,
            "isAutoTrain": false,
            "isSoldOut": false,
            "vehicles": null,
            "coachSeatTrainState": {
              "hasUpperAndLowerBearths": false,
              "upperAvailable": false,
              "lowerAvailable": true
            },
            "isPassRider": false,
            "isAcela": false,
            "destination": {
              "schedule": {
                "arrivalDateTime": "2023-12-25T13:35:00"
              },
              "code": "BOS",
              "name": "Boston, MA"
            },
            "origin": {
              "schedule": {
                "departureDateTime": "2023-12-25T09:00:00"
              },
              "code": "NYP",
              "name": "New York, NY"
            },
            "seatCapacityInfo": {
              "seatCapacityTravelClasses": [
                {
                  "travelClass": "Coach",
                  "criticalCapacity": 0,
                  "availableInventory": 34,
                  "baseRbdCode": "Y",
                  "trainNumber": "160"
                },
                {
                  "travelClass": "Coach",
                  "criticalCapacity": 0,
                  "availableInventory": 34,
                  "baseRbdCode": "Y",
                  "trainNumber": "160"
                },
                {
                  "travelClass": "Business",
                  "criticalCapacity": 0,
                  "availableInventory": 17,
                  "baseRbdCode": "JY",
                  "trainNumber": "160"
                },
                {
                  "travelClass": "Coach",
                  "criticalCapacity": 360,
                  "availableInventory": 160,
                  "baseRbdCode": "Y",
                  "trainNumber": "160"
                },
                {
                  "travelClass": "Business",
                  "criticalCapacity": 61,
                  "availableInventory": 33,
                  "baseRbdCode": "JY",
                  "trainNumber": "160"
                }
              ]
            },
            "elapsedTime": "P0DT4H35M",
            "id": "3_2023-12-25T09:00:00_a17acf02",
            "isBorderCross": false,
            "isCancelled": false,
            "isFilteredForPoints": false,
            "isRTDiscountAvailable": false,
            "isRestricted": false,
            "isSegPriceAvailable": false,
            "logicalId": "160_NYP-1S",
            "isRecommended": "Y",
            "fastestTrip": false,
            "lowestFare": false,
            "orderableAncillaries": [
              {
                "ancillaryFare": {
                  "dollarsAmount": {
                    "total": "20.00"
                  }
                },
                "availableInventory": 4,
                "description": "Bicycle",
                "maxAllowedCount": 1,
                "rbd": "BV",
                "rbdType": "Bicycle",
                "totalDollarsAmount": "20.00"
              },
              {
                "ancillaryFare": {
                  "dollarsAmount": {
                    "total": "39.00"
                  }
                },
                "availableInventory": 7,
                "description": "Pet",
                "maxAllowedCount": 1,
                "rbd": "QX",
                "rbdType": "Pet",
                "totalDollarsAmount": "39.00"
              }
            ],
            "selfServiceEligible": null,
            "isFareProtectedDate": null,
            "duration": "4h 35m",
            "durationLabel": "4 hours 35 minutes"
          },
boswash52 is offline