API

LocationBox API

Address Elements

LocationBox Address Elements offers the full city list, list of towns for a given city and list of districts of a given town.
An Address Elements request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=cmd_name&Typ=output_format&MajorCities=major_code


IlList


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (IlList)
Typ: Response format. (XML or JSON)
MajorCities: if value is 1 function lists Istanbul, Ankara and zmir first then other cities alphabetically. Default value is 0.
CountryId:Id for Northern Cyprus Turkish Republic (99) for Turkey (90)

Response Parameters


XML Response

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

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

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

The response will be as following:


<response>
 <transactionid>LBS_151</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <illist>
  <id>1</id>
  <name>ADANA</name>
  <latitude>37.00039</latitude>
  <longitude>35.31411</longitude>
  <id>2</id>
  <name>ADIYAMAN</name>
  <latitude>37.76454</latitude>
  <longitude>38.27645</longitude>

   ...

  <id>66</id>
  <name>YOZGAT</name>
  <latitude>39.82373</latitude>
  <longitude>34.80784</longitude>
  <id>100</id>
  <name>YURT DII</name>
  <latitude>48.5948</latitude>
  <longitude>35.91628</longitude>
  <id>67</id>
  <name>ZONGULDAK</name>
  <latitude>41.45519</latitude>
  <longitude>31.7879</longitude>
 </illist>
</response>

JSON Response

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

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

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

The response will be as following:


{ transactionid: LBS_186, status: 0, illist: [ { id: 1, name: 'ADANA', latitude: 37.00039, longitude: 35.31411 }, { id: 2, name: 'ADIYAMAN', latitude: 37.76454, longitude: 38.27645 },
...
{ id: 66, name: 'YOZGAT', latitude: 39.82373, longitude: 34.80784 }, { id: 100, name: 'YURT DII', latitude: 48.5948, longitude: 35.91628 }, { id: 67, name: 'ZONGULDAK', latitude: 41.45519, longitude: 31.7879 } ] }


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.

illist (city list)
id: City id.
latitude: Latitude value for middle point representing the area.
longitude: Longitude value for middle point representing the area.


ilList With Extent


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (IlList)
Typ: Response format. (XML or JSON)
MinLatitude: Minimum Latitude value of the extent.
MaxLatitude: Maximum Latitude value of the extent.
MinLongitude: Minimum Latitude value of the extent.
MaxLongitude: Maximum Latitude value of the extent

Response Parameters


XML Response

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

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

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

The response will be as following:


<response>
 <transactionid>LBS_151</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <illist>
  <id>1</id>
  <name>ADANA</name>
  <latitude>37.00039</latitude>
  <longitude>35.31411</longitude>
  <id>2</id>
  <name>ADIYAMAN</name>
  <latitude>37.76454</latitude>
  <longitude>38.27645</longitude>

   ...

  <id>66</id>
  <name>YOZGAT</name>
  <latitude>39.82373</latitude>
  <longitude>34.80784</longitude>
  <id>100</id>
  <name>YURT DII</name>
  <latitude>48.5948</latitude>
  <longitude>35.91628</longitude>
  <id>67</id>
  <name>ZONGULDAK</name>
  <latitude>41.45519</latitude>
  <longitude>31.7879</longitude>
 </illist>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=IlListWthExtent&Typ=JSON&MinLatitude=40.357822&MinLongitude=28.521057&MaxLatitude=41.327673&MaxLongitude=30.034842

The response will be as following:


{ transactionid: LBS_186, status: 0, illist: [ { id: 1, name: 'ADANA', latitude: 37.00039, longitude: 35.31411 }, { id: 2, name: 'ADIYAMAN', latitude: 37.76454, longitude: 38.27645 },
...
{ id: 66, name: 'YOZGAT', latitude: 39.82373, longitude: 34.80784 }, { id: 100, name: 'YURT DII', latitude: 48.5948, longitude: 35.91628 }, { id: 67, name: 'ZONGULDAK', latitude: 41.45519, longitude: 31.7879 } ] }


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.


IlceList


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (IlceList)
Typ: Response format. (XML or JSON)
IlId: City id.


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=IlceList&Typ=XML&IlId=6

The response will be as following:


