Get started

    API Endpoint

        https://api.ridewta.com/
                

The Whatcom Transportation Authority API provides access to transit data such as routes, stops, and pass information. Some methods require an API key to access.

To use methods requiring an API key. Please contact us at it@ridewta.com to get your own API key.

Looking for our GTFS feed instead? WTA offers both an up to date static feed and real time feeds. Please visit our GTFS page for more information.

fares/badlist/smartcard

API Key required

POST


# Here is a powershell example
$uri = “https://api.ridewta.com/fares/badlist/smartcard”
$key = "your api key here"
$headers = @{
“x-api-key” = $key;
"Content-Type" = "application/json";
}
$body = @{
  "PUT" = '90000011113','90000011114','90000011115';
  "DELETE" = '90000011116';
}
$body = ConvertTo-Json -InputObject $body
Invoke-WebRequest -Uri $uri -Method POST -Headers $headers -UseBasicParsing -Body $body
                

To send a batch list of badlist smartcard modifications, send a POST request to:
https://api.ridewta.com/fares/badlist/smartcard

POST requst body must include a JSON object containing an array of values to PUT and DELETE from the badlist. PUT will add the specified card to the badlist, thus invalidating that bus pass. DELETE will remove the specified card from the badlist, thus validatng that bus pass.


fares/badlist/smartcard/{card}

API Key required

DELETE


# Here is a powershell example
$uri = "https://api.ridewta.com/fares/badlist/smartcard/90000011112"
$key = "your api key here"
$headers = @{
“x-api-key” = $key;
"Content-Type" = "application/json";
}
Invoke-WebRequest –Uri $uri –Method DELETE -Headers $headers
                

To remove a single card from the badlist, send a DELETE request to:
https://api.ridewta.com/fares/badlist/smartcard/{card}


PUT


# Here is a powershell example
$uri = "https://api.ridewta.com/fares/badlist/smartcard/90000011112"
$key = "your api key here"
$headers = @{
“x-api-key” = $key;
"Content-Type" = "application/json";
}
Invoke-WebRequest –Uri $uri –Method PUT -Headers $headers
                

To add a single card to the badlist, send a PUT request to:
https://api.ridewta.com/fares/badlist/smartcard/{card}



GET


# Here is a powershell example
$uri = "https://api.ridewta.com/fares/badlist/smartcard/90000011112"
$key = "your api key here"
$headers = @{
“x-api-key” = $key;
"Content-Type" = "application/json";
}
Invoke-WebRequest –Uri $uri –Method GET -Headers $headers
                

To validate th status of a card that is used on our TouchPass system, send a GET request to:
https://api.ridewta.com/fares/badlist/smartcard/{card}

The {card} parameter must be 10 digits, numbers only.
Possible 200 responses include:
"Valid": Indicating the card is valid for use on our TouchPass system.
"Invalid": Indicating the card is not valid for use on our TouchPass system.
"Invalid card number": Indicating the requested card number is an invalid format.
"Card not found": Indicating that the card format is correct, but the card number has not been added to our system.


fares/badlist/track2

API Key required

POST


# Here is a powershell example
$uri = “https://api.ridewta.com/fares/badlist/track2”
$key = "your api key here"
$headers = @{
“x-api-key” = $key;
"Content-Type" = "application/json";
}
$body = @{
  "PUT" = '90000011113','90000011114','90000011115';
  "DELETE" = '90000011116';
}
$body = ConvertTo-Json -InputObject $body
Invoke-WebRequest -Uri $uri -Method POST -Headers $headers -UseBasicParsing -Body $body
                

To send a batch list of badlist track2 modifications, send a POST request to:
https://api.ridewta.com/fares/badlist/track2

POST requst body must include a JSON object containing an array of values to PUT and DELETE from the badlist. PUT will add the specified card to the badlist, thus invalidating that bus pass. DELETE will remove the specified card from the badlist, thus validatng that bus pass.


fares/badlist/track2/{card}

API Key required

DELETE


# Here is a powershell example
$uri = "https://api.ridewta.com/fares/badlist/track2/90000011112"
$key = "your api key here"
$headers = @{
“x-api-key” = $key;
"Content-Type" = "application/json";
}
Invoke-WebRequest –Uri $uri –Method DELETE -Headers $headers
                

To remove a single card from the badlist, send a DELETE request to:
https://api.ridewta.com/fares/badlist/track2/{card}


PUT


# Here is a powershell example
$uri = "https://api.ridewta.com/fares/badlist/track2/90000011112"
$key = "your api key here"
$headers = @{
“x-api-key” = $key;
"Content-Type" = "application/json";
}
Invoke-WebRequest –Uri $uri –Method PUT -Headers $headers –UseBasicParsing
                

To add a single card to the badlist, send a PUT request to:
https://api.ridewta.com/fares/badlist/track2/{card}


GET


# Here is a powershell example
$uri = "https://api.ridewta.com/fares/badlist/track2/90000011112"
$key = "your api key here"
$headers = @{
“x-api-key” = $key;
"Content-Type" = "application/json";
}
Invoke-WebRequest –Uri $uri –Method GET -Headers $headers –UseBasicParsing
                

To determine if a card is on the badlist, send a GET request to:
https://api.ridewta.com/fares/badlist/track2/{card}


notices/en

GET


# Here is a powershell example
$uri = "https://api.ridewta.com/notices/en"
Invoke-WebRequest –Uri $uri –Method GET -Headers $headers –UseBasicParsing
                

To get a list of WTA's recent notices, send a GET request to:
https://api.ridewta.com/notices/en


notices/es

GET


# Here is a powershell example
$uri = "https://api.ridewta.com/notices/es"
Invoke-WebRequest –Uri $uri –Method GET -Headers $headers –UseBasicParsing
                

To get a list of WTA's recent notices in Spanish, send a GET request to:
https://api.ridewta.com/notices/es


routes

GET


# Here is a powershell example
$uri = "https://api.ridewta.com/routes"
Invoke-WebRequest –Uri $uri –Method GET -Headers $headers –UseBasicParsing
                

To get a list of WTA's routes, send a GET request to:
https://api.ridewta.com/routes


stops

GET


# Here is a powershell example
$uri = "https://api.ridewta.com/stops"
Invoke-WebRequest –Uri $uri –Method GET -Headers $headers –UseBasicParsing
                

To get a list of WTA's stops, send a GET request to:
https://api.ridewta.com/stops


stops/{stop}

GET


# Here is a powershell example
$uri = "https://api.ridewta.com/stops/2001"
Invoke-WebRequest –Uri $uri –Method GET -Headers $headers –UseBasicParsing
                

To get information about a single bus stop, send a GET request to:
https://api.ridewta.com/stops/{stop}

The {stop} url parameter represents the stop number. This number is on each stop sign.


stops/{stop}/attachments

GET


# Here is a powershell example
$uri = "https://api.ridewta.com/stops/2001/attachments"
Invoke-WebRequest –Uri $uri –Method GET -Headers $headers –UseBasicParsing
                

To get image attachments of a bus stop, send a GET request to:
https://api.ridewta.com/stops/{stop}/attachments

The {stop} url parameter represents the stop number. This number is on each stop sign. If an image of the bus stop is available, this method returns the publicly accessible url for the image.


vehicles

GET


# Here is a powershell example
$uri = "https://api.ridewta.com/vehicles"
Invoke-WebRequest –Uri $uri –Method GET -Headers $headers –UseBasicParsing
                

To get information about WTA vehicles, send a GET request to:
https://api.ridewta.com/vehicles


vehicles/{vehicle}

GET


# Here is a powershell example
$uri = "https://api.ridewta.com/vehicles/801"
Invoke-WebRequest –Uri $uri –Method GET -Headers $headers –UseBasicParsing
                

To get information about a single WTA vehicle, send a GET request to:
https://api.ridewta.com/vehicles/{vehicle}

The {vehicle} url parameter refers to the bus number. The number is painted on each vehicle.


vehicles/{vehicle}/{timestamp}

GET


# Here is a powershell example
$uri = "https://api.ridewta.com/vehicles/801/1586415600000"
Invoke-WebRequest –Uri $uri –Method GET -Headers $headers –UseBasicParsing
                

To get vehicle history for a WTA vehicle, send a GET request to:
https://api.ridewta.com/vehicles/{vehicle}/{timestamp}

The {vehicle} url parameter refers to the bus number. The {timestamp} url parameter should be in unix timestamp format.

If data is available for the supplied parameters, this method will return history for the entire day that is specified by the timestamp.