API

LocationBox API

POI List

POI List Service gives POI location and information in list based on criterias which you can find below.

A POI List request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiList&Typ=output_format&IlId=ilid&IlceId=ilceid&MahalleId=mahalleid
&Category=category&Brand=brand&AttributeWhereClause=where_clause
&AttributeOrderName=Attribute_Name&AttributeOrderType=Attribute_Order


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (PoiList)
Typ: Response format. (XML or JSON)
IlId: Search the province will take province id.
IlceId: Search the province will take county id.
MahalleId: Search the province will take district id.
RegionId(optional): Search the user region will take region id.
Radius: Region Radius in meters.
Lat: Latitude of Point.
Lon: Longitude of Point.
Category: Category specification of POI.
Brand: Brand specification of POI.
AttributeWhereClause (optional): You can give where condition your POI which you what to search.
AttributeOrderName (optional): Order by AttributeName value.
AttributeOrderType (optional): You can select descended or ascended order to your result.
OrderName: For this parameter you can just give DATE variable for now.
OrderType: For this parameter, you can just give DESC or ASC for ordering list.

Response Parameters


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiList&Typ=XML&IlId=34&IlceId=34000019000&Category=ECZANE

The response will be as following:

<response>
 <transactionid>LBS_196</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <poilist>
  <poi>
   <id>34200045184</id>
   <name>HAYAT ECZANESİ</name>
   <address>ALTAYÇEŞME MAH. PALMİYE SOKAK NO: 31 MALTEPE İSTANBUL</address>
   <phone>+902163712489</phone>
   <latitude>40.93468</latitude>
   <longitude>29.129</longitude>
   <distance>0</distance>
  </poi>

   ...

  <poi>
   <id>34200044821</id>
   <name>KADIKÖY HAYAT ECZANESİ</name>
   <address>CAFERAĞA MAH. MİRALAY NAZIM SOKAK NO: 7 KADIKÖY İSTANBUL</address>
   <phone>+902163457646</phone>
   <latitude>40.98831</latitude>
   <longitude>29.02804</longitude>
   <distance>0</distance>
  </poi>
 </poilist>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiList&Typ=JSON&IlId=34&IlceId=34000019000&Category=ECZANE

The response will be as following:


{ transactionid: LBS_198, status: 0, poilist: [ { id: 34200045184, name: 'HAYAT ECZANESİ', address: 'ALTAYÇEŞME MAH. PALMİYE SOKAK NO: 31 MALTEPE İSTANBUL', phone: '+902163712489', latitude: 40.93468, longitude: 29.129, distance: 0 },
...
{ id: 34200073480, name: 'HAYAT ECZANESİ', address: 'BAŞIBÜYÜK MAH. BAŞIBÜYÜK CADDESİ NO: 12/A MALTEPE İSTANBUL', phone: '', latitude: 40.95424, longitude: 29.14391, distance: 0 } ] }


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.


GetPoi


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (GetPoi)
Typ: Response format. (XML or JSON)
Id: POI id.
IdList: POI idlist like(34200143722,34200098764).


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetPoi&Typ=XML&Id=34200143722

The response will be as following:


<response>
 <transactionid>LBS_196</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
  <poi>
   <id>34200143722</id>
   <name>PTT-Türkali Þb.</name>
   <address>Türkali MAH. Türkali Köprü Sokak NO: 140 Beþiktaþ Ýstanbul</address>
   <phone>+90 212 2591552</phone>
   <latitude>4563180</latitude>
   <longitude>450931</longitude>
   <distance>0</distance>
  </poi>
</response>

JSON Response

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

Below is an example for an address element (get poi) request which is expected to return a response in JSON format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetPoi&Typ=JSON&Id=34200143722

The response will be as following:


{ "transactionid": "LBS_31507", "status": 0, "poi": { "id": 34200143722, "name": "PTT-Türkali Þb.", "address": "Türkali MAH. Türkali Köprü Sokak NO: 140 Beþiktaþ Ýstanbul", "phone": "+90 212 2591552", "latitude": 4563180, "longitude": 450931, "distance": 0 } }

transactionid: The id of response given by LocationBox Service. Every response can be tracked using transactionid when necessary.
status: Response code

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.