<response>
 <transactionid>LBS_179</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <ilcelist>
  <ilid>6</ilid>
  <id>6000384000</id>
  <name>AKYURT</name>
  <latitude>40.12634</latitude>
  <longitude>33.08222</longitude>
  <ilid>6</ilid>
  <id>6000987000</id>
  <name>ALTINDAĞ</name>
  <latitude>39.9558</latitude>
  <longitude>32.85465</longitude>

   ...

  <ilid>6</ilid>
  <id>6000991000</id>
  <name>YENİMAHALLE</name>
  <latitude>39.96236</latitude>
  <longitude>32.81005</longitude>
 </ilcelist>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=IlceList&Typ=JSON&IlId=6

The response will be as following:


{ transactionid: LBS_188, status: 0, ilcelist: [ { ilid: 6, id: 6000384000, name: 'AKYURT', latitude: 40.12634, longitude: 33.08222 }, { ilid: 6, id: 6000987000, name: 'ALTINDAĞ', latitude: 39.9558, longitude: 32.85465 },
...
{ ilid: 6, id: 6000991000, name: 'YENİMAHALLE', latitude: 39.96236, longitude: 32.81005 } ] }


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.

ilcelist (town list)
id: Town id.
latitude: Latitude value for middle point representing the area.
longitude: Longitude value for middle point representing the area.


ilceList With Extent


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (IlList)
Typ: Response format. (XML or JSON)
MinLatitude: Minimum Latitude value of the extent.
MaxLatitude: Maximum Latitude value of the extent.
MinLongitude: Minimum Latitude value of the extent.
MaxLongitude: Maximum Latitude value of the extent

Response Parameters


XML Response

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

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

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

The response will be as following:


<response>
 <transactionid>LBS_179</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <ilcelist>
  <ilid>6</ilid>
  <id>6000384000</id>
  <name>AKYURT</name>
  <latitude>40.12634</latitude>
  <longitude>33.08222</longitude>
  <ilid>6</ilid>
  <id>6000987000</id>
  <name>ALTINDAĞ</name>
  <latitude>39.9558</latitude>
  <longitude>32.85465</longitude>

   ...

  <ilid>6</ilid>
  <id>6000991000</id>
  <name>YENİMAHALLE</name>
  <latitude>39.96236</latitude>
  <longitude>32.81005</longitude>
 </ilcelist>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=IlceListWithExtent&Typ=JSON&MinLatitude=40.357822&MinLongitude=28.521057&MaxLatitude=41.327673&MaxLongitude=30.034842

The response will be as following:


{ transactionid: LBS_188, status: 0, ilcelist: [ { ilid: 6, id: 6000384000, name: 'AKYURT', latitude: 40.12634, longitude: 33.08222 }, { ilid: 6, id: 6000987000, name: 'ALTINDAĞ', latitude: 39.9558, longitude: 32.85465 },
...
{ ilid: 6, id: 6000991000, name: 'YENİMAHALLE', latitude: 39.96236, longitude: 32.81005 } ] }


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.


MahalleList


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (MahalleList)
Typ: Response format. (XML or JSON)
IlceId: County id.
Type(optional):0 = default , 1 = all villages, towns and districts, 2 = just villages and towns

XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=MahalleList&Typ=XML&IlceId=6000986000

The response will be as following:


<response>
 <transactionid>LBS_185</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <mahallelist>
  <ilceid>6000986000</ilceid>
  <id>6000986009</id>
  <name>100.YIL İŞÇİ BLOKLARI</name>
  <latitude>39.8942</latitude>
  <longitude>32.80317</longitude>
  <ilceid>6000986000</ilceid>
  <id>6000986016</id>
  <name>AKPINAR</name>
  <latitude>39.86082</latitude>
  <longitude>32.81394</longitude>

   ...

  <ilid>6000986000</ilid>
  <id>6000986057</id>
  <name>ZAFERTEPE</name>
  <latitude>39.91591</latitude>
  <longitude>32.87442</longitude>
 </mahallelist>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=MahalleList&Typ=JSON&IlceId=6000986000

The response will be as following:


