Skip to content

Search By Coordinates

This function will query our retail locations data base using lat/long coordinates to center the search.

Path

https://api.b-fonline.com/api/retail_locations_by_coords

Method

POST

Required Parameters

  • lat
  • long
  • radius (radius of search in miles, 200 miles max)
  • brand_id (find this id from the brands API call)
  • type ('onpremise', 'offpremise', or 'both')
  • site_id (get this from B-F IT)

Optional Parameters

  • minor_brand_id (find this id from the brands API call)
  • promotion_id (filter to locations involved in a specific promotion)

Responses

  • 200 OK
    [
    
      {...},
      {
        "LocationID": "2600855",
        "latitude": "38.254845000000003",
        "longitude": "-85.766368999999997",
        "company": "Cardinal Spirits",
        "address": "7100 RAGGARD RD",
        "city": "LOUISVILLE",
        "state": "KY",
        "postal_code": "40216",
        "country": "USA",
        "phone": "5024474677",
        "distance": "0",
        "brand_name": "Jack Daniels",
        "brand_id": "1",
        "brand_minor_description": "BLACK",
        "brand_minor_ID": "381  ",
        "store_type": "offpremise"
      },
      {...}
    ]
    
  • 422 (Unprocessable Entity)
    • Error message in JSON response
  • 500
    • Something has gone horribly wrong, please let us know.

Code Examples

1
2
3
4
5
curl -X POST \
  https://api.b-fonline.com/api/geocode \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{"search_string": "40202"}'