Locations API - V2
Get service availability.
Returns opening hours and availability for a specific service across multiple locations on a given date.
Endpoint
GET - https://api.travisroadservices.com/v2/locations/availability/{service}
Copy
Path params
| Parameter | Type | Description |
|---|---|---|
service
|
string | The service identifier. |
Query params
| Parameter | Type | Description |
|---|---|---|
locationIds[]
|
string | Location IDs to check availability for. Maximum 100 locations. Multiple values can be passed to broaden the filter. |
date
|
string | Date to check availability for. Format: YYYY-MM-DD. Must be today or a future date. |
Request body
No request bodyResponse body
Response 200
LocationServiceAvailabilityResource collection
Fields
| Field | Type | Description |
|---|---|---|
service
|
string | Service for which availability is checked. |
locationId
|
integer | Unique identifier of the location. |
isAvailable
|
boolean | Indicates whether the location is available for the requested date. |
openingHours
|
object | Opening hours of this location for the requested date. |
isOpenAllDay
|
boolean | Indicates whether the location is open the entire day. |
times
|
array | Opening and closing times for this day. |
Example