{ transactionid: LBS_189, status: 0, mahallelist: [ { ilceid: 6000986000, id: 6000986009, name: '100.YIL İŞÇİ BLOKLARI', latitude: 39.8942, longitude: 32.80317 }, { ilceid: 6000986000, id: 6000986016, name: 'AKPINAR', latitude: 39.86082, longitude: 32.81394 },
...
{ ilceid: 6000986000, id: 6000986057, name: 'ZAFERTEPE', latitude: 39.91591, longitude: 32.87442 } ] }


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.

mahallelist (district list)
id: District id.
latitude: Latitude value for middle point representing the area.
longitude: Longitude value for middle point representing the area.


MahalleList With Extent


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (IlList)
Typ: Response format. (XML or JSON)
MinLatitude: Minimum Latitude value of the extent.
MaxLatitude: Maximum Latitude value of the extent.
MinLongitude: Minimum Latitude value of the extent.
MaxLongitude: Maximum Latitude value of the extent

Response Parameters


XML Response

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

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

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

The response will be as following:


<response>
 <transactionid>LBS_185</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <mahallelist>
  <ilceid>6000986000</ilceid>
  <id>6000986009</id>
  <name>100.YIL İŞÇİ BLOKLARI</name>
  <latitude>39.8942</latitude>
  <longitude>32.80317</longitude>
  <ilceid>6000986000</ilceid>
  <id>6000986016</id>
  <name>AKPINAR</name>
  <latitude>39.86082</latitude>
  <longitude>32.81394</longitude>

   ...

  <ilid>6000986000</ilid>
  <id>6000986057</id>
  <name>ZAFERTEPE</name>
  <latitude>39.91591</latitude>
  <longitude>32.87442</longitude>
 </mahallelist>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=MahalleListWithExtent&Typ=JSON&MinLatitude=40.357822&MinLongitude=28.521057&MaxLatitude=41.327673&MaxLongitude=30.034842

The response will be as following:


{ transactionid: LBS_189, status: 0, mahallelist: [ { ilceid: 6000986000, id: 6000986009, name: '100.YIL İŞÇİ BLOKLARI', latitude: 39.8942, longitude: 32.80317 }, { ilceid: 6000986000, id: 6000986016, name: 'AKPINAR', latitude: 39.86082, longitude: 32.81394 },
...
{ ilceid: 6000986000, id: 6000986057, name: 'ZAFERTEPE', latitude: 39.91591, longitude: 32.87442 } ] }


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.

YolList


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (YolList)
Typ: Response format. (XML or JSON)
MahalleId: District id.


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=YolList&Typ=XML&MahalleId=6000986059

The response will be as following:


<response>
 <transactionid>LBS_37526731</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <yollist>
 <yol>
  <id>16063243</id>
  <name>284. SOKAK</name>
  <latitude>39.89917</latitude>
  <longitude>32.8459</longitude>
  <zoomlevel>11</zoomlevel>
 </yol>
 <yol>
  <id>15846246</id>
  <name>AL DEDE SOKAK</name>
  <latitude>39.90218</latitude>
  <longitude>32.85283</longitude>
  <zoomlevel>10</zoomlevel>
 <yol>

   ...

 <yol>
  <id>15997463</id>
  <name>YELYURT SOKAK</name>
  <latitude>39.89776</latitude>
  <longitude>32.85336</longitude>
  <zoomlevel>11</zoomlevel>
 </yol>
 </yollist>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=YolList&Typ=JSON&MahalleId=6000986059

The response will be as following:


{ "transactionid": "LBS_37526747", "status": 0, "yollist": [ { "id": 16063243, "name": "284. SOKAK", "latitude": 39.89917, "longitude": 32.8459, "zoomlevel": 11 }, { "id": 15846246, "name": "AL DEDE SOKAK", "latitude": 39.90218, "longitude": 32.85283, "zoomlevel": 10 },
...
{ "id": 15997463, "name": "YELYURT SOKAK", "latitude": 39.89776, "longitude": 32.85336, "zoomlevel": 11 } ] }


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.


YOLLIST (district list)
id: District id.
latitude: Latitude value for middle point representing the area.
longitude: Longitude value for middle point representing the area.

YolList With Extent


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (YolListWithExtent)
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.


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=YolListWithExtent&Typ=XML
&MinLatitude=39.88856601&MinLongitude=32.84312112&MaxLatitude=39.90537603&MaxLongitude=32.85343692


