Storemapper has an API an api endpoint where you can make query to your locator programmatically to get a list of nearest locations from an address.

Endpoint

https://storemapper.co/api/v2/stores/search

Example Request:

$ curl "https://www.storemapper.co/api/v2/stores/search?user_id=1&access_token=a5ea23b59797169a24cdb743c266518f&near=New+York&radius=3&unit=km"

  • user_id: Your storemapper.co user id.
  • access_token: Your api access token associated with supplied user_id.

Please contact support to obtain user_id and access_token.

  • near: The target address, use URL encoding.
  • radius: Optional. Your search radius. If omitted the default locator settings will be used.
  • unit: Optional, ‘km’ or ‘mile’. Unit for search radius. If omitted the default locator settings will be used.

Example Response:


{"stores": [
{
"id": 2924928,
"name": "Whole Foods Market - Tribeca",
"address": "270 Greenwich Street New York, NY 10007",
"phone": "212-349-6555",
"email": null,
"url": null,
"description": "An excellent spot for shopping",
"latitude": 40.715531,
"longitude": -74.0114691,
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"image_url": null,
"category": "Category 3",
"tier": null,
"custom_marker_url": null,
},
{
"id": 2924819,
"name": "Whole Foods Market - Bowery",
"address": "95 East Houston Street New York, NY 10002",
"phone": "212-420-1320",
"email": null,
"url": null,
"description": "An excellent spot for shopping",
"latitude": 40.7237669,
"longitude": -73.9922029,
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"image_url": null,
"category": "Category 1",
"tier": null,
"custom_marker_url": null,
"distance": 0.557120115498579
},
{
"id": 2924930,
"name": "Whole Foods Market - Union Square",
"address": "4 Union Square South New York, NY 10003",
"phone": "212-673-5388",
"email": null,
"url": null,
"description": "An excellent spot for shopping",
"latitude": 40.7346729,
"longitude": -73.989149,
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"image_url": null,
"category": "Category 3",
"tier": null,
"custom_marker_url": null,
"distance": 1.68288623578908
},
{
"id": 2924741,
"name": "SanaVita",
"address": "145 East 16th Street New York, NY 10003 USA",
"phone": "212-777-4900",
"email": null,
"url": null,
"description": "An excellent spot for shopping",
"latitude": 40.73509723,
"longitude": -73.98722827,
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"image_url": null,
"category": "Category 1",
"tier": null,
"custom_marker_url": null,
"distance": 2.93988037475348
}
]}

Tagged: