POST vehicle/realtimeattributes

Retrieve realtime attributes for a vehicle or a list of vehicles currently in operation. Use this method when retrieving information for a large list of vehicles.

Request Information

URI Parameters

None.

Body Parameters

VehicleAttributesRequest
NameDescriptionTypeAdditional information
Vehicles

Collection of alphanumeric string representing the vehicle IDs (ie.bus numbers)

Collection of string

None.

Route

Alphanumeric value representing the name of the route (ie. 72)

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Vehicles": [
    "sample string 1",
    "sample string 2"
  ],
  "Route": "sample string 1"
}

text/html

Sample:
{"Vehicles":["sample string 1","sample string 2"],"Route":"sample string 1"}

application/xml, text/xml

Sample:
<VehicleAttributesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ACTransit.Transit.API.Models">
  <Route>sample string 1</Route>
  <Vehicles xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Vehicles>
</VehicleAttributesRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

VehicleRealtimeAttributes
NameDescriptionTypeAdditional information
VehicleId

Alphanumeric string representing the vehicle ID(ie.bus number)

string

None.

CurrentRoute

Name of the route that the vehicle is currently servicing

string

None.

LastPositionLatitude

Numeric value representing the last known position - latitude - of the vehicle in Decimal Degrees. Null if the position is not known.

decimal number

None.

LastPositionLongitude

Numeric value representing the last known position - longitude - of the vehicle in Decimal Degrees. Null if the position is not known.

decimal number

None.

DateTimePositionReported

Datetime indicating when the vehicle position was last reported (Dates and Times in PST/PDT when applicable). Null if the position is not being reported.

date

None.

VehicleCapacity

Numeric value that represents the vehicle's maximum recommended passenger load. Null if this information is not available.

integer

None.

CurrentPassengerCount

Integer value that represents the vehicle's current passenger count. Null if this information is not available.

integer

None.

EstimatedOccupancyPercentage

Integer value that represents the vehicle's estimated occupancy percentage. Null if this information is not available.

integer

None.

EstimatedOccupancyStatusColor

String value with the recommeded RGB color in hexadecimal format to represent the vehicle's current estimated occupancy. Null if passenger occupancy is not available.

string

None.

EstimatedOccupancyStatus

String value describing the estimated occupancy status for the vehicle. Possible returned values are: Null - Occupancy status information is not available. Not Crowded - Vehicle has plenty of room to accommodate new passengers. Some Crowding - Vehicle already has a few passengers but can accomodate more. Crowded - Vehicle is about to or already passed the recommended passenger capacity limit.

string

None.

DateTimeAPCReported

Datetime indicating when passenger occupancy status was last reported (Dates and Times in PST/PDT when applicable). Null if occupancy status is not being reported.

date

None.

Response Formats

application/json, text/json

Sample:
{
  "VehicleId": "sample string 1",
  "CurrentRoute": "sample string 2",
  "LastPositionLatitude": 1.1,
  "LastPositionLongitude": 1.1,
  "DateTimePositionReported": "2024-04-23T02:51:56.4418456-07:00",
  "VehicleCapacity": 1,
  "CurrentPassengerCount": 1,
  "EstimatedOccupancyPercentage": 1,
  "EstimatedOccupancyStatusColor": "sample string 3",
  "EstimatedOccupancyStatus": "sample string 4",
  "DateTimeAPCReported": "2024-04-23T02:51:56.4418456-07:00"
}

text/html

Sample:
{"VehicleId":"sample string 1","CurrentRoute":"sample string 2","LastPositionLatitude":1.1,"LastPositionLongitude":1.1,"DateTimePositionReported":"2024-04-23T02:51:56.4418456-07:00","VehicleCapacity":1,"CurrentPassengerCount":1,"EstimatedOccupancyPercentage":1,"EstimatedOccupancyStatusColor":"sample string 3","EstimatedOccupancyStatus":"sample string 4","DateTimeAPCReported":"2024-04-23T02:51:56.4418456-07:00"}

application/xml, text/xml

Sample:
<VehicleRealtimeAttributes xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ACTransit.Transit.Domain.Models">
  <CurrentPassengerCount>1</CurrentPassengerCount>
  <CurrentRoute>sample string 2</CurrentRoute>
  <DateTimeAPCReported>2024-04-23T02:51:56.4418456-07:00</DateTimeAPCReported>
  <DateTimePositionReported>2024-04-23T02:51:56.4418456-07:00</DateTimePositionReported>
  <EstimatedOccupancyPercentage>1</EstimatedOccupancyPercentage>
  <EstimatedOccupancyStatus>sample string 4</EstimatedOccupancyStatus>
  <EstimatedOccupancyStatusColor>sample string 3</EstimatedOccupancyStatusColor>
  <LastPositionLatitude>1.1</LastPositionLatitude>
  <LastPositionLongitude>1.1</LastPositionLongitude>
  <VehicleCapacity>1</VehicleCapacity>
  <VehicleId>sample string 1</VehicleId>
</VehicleRealtimeAttributes>