The response will be as following:


<response>
 <transactionid>LBS_37526731</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <yollist>
 <yol>
  <id>16063243</id>
  <name>284. SOKAK</name>
  <latitude>39.89917</latitude>
  <longitude>32.8459</longitude>
  <zoomlevel>11</zoomlevel>
 </yol>
 <yol>
  <id>15846246</id>
  <name>AL DEDE SOKAK</name>
  <latitude>39.90218</latitude>
  <longitude>32.85283</longitude>
  <zoomlevel>10</zoomlevel>
 <yol>

   ...

 <yol>
  <id>15997463</id>
  <name>YELYURT SOKAK</name>
  <latitude>39.89776</latitude>
  <longitude>32.85336</longitude>
  <zoomlevel>11</zoomlevel>
 </yol>
 </yollist>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=YolListWithExtent&Typ=JSON&
MinLatitude=39.88856601&MinLongitude=32.84312112&MaxLatitude=39.90537603&MaxLongitude=32.85343692


The response will be as following:


{ "transactionid": "LBS_37526747", "status": 0, "yollist": [ { "id": 16063243, "name": "284. SOKAK", "latitude": 39.89917, "longitude": 32.8459, "zoomlevel": 11 }, { "id": 15846246, "name": "AL DEDE SOKAK", "latitude": 39.90218, "longitude": 32.85283, "zoomlevel": 10 },
...
{ "id": 15997463, "name": "YELYURT SOKAK", "latitude": 39.89776, "longitude": 32.85336, "zoomlevel": 11 } ] }


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.


YolList With Extent (district list)
id: District id.
latitude: Latitude value for middle point representing the area.
longitude: Longitude value for middle point representing the area.

KapiList


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (KapiList)
Typ: Response format. (XML or JSON)
YolId: Road id.


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=KapiList&Typ=XML&YolId=9485070

The response will be as following:


<response>
 <transactionid>LBS_37526731</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <kapilist>
 <kapi>
  <id>200132845</id>
  </name>
  <no>41</no>
 </kapi>

   ...

 <kapi>
  <id>200206874</id>
  </name>
  <no>13</no>
 </kapi>
 </kapilist>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=KapiList&Typ=JSON&YolId=9485070

The response will be as following:


{ "transactionid": "LBS_37526747", "status": 0, "kapilist": [ { "id": 200132845, "name": "", "no": "41" },
...
{ "id": 200206874, "name": "", "no": "13" } ] }


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.


KAPILIST (district list)
id: id.
name: name.
no: no.

KapiList With Extent


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (IlList)
Typ: Response format. (XML or JSON)
MinLatitude: Minimum Latitude value of the extent.
MaxLatitude: Maximum Latitude value of the extent.
MinLongitude: Minimum Latitude value of the extent.
MaxLongitude: Maximum Latitude value of the extent

Response Parameters


XML Response

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

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

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

The response will be as following:


<response>
 <transactionid>LBS_37526731</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <kapilist>
 <kapi>
  <id>200132845</id>
  </name>
  <no>41</no>
 </kapi>

   ...

 <kapi>
  <id>200206874</id>
  </name>
  <no>13</no>
 </kapi>
 </kapilist>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=MahalleListWithExtent&Typ=JSON&MinLatitude=40.357822&MinLongitude=28.521057&MaxLatitude=41.327673&MaxLongitude=30.034842

The response will be as following:


{ "transactionid": "LBS_37526747", "status": 0, "kapilist": [ { "id": 200132845, "name": "", "no": "41" },
...
{ "id": 200206874, "name": "", "no": "13" } ] }


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.

GetCoordinate


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (GetCoordinate)
Typ: Response format. (XML or JSON)
Id: You can use address and POI elements. (IlId, IlceId, MahalleId, YolId, PoiId)


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetCoordinate&Typ=XML&IlceId=6000986000

The response will be as following:


 <transactionid>LBS_49937060</transactionid>
 <status>0</status>
  <latitude>39.91931</latitude>
  <longitude>32.85112</longitude>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetCoordinate&Typ=JSON&IlceId=6000986000

The response will be as following:


{ "transactionid": "LBS_49937064", "status": 0, "latitude": 39.91931, "longitude": 32.85112 }

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.