Location API

Location API

 

This API retrieves nearby locations that sell Coca-Cola Products given a starting point. Type: GET
URI:
../v1/location
Version:
The current version is v1.


Available Methods

Method Description
search (lat/lon) Returns nearest locations, searching by latitude and longitude
search (address) Returns nearest locations, searching by complete street address


Parameters

Name Description Example
latitude Starting latitude in signed degrees format (DDD.dddd)
Use value that is in BE, FR, GB, LU, MO, NL, NO, or SE
50.8558
longitude Starting longitude in signed degrees format (DDD.dddd)
Use value that is in BE, FR, GB, LU, MO, NL, NO, or SE
4.3505
address Starting address if latitude/longitude is not used Grand-Place, 1000 City of Brussels, Belgium
rangeKilometers Maximum distance in kilometers from starting point to include locations 3.0
maxLocations Maximum number of locations to return 3
apiKey Key generated by developer.cokecce.com Get yours now
format
(optional)
Internet media type you want for response format json or xml
callback
(optional)
JSONP callback name myFunctionName


Sample Calls

Lat/Lon

http://api.cokecce.com/v1/location/search/?latitude=50.8558&longitude=4.3505&rangeKilometers=1.0&maxLocations=3&format=json&apiKey=xxxxxx


Address

http://api.cokecce.com/v1/location/search/?address=Grand-Place%2C+1000+City+of+Brussels%2C+Belgium&rangeKilometers=1.0&maxLocations=3&format=json&apiKey=xxxxxx


Back to Available Methods



Response

 {
   "customerDetails":{
      "customers":[
         {
            "number":"0002066084",
            "name":"RELAY ARTS-LOI",
            "address":"METRO MAGASIN EN",
            "city":"BRUXELLES",
            "country":"BE",
            "postalCode":"1000",
            "latitude":"50.856506300000",
            "longitude":"4.350585000000",
            "distance":"0.057"
         },
         {
            "number":"0007879304",
            "name":"ECOLE NR12-20",
            "address":"55-57 RUE DU CANAL",
            "city":"BRUXELLES",
            "country":"BE",
            "postalCode":"1000",
            "latitude":"50.854942300000",
            "longitude":"4.349221200000",
            "distance":"0.153"
         },
         {
            "number":"0007920319",
            "name":"COLLEGE DE LA FRATERNITE",
            "address":"28 CHEE D'ANVERS",
            "city":"BRUXELLES",
            "country":"BE",
            "postalCode":"1000",
            "latitude":"50.856922100000",
            "longitude":"4.351546800000",
            "distance":"0.155"
         }
      ]
   }
}



Response Codes

Value Description
200 Valid request that generated content
204 The server successfully processed the request, but is not returning any content
400 The result cannot be fulfilled due to bad syntax
500 Internal server error


Help / Questions?

  Looking for support and answers? Check out our forum!

Still can't find your answer? Email Us @ apisupport@cokecce.com or use the contact us form.