API

LocationBox API

PoiSearchEx

PoiListEx Service gives more information about a POI based on criterias which you can find below.

A PoiListEx request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiSearchEx&Typ=output_format
&Latitude=latitude&Longitude=longitude&Radius=radius&ExType=extype&Keyword=keyword



Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (PoiListEx)
Typ: Response format. (XML or JSON)
Latitude: Latitude value of POI.
Radius: The radius of the area bounding the search results.
ExType: PoiSearchEx type.
Keyword (optional): Add a keyword to narrow down POI Search results.

Ex Type Values

FUELPRICES -- Fuel Prices
CARPARKPRICES -- Car Park Prices
PHARMACYONDUTY -- Pharmacy On Duty

Response Parameters


XML Response

PoiSearchEx response returns in XML format when the Typ parameter is set as "XML".

Below is an example for a PoiSearchEx request which is expected to return a response in XML format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiSearchEx&Typ=XML
&Latitude=41.1&Longitude=29.1&Radius=2000&ExType=FUELPRICES&Keyword=


The response will be as following:

<response>
 <transactionid>LBS_37486400</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <poilist>
  <poi>
   <id>34200129970</id>
   <name>PO-PETROL OFS ANONM RKET</name>
   <address>SELMYE MAH. TIBBYE CADDES SKDAR STANBUL</address>
   <phone>+90 532 4232515</phone>
   <latitude>4558913</latitude>
   <longitude>452099</longitude>
   <distance>500</distance>
  <nvs>
   <nv></nv>
    <name>OCTANE95</name>
    <value>4.17</value>
   </nv>
   <nv></nv>
    <name>OCTANE95PLUS</name>
    <value>4.23</value>
   </nv>
   <nv></nv>
    <name>OCTANE97</name>
    <value>4.23</value>
   </nv>
   <nv></nv>
    <name>EURODIESEL10</name>
    <value>3.63</value>
   </nv>
   <nv></nv>
    <name>PRODIESEL10</name>
    <value>3.59</value>
   </nv>
  </nvs>
  </poi>

   ...

  <poi>
   <id>34200046773</id>
   <name>SHELL-MENZL NAKLYE MADENCLK NAAT OTOMOTV TURZM SAN.</name>
   <address>BATTAL GAZ MAH. BOSNA BULVARI SULTANBEYL STANBUL</address>
   <phone>+90 216 5926627</phone>
   <latitude>4554140</latitude>
   <longitude>472592</longitude>
   <distance>2000</distance>
  <nvs>
   <nv></nv>
    <name>OCTANE95</name>
    <value>4.16</value>
   </nv>
   <nv></nv>
    <name>OCTANE95PLUS</name>
    <value>4.33</value>
   </nv>
   <nv></nv>
    <name>OCTANE97</name>
    <value>4.33</value>
   </nv>
   <nv></nv>
    <name>EURODIESEL10</name>
    <value>3.67</value>
   </nv>
   <nv></nv>
    <name>PRODIESEL10</name>
    <value>3.59</value>
   </nv>
  </nvs>
   </poi>
 </poilist>
</response>

JSON Response

PoiListEx response returns in JSON format when the Typ parameter is set as "JSON".

Below is an example for a PoiListEx request which is expected to return a response in JSON format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiSearchEx&Typ=JSON
&Latitude=41.1&Longitude=29.1&Radius=2000&ExType=FUELPRICES&Keyword=


The response will be as following:


