@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api BC Route Planner REST API
@base https://router.api.gov.bc.ca/
@version 2.0.0
@auth ApiKey apikey in header
@common_fields {outputFormat: str(json/kml/html)=json, outputSRS: int(4326/4269/3005/26907/26908/26909/26910/26911)=4326, criteria: str(shortest/fastest)=fastest, distanceUnit: str(km/mi)=km, correctSide: bool=false, departure: str(date-time), enable: str=gdf,tr,xc,tc, disable: str=td,ev,sc,tf, snapDistance: int=1000, minRoutingDistance: int=0, routeDescription: str=Routing results}
@endpoints 22
@hint download_for_search
@toc distance.{outputFormat}(2), distance(2), route.{outputFormat}(2), directions.{outputFormat}(2), optimalRoute.{outputFormat}(2), optimalDirections.{outputFormat}(2), truck(10)

@group distance.{outputFormat}
@endpoint GET /distance.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false}
@returns(200)

@endpoint POST /distance.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false}
@returns(200)

@endgroup

@group distance
@endpoint GET /distance/betweenPairs.{outputFormat}
@required {fromPoints: str, toPoints: str}
@optional {maxPairs: int=1}
@returns(200)

@endpoint POST /distance/betweenPairs.{outputFormat}
@required {fromPoints: str, toPoints: str}
@optional {maxPairs: int=1}
@returns(200)

@endgroup

@group route.{outputFormat}
@endpoint GET /route.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false}
@returns(200)

@endpoint POST /route.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false}
@returns(200)

@endgroup

@group directions.{outputFormat}
@endpoint GET /directions.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, simplifyDirections: bool=false, simplifyThreshold: int=250}
@returns(200)

@endpoint POST /directions.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, simplifyDirections: bool=false, simplifyThreshold: int=250}
@returns(200)

@endgroup

@group optimalRoute.{outputFormat}
@endpoint GET /optimalRoute.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false}
@returns(200)

@endpoint POST /optimalRoute.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false}
@returns(200)

@endgroup

@group optimalDirections.{outputFormat}
@endpoint GET /optimalDirections.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, simplifyDirections: bool=false, simplifyThreshold: int=250}
@returns(200)

@endpoint POST /optimalDirections.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, simplifyDirections: bool=false, simplifyThreshold: int=250}
@returns(200)

@endgroup

@group truck
@endpoint GET /truck/distance.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, truckRouteMultiplier: int=9, height: num=null, width: num=null, length: num=null, weight: num=null, restrictionSource: str=ITN, excludeRestrictions: str=null, restrictionValues: str=null}
@returns(200)

@endpoint POST /truck/distance.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, truckRouteMultiplier: int=9, height: num=null, width: num=null, length: num=null, weight: num=null, restrictionSource: str=ITN, excludeRestrictions: str=null, restrictionValues: str=null}
@returns(200)

@endpoint GET /truck/route.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, truckRouteMultiplier: int=9, height: num=null, width: num=null, length: num=null, weight: num=null, partition: str=, listRestrictions: bool=false, restrictionSource: str=ITN, excludeRestrictions: str=null, restrictionValues: str=null}
@returns(200)

@endpoint POST /truck/route.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, truckRouteMultiplier: int=9, height: num=null, width: num=null, length: num=null, weight: num=null, partition: str=, listRestrictions: bool=false, restrictionSource: str=ITN, excludeRestrictions: str=null, restrictionValues: str=null}
@returns(200)

@endpoint GET /truck/directions.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, truckRouteMultiplier: int=9, height: num=null, width: num=null, length: num=null, weight: num=null, partition: str=, simplifyDirections: bool=false, simplifyThreshold: int=250, listRestrictions: bool=false, restrictionSource: str=ITN, excludeRestrictions: str=null, restrictionValues: str=null}
@returns(200)

@endpoint POST /truck/directions.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, truckRouteMultiplier: int=9, height: num=null, width: num=null, length: num=null, weight: num=null, partition: str=, simplifyDirections: bool=false, simplifyThreshold: int=250, listRestrictions: bool=false, restrictionSource: str=ITN, excludeRestrictions: str=null, restrictionValues: str=null}
@returns(200)

@endpoint GET /truck/optimalRoute.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, truckRouteMultiplier: int=9, height: num=null, width: num=null, length: num=null, weight: num=null, partition: str=, listRestrictions: bool=false, restrictionSource: str=ITN, excludeRestrictions: str=null, restrictionValues: str=null}
@returns(200)

@endpoint POST /truck/optimalRoute.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, truckRouteMultiplier: int=9, height: num=null, width: num=null, length: num=null, weight: num=null, partition: str=, listRestrictions: bool=false, restrictionSource: str=ITN, excludeRestrictions: str=null, restrictionValues: str=null}
@returns(200)

@endpoint GET /truck/optimalDirections.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, truckRouteMultiplier: int=9, height: num=null, width: num=null, length: num=null, weight: num=null, partition: str=, simplifyDirections: bool=false, simplifyThreshold: int=250, listRestrictions: bool=false, restrictionSource: str=ITN, excludeRestrictions: str=null, restrictionValues: str=null}
@returns(200)

@endpoint POST /truck/optimalDirections.{outputFormat}
@required {points: str}
@optional {roundTrip: bool=false, truckRouteMultiplier: int=9, height: num=null, width: num=null, length: num=null, weight: num=null, partition: str=, simplifyDirections: bool=false, simplifyThreshold: int=250, listRestrictions: bool=false, restrictionSource: str=ITN, excludeRestrictions: str=null, restrictionValues: str=null}
@returns(200)

@endgroup

@end
