The POST operation allows you to finds POIs along a given leg of a route.
POST https://pcmiler.alk.com/apis/rest/v1.0/Service.svc/poi/alongRoute?dataset={dataset}
The FindPoisAlongRoute operation wraps the PoisAlongRouteRequestBody and form a JSON format data in the POST body See details in PoisAlongRouteRequestBody.
Element | Definition | Required |
---|---|---|
PoisAlongRouteRequestBody |
A PoisAlongRouteRequestBody System Object.
|
Y |
RegionalDataSet |
The regional dataset. Possible value: Current (default), PCM_EU, PCM_OC, PCM_SA, PCM_AF, PCM_AS, PCM_ME, PCM_GT, PCM_WW and PCM_NA.
|
N |
Example for getting POIs along the route using HoS search type by searching from 30 minutes to 2 hours. For longer routes when the SearchType is POISearchType.Generic, the search window will automatically be trimmed to be the maximum allowed length, which is currently 100 miles or minutes.
{ "PoiRoute": { "ExtendedOptions": null, "RouteId": "MiamiToPrinceton", "Stops": [ { "Costs": null, "IsViaPoint": false, "Address": { "StreetAddress": null, "City": "Miami", "State": "FL", "Zip": null, "County": null, "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0 }, "Coords": null, "Region": 4, "Label": null, "PlaceName": null }, { "Costs": null, "IsViaPoint": false, "Address": { "StreetAddress": null, "City": null, "State": null, "Zip": "08540", "County": null, "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0 }, "Coords": null, "Region": 4, "Label": null, "PlaceName": null } ], "Options": { "HighwayOnly": false } }, "RouteLegIndex": 0, "SearchType": 2, "HoSPOICategories": [0], "SearchWindowUnits": 1, "SearchWindowStart": 30, "SearchWindowEnd": 120, "AirDistanceThreshold": 1.5 }
{ "POISearchMatches": [ { "POILocation": { "Address": { "StreetAddress": "1126 Hammondville Road", "City": "Pompano Beach", "State": "FL", "Zip": "33069", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "26.235230", "Lon": "-80.139048" }, "Region": 4, "Label": "Hardy Brothers Svc Station", "PlaceName": "Hardy Brothers Svc Station" }, "DistanceFromOrigin": { "Value": 35.14, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": "00:36:00", "DistanceOffRoute": { "Value": 3.172, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "810 N Congress Ave", "City": "Riviera Beach", "State": "FL", "Zip": "33404", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "26.771412", "Lon": "-80.087144" }, "Region": 4, "Label": "Riviera Truck Stop", "PlaceName": "Riviera Truck Stop" }, "DistanceFromOrigin": { "Value": 73.017, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": "01:09:00", "DistanceOffRoute": { "Value": 0.87, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "3691 W. Blue Heron Blvd.", "City": "Riviera Beach", "State": "FL", "Zip": "33404", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "26.782640", "Lon": "-80.095352" }, "Region": 4, "Label": "Blue Heron Blvd.", "PlaceName": "Blue Heron Blvd." }, "DistanceFromOrigin": { "Value": 73.782, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": "01:09:00", "DistanceOffRoute": { "Value": 0.347, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "", "City": "", "State": "", "Zip": "", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "27.128555", "Lon": "-80.332812" }, "Region": 4, "Label": "Rest Area, I-95 North", "PlaceName": "Rest Area, I-95 North" }, "DistanceFromOrigin": { "Value": 103.939, "DistanceUnits": 0 }, "POICategory": "Rest Area (HOS)", "TimeFromOrigin": "01:35:00", "DistanceOffRoute": { "Value": 0.065, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "7300 Okeechobee Rd.", "City": "Fort Pierce", "State": "FL", "Zip": "34945", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "27.413892", "Lon": "-80.400144" }, "Region": 4, "Label": "Pilot Travel Center #90", "PlaceName": "Pilot Travel Center #90" }, "DistanceFromOrigin": { "Value": 127.957, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": "01:57:00", "DistanceOffRoute": { "Value": 2.155, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "7150 Okeechobee Road", "City": "Fort Pierce", "State": "FL", "Zip": "34945", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "27.413986", "Lon": "-80.397760" }, "Region": 4, "Label": "Love's #415", "PlaceName": "Love's #415" }, "DistanceFromOrigin": { "Value": 128.098, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": "01:58:00", "DistanceOffRoute": { "Value": 2.438, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "100 North Kings Hwy", "City": "St. Lucie", "State": "FL", "Zip": "34945", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "27.449632", "Lon": "-80.398072" }, "Region": 4, "Label": "Flying J #622", "PlaceName": "Flying J #622" }, "DistanceFromOrigin": { "Value": 130.079, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": "01:59:00", "DistanceOffRoute": { "Value": 1.554, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "200 S Kings Hwy", "City": "Ft Pierce", "State": "FL", "Zip": "34945", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "27.445640", "Lon": "-80.397992" }, "Region": 4, "Label": "Love's #467", "PlaceName": "Love's #467" }, "DistanceFromOrigin": { "Value": 130.098, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": "01:59:00", "DistanceOffRoute": { "Value": 1.573, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "", "City": "", "State": "", "Zip": "", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "27.466000", "Lon": "-80.417605" }, "Region": 4, "Label": "Rest Area, I-95 North", "PlaceName": "Rest Area, I-95 North" }, "DistanceFromOrigin": { "Value": 131.228, "DistanceUnits": 0 }, "POICategory": "Rest Area (HOS)", "TimeFromOrigin": "01:59:00", "DistanceOffRoute": { "Value": 0.034, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "9097 20Th Street", "City": "Vero Beach", "State": "FL", "Zip": "32966", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "27.638670", "Lon": "-80.514104" }, "Region": 4, "Label": "General Equities", "PlaceName": "General Equities" }, "DistanceFromOrigin": { "Value": 145.145, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": "02:12:00", "DistanceOffRoute": { "Value": 1.228, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "8909 20Th Street", "City": "Vero Beach", "State": "FL", "Zip": "32966", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "27.638100", "Lon": "-80.511000" }, "Region": 4, "Label": "TA-Vero Beach #197", "PlaceName": "TA-Vero Beach #197" }, "DistanceFromOrigin": { "Value": 146.112, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": "02:13:00", "DistanceOffRoute": { "Value": 2.386, "DistanceUnits": 0 } } ], "SearchStartCoordinates": { "Lat": "26.19098", "Lon": "-80.151586" }, "SearchEndCoordinates": { "Lat": "27.478037", "Lon": "-80.432108" } }
Example for getting POIs along the route using FuelStop search type.
{ "PoiRoute": { "ExtendedOptions": null, "RouteId": "PhiladelphiaToPrinceton", "Stops": [ { "Costs": null, "IsViaPoint": false, "Address": { "StreetAddress": null, "City": "Philadelphia", "State": "PA", "Zip": null, "County": null, "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0 }, "Coords": null, "Region": 4, "Label": null, "PlaceName": null }, { "Costs": null, "IsViaPoint": false, "Address": { "StreetAddress": null, "City": null, "State": null, "Zip": "08540", "County": null, "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0 }, "Coords": null, "Region": 4, "Label": null, "PlaceName": null } ], "Options": { "HighwayOnly": false } }, "RouteLegIndex": 0, "SearchType": 1 }
{ "POISearchMatches": [ { "POILocation": { "Address": { "StreetAddress": "3670 Richmond St", "City": "Philadelphia", "State": "PA", "Zip": "19134", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "39.989220", "Lon": "-75.090200" }, "Region": 4, "Label": "Sak Traders Inc Dba Sunoco", "PlaceName": "Sak Traders Inc Dba Sunoco" }, "DistanceFromOrigin": { "Value": 7.708, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": null, "DistanceOffRoute": { "Value": 0.484, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "2950 State Road", "City": "Bensalem", "State": "PA", "Zip": "19020", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "40.075588", "Lon": "-74.929648" }, "Region": 4, "Label": "Bensalem Travel Plaza Co", "PlaceName": "Bensalem Travel Plaza Co" }, "DistanceFromOrigin": { "Value": 19.014, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": null, "DistanceOffRoute": { "Value": 1.267, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "503 State Road", "City": "Croydon", "State": "PA", "Zip": "19021", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "40.085832", "Lon": "-74.906384" }, "Region": 4, "Label": "Jai, Inc.", "PlaceName": "Jai, Inc." }, "DistanceFromOrigin": { "Value": 20.296, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": null, "DistanceOffRoute": { "Value": 3.819, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "1231 New Rodgers Road", "City": "Bristol", "State": "PA", "Zip": "19007", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "40.105040", "Lon": "-74.876232" }, "Region": 4, "Label": "Sunoco Food Mart", "PlaceName": "Sunoco Food Mart" }, "DistanceFromOrigin": { "Value": 22.633, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": null, "DistanceOffRoute": { "Value": 2.281, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "905 4Th Ave", "City": "Bristol", "State": "PA", "Zip": "19007", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "40.108348", "Lon": "-74.857560" }, "Region": 4, "Label": "Bristol Fuel Stop Inc.", "PlaceName": "Bristol Fuel Stop Inc." }, "DistanceFromOrigin": { "Value": 24.687, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": null, "DistanceOffRoute": { "Value": 5.922, "DistanceUnits": 0 } }, { "POILocation": { "Address": { "StreetAddress": "236 W.Lincoln Hwy", "City": "Fairless Hills", "State": "PA", "Zip": "19030", "County": "", "Country": null, "SPLC": null, "CountryPostalFilter": 0, "AbbreviationFormat": 0, "CountryAbbreviation": null }, "Coords": { "Lat": "40.165000", "Lon": "-74.893888" }, "Region": 4, "Label": "Doaba Oil Corp", "PlaceName": "Doaba Oil Corp" }, "DistanceFromOrigin": { "Value": 25.823, "DistanceUnits": 0 }, "POICategory": "Truck Services (HOS)", "TimeFromOrigin": null, "DistanceOffRoute": { "Value": 0.857, "DistanceUnits": 0 } } ], "SearchStartCoordinates": { "Lat": "39.961698", "Lon": "-75.197213" }, "SearchEndCoordinates": { "Lat": "40.354907", "Lon": "-74.645014" } }
Data Element | Description | Data Type | Value/Example | Note |
---|---|---|---|---|
Type |
Indicate whether the error is an exception or warning | Enum |
Warning Exception |
|
Code |
Error code | Enum | Please refer to Appendix for complete list | |
LegacyErrorCode |
The legacy error code with is an integer valued code that would have been returned in PCMiler Web Services v25 and earlier. | int | ||
Description |
The detailed error description. | String |