{ { "transactionid": "LBS_37726418", "status": 0, "poilist": [ { "id": 34200129970, "name": "PO-PETROL OFS ANONM RKET", "address": "SELMYE MAH. TIBBYE CADDES SKDAR STANBUL", "phone": "+90 532 4232515", "latitude": 4558913, "longitude": 452099, "distance": 500, "nvs": [ { "name": "OCTANE95", "value": "4.17" }, { "name": "OCTANE95PLUS", "value": "4.23" },{ "name": "OCTANE97", "value": "4.23" }, { "name": "EURODIESEL10", "value": "3.63" }, { "name": "PRODIESEL10", "value": "3.59" } ] }, { "id": 34200129970, "name": "PO-PETROL OFS ANONM RKET", "address": "SELMYE MAH. TIBBYE CADDES SKDAR STANBUL", "phone": "+90 532 4232515", "latitude": 4558913, "longitude": 452099, "distance": 2000, "nvs": [ { "name": "OCTANE95", "value": "4.17" }, { "name": "OCTANE95PLUS", "value": "4.23" }, { "name": "OCTANE97", "value": "4.23" }, { "name": "EURODIESEL10", "value": "3.63" }, { "name": "PRODIESEL10", "value": "3.59" } ] },

transactionid: The id of response given by LocationBox Service. Every response can be tracked using transactionid when necessary.
status: Response format. (XML or JSON)

Status Codes
0 -- Success
1 -- Fail

errno: Error code
errdesc: Error definition

Error Codes
10001 Error processing your request. Please try again soon.
Cmd parameter is misspelled/not found.
10011 Error processing your request. Please check the Cmd parameter.
Cmd is not specified.
10012 Error processing your request. Please check the Key parameter.
Key is not specified.
10013 Error processing your request. Please check the Key parameter.
Key is invalid.
20012 No data found.

PoiSearchExWithExtent


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (PoiSearchExWithExtent)
Typ: Response format. (XML or JSON)
MinLatitude: Minimum Latitude value of the extent.
MinLongitude: Minimum Longitude value of the extent.
MaxLatitude: Maximum Latitude value of the extent.
MaxLongitude: Maximum Longitude value of the extent.
ExType: PoiSearchEx type.
Keyword (optional): Add a keyword to narrow down POI Search results.

Ex Type Values

FUELPRICES -- Fuel Prices
CARPARKPRICES -- Car Park Prices
PHARMACYONDUTY -- Pharmacy On Duty


XML Response

PoiSearchExWithExtent response returns in XML format when the Typ parameter is set as "XML".

Below is an example for an address element (PoiSearchExWithExtent) request which is expected to return a response in XML format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiSearchExWithExtent&Typ=XML&MinLatitude=40.357822&MinLongitude=28.521057&MaxLatitude=41.327673&MaxLongitude=30.034842&ExType=FUELPRICES&Keyword=

The response will be as following:


<response>
 <transactionid>LBS_37486400</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <poilist>
  <poi>
   <id>34200129970</id>
   <name>PO-PETROL OFS ANONM RKET</name>
   <address>SELMYE MAH. TIBBYE CADDES SKDAR STANBUL</address>
   <phone>+90 532 4232515</phone>
   <latitude>4558913</latitude>
   <longitude>452099</longitude>
   <distance>500</distance>
  <nvs>
   <nv></nv>
    <name>OCTANE95</name>
    <value>4.17</value>
   </nv>
   <nv></nv>
    <name>OCTANE95PLUS</name>
    <value>4.23</value>
   </nv>
   <nv></nv>
    <name>OCTANE97</name>
    <value>4.23</value>
   </nv>
   <nv></nv>
    <name>EURODIESEL10</name>
    <value>3.63</value>
   </nv>
   <nv></nv>
    <name>PRODIESEL10</name>
    <value>3.59</value>
   </nv>
  </nvs>
  </poi>

   ...

  <poi>
   <id>34200046773</id>
   <name>SHELL-MENZL NAKLYE MADENCLK NAAT OTOMOTV TURZM SAN.</name>
   <address>BATTAL GAZ MAH. BOSNA BULVARI SULTANBEYL STANBUL</address>
   <phone>+90 216 5926627</phone>
   <latitude>4554140</latitude>
   <longitude>472592</longitude>
   <distance>2000</distance>
  <nvs>
   <nv></nv>
    <name>OCTANE95</name>
    <value>4.16</value>
   </nv>
   <nv></nv>
    <name>OCTANE95PLUS</name>
    <value>4.33</value>
   </nv>
   <nv></nv>
    <name>OCTANE97</name>
    <value>4.33</value>
   </nv>
   <nv></nv>
    <name>EURODIESEL10</name>
    <value>3.67</value>
   </nv>
   <nv></nv>
    <name>PRODIESEL10</name>
    <value>3.59</value>
   </nv>
  </nvs>
   </poi>
 </poilist>
</response>

JSON Response

PoiSearchExWithExtent response returns in JSON format when the Typ parameter is set as "JSON".

Below is an example for an POI element (PoiSearchExWithExtent) request which is expected to return a response in JSON format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiSearchExWithExtent&Typ=XML&MinLatitude=40.357822&MinLongitude=28.521057&MaxLatitude=41.327673&MaxLongitude=30.034842&ExType=FUELPRICES&Keyword=

The response will be as following:


{ { "transactionid": "LBS_37726418", "status": 0, "poilist": [ { "id": 34200129970, "name": "PO-PETROL OFS ANONM RKET", "address": "SELMYE MAH. TIBBYE CADDES SKDAR STANBUL", "phone": "+90 532 4232515", "latitude": 4558913, "longitude": 452099, "distance": 500, "nvs": [ { "name": "OCTANE95", "value": "4.17" }, { "name": "OCTANE95PLUS", "value": "4.23" },{ "name": "OCTANE97", "value": "4.23" }, { "name": "EURODIESEL10", "value": "3.63" }, { "name": "PRODIESEL10", "value": "3.59" } ] }, { "id": 34200129970, "name": "PO-PETROL OFS ANONM RKET", "address": "SELMYE MAH. TIBBYE CADDES SKDAR STANBUL", "phone": "+90 532 4232515", "latitude": 4558913, "longitude": 452099, "distance": 2000, "nvs": [ { "name": "OCTANE95", "value": "4.17" }, { "name": "OCTANE95PLUS", "value": "4.23" }, { "name": "OCTANE97", "value": "4.23" }, { "name": "EURODIESEL10", "value": "3.63" }, { "name": "PRODIESEL10", "value": "3.59" } ] },

transactionid: The id of response given by LocationBox Service. Every response can be tracked using transactionid when necessary.
status: Response format. (XML or JSON)

Status Codes
0 -- Success
1 -- Fail

errno: Error code
errdesc: Error definition

Error Codes
10001 Error processing your request. Please try again soon.
Cmd parameter is misspelled/not found.
10011 Error processing your request. Please check the Cmd parameter.
Cmd is not specified.
10012 Error processing your request. Please check the Key parameter.
Key is not specified.
10013 Error processing your request. Please check the Key parameter.
Key is invalid.
20022 City is not found.
20023 Town is not found.
20024 District is not found.