GET api/Locations?city={city}&state={state}&zip={zip}&radius={radius}&page={page}&rows={rows}
Get locations with filter/search parameters
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
city |
City value. Will combine with state value for search, if passed in. |
string |
Default value is |
state |
State value. Will combine with city value for search, if passed in. |
string |
Default value is |
zip |
Zip value. Takes precedence over city/state, if passed in. |
string |
Default value is |
radius |
Radius value. Combines with zip code and searches from the center point of the zip code in whatever radius value is passed in. Default is 80 miles. |
integer |
Default value is 80 |
page |
Current page of results wanted. |
integer |
Default value is 1 |
rows |
Current number of rows returned. |
integer |
Default value is 100 |
Body Parameters
None.
Response Information
Resource Description
LocationName | Description | Type | Additional information |
---|---|---|---|
Page |
Current page of data returned |
integer |
None. |
PerPage |
Locations returned per page |
integer |
None. |
TotalCount |
Total count of all locations meeting the search criteria |
integer |
None. |
PageCount |
Total count of pages containing location data |
integer |
None. |
Locations |
Location collection |
Collection of Locations |
None. |
Response Formats
application/json, text/json
{ "Page": 1, "PerPage": 2, "TotalCount": 3, "PageCount": 4, "Locations": [ { "ID": 1, "Name": "sample string 2", "Address1": "sample string 3", "Address2": "sample string 4", "City": "sample string 5", "State": "sample string 6", "Zip": "sample string 7", "Email": "sample string 8", "Latitude": 9.1, "Longitude": 10.1, "Phone": "sample string 11", "Distance": 12.0, "MapUrl": "https://www.google.com/maps/dir/sample+string+3,+sample+string+5,+sample+string+6,+sample+string+7" }, { "ID": 1, "Name": "sample string 2", "Address1": "sample string 3", "Address2": "sample string 4", "City": "sample string 5", "State": "sample string 6", "Zip": "sample string 7", "Email": "sample string 8", "Latitude": 9.1, "Longitude": 10.1, "Phone": "sample string 11", "Distance": 12.0, "MapUrl": "https://www.google.com/maps/dir/sample+string+3,+sample+string+5,+sample+string+6,+sample+string+7" } ] }
application/xml, text/xml
<Location xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/yanmartractor_api.API"> <Locations> <Locations> <Address1>sample string 3</Address1> <Address2>sample string 4</Address2> <City>sample string 5</City> <Distance>12</Distance> <Email>sample string 8</Email> <ID>1</ID> <Latitude>9.1</Latitude> <Longitude>10.1</Longitude> <Name>sample string 2</Name> <Phone>sample string 11</Phone> <State>sample string 6</State> <Zip>sample string 7</Zip> </Locations> <Locations> <Address1>sample string 3</Address1> <Address2>sample string 4</Address2> <City>sample string 5</City> <Distance>12</Distance> <Email>sample string 8</Email> <ID>1</ID> <Latitude>9.1</Latitude> <Longitude>10.1</Longitude> <Name>sample string 2</Name> <Phone>sample string 11</Phone> <State>sample string 6</State> <Zip>sample string 7</Zip> </Locations> </Locations> <Page>1</Page> <PageCount>4</PageCount> <PerPage>2</PerPage> <TotalCount>3</TotalCount> </Location>