API

LocationBox API

Add User Point

Add User Point Service provide to add special point on database based on criterias which you can find below.

AddUserPoint request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserPoint&Typ=output_format&Id=pointid&Name=pointname
&Address=poiaddress&TelNo=telnumber&FaxNo=faxno
&String1=string&String2=string2
&Number1=number1&Number2=number2&Latitude=latitude&Longitude=longitude


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (AddUserPoint)
Typ: Response format. (XML or JSON)
Id: ID of point.
Latitude: Latitude of point.
Longitude: Longitude of point.
Name (Optional): Name of point.
Angle (Optional): Angle of point.
Address (Optional): Address of point.
TelNo (Optional): Telephone number of point.
FaxNo (Optional): Fax number of point.
String1...String9: Available parameters for user data in string format.
Number1...Number9: Available parameters for user data in number format.

Response Parameters


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserPoint&Typ=XML&Id=1&Name=Bayi1
&Address=Kadky&TelNo=02163620500&FaxNo=02163620507
&String1=www.infotech.com.tr&String2=kurumsal@infotech.com.tr
&Number1=1&Number2=2&Latitude=40.9686&Longitude=29.1005


The response will be as following:

<response>
 <transactionid>LBS_37538710</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserPoint&Typ=JSON&Id=1&Name=Bayi1
&Address=Kadky&TelNo=02163620500&FaxNo=02163620507
&String1=www.infotech.com.tr&String2=kurumsal@infotech.com.tr
&Number1=1&Number2=2&Latitude=40.9686&Longitude=29.1005


The response will be as following:


{ "transactionid": "LBS_10761", "status": 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.

Add User Points (Batch)

Add User Points Service provide to add multible special points on database based on criterias which you can find below.

AddUserPoints request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserPoints&Typ=output_format&DataType=data_type_format&Data=post_data


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (AddUserPoints)
Typ: Response format. (XML or JSON)
DataType: Data type format. (XML or JSON)
Data: Data to be posted.

Response Parameters


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserPoints&Typ=output_format&DataType=XML&Data=post_data


Data to be posted should be like the following example.

<?xml version="1.0"?>
<userpoints>
<userpoint><id>1</id><name>Ada Apartman?</name><type>0</type><address>Kadikoy</address><telno>02163620500<telno/><faxno>02163620500</faxno><string1>StringValue</string1><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><number1>4</number1><number2>3</number2><number3>0</number3><number4>0</number4><number5>0</number5><number6>0</number6><number7>0</number7><number8>0</number8><number9>0</number9><latitude>40.9686</latitude><longitude>29.1005</longitude><angle>0.0</angle></userpoint>
<userpoint><id>2</id><name>Ada Apartman?</name><type>0</type><address>Kadikoy</address><telno>02163620500<telno/><faxno>02163620500</faxno><string1>StringValue</string1><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><string2>StringValue</string2><number1>4</number1><number2>3</number2><number3>0</number3><number4>0</number4><number5>0</number5><number6>0</number6><number7>0</number7><number8>0</number8><number9>0</number9><latitude>40.9686</latitude><longitude>29.1005</longitude><angle>0.0</angle></userpoint>
<userpoints>

The response will be as following:

<response>
 <transactionid>LBS_41589</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserPoints&Typ=output_format&DataType=JSON&Data=post_data


Data to be posted should be like the following example.

{
 "userpoints": [
  {
   "id": "1",
   "name": "Ada Apartman?",
   "type": 0,
   "address": "",
   "telno": "",
   "faxno": "",
   "string1": "StringValue",
   "string2": "3,4,5,6",
   "string3": "1,7,12",
   "string4": "",
   "string5": "",
   "string6": "",
   "string7": "",
   "string8": "",
   "string9": "",
   "number1": 4,
   "number2": 3,
   "number3": 0,
   "number4": 0,
   "number5": 0,
   "number6": 0,
   "number7": 0,
   "number8": 0,
   "number9": 0,
   "latitude": 40.9686,
   "longitude": 29.1005,
   "angle": 0
  },
  {
   "id": "2",
   "name": "Ada Apartman?",
   "type": 0,
   "address": "",
   "telno": "",
   "faxno": "",
   "string1": "StringValue",
   "string2": "3,4,5,6",
   "string3": "1,7,12",
   "string4": "",
   "string5": "",
   "string6": "",
   "string7": "",
   "string8": "",
   "string9": "",
   "number1": 4,
   "number2": 3,
   "number3": 0,
   "number4": 0,
   "number5": 0,
   "number6": 0,
   "number7": 0,
   "number8": 0,
   "number9": 0,
   "latitude": 40.9686,
   "longitude": 29.1005,
   "angle": 0
  }
 ]
}

The response will be as following:

{ "transactionid": "LBS_41589", "status": 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.

Get User Point

Get User Point Service provide to get special point on map based on criterias which you can find below.

GetUserPoint request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetUserPoint&Typ=output_format&Id=pointid


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (GetUserPoint)
Typ: Response format. (XML or JSON)
Id: ID of point.

Response Parameters


XML Response

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

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

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

The response will be as following:

<response>
 <transactionid>LBS_37538710</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <userpoints>
 <userpoint>
  <id>1</id>
  <name>Sample</name>
  <type>0</type>
  <address>Kad?ky</address>
  <telno>02163620500</telno>
  <faxno>02163620507</faxno>
  <mahalleid>34000015024</mahalleid>
  <mahalleadi>Kozyata??</mahalleadi>
  <ilceid>34000015000</ilceid>
  <ilceadi>Kad?ky</ilceadi>
  <ilid>34</ilid>
  <iladi>?stanbul</iladi>
  <string1>www.infotech.com.tr</string1>
  <string2>kurumsal@infotech.com.tr</string2>
  <string3/>
  <string4/>
  <string5/>
  <string6/>
  <string7/>
  <string8/>
  <string9/>
  <number1>1</number1>
  <number2>2</number2>
  <number3>0</number3>
  <number4>0</number4>
  <number5>0</number5>
  <number6>0</number6>
  <number7>0</number7>
  <number8>0</number8>
  <number9>0</number9>
  <latitude>40.9686</latitude>
  <longitude>29.1005</longitude>
  <angle>30.5</angle>
 </userpoint>
 </userpoints>
</response>

JSON Response

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

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

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

The response will be as following:


{ "transactionid": "LBS_10824", "status": 0, "userpoints": [ { "id": "1", "name": "Sample", "type": 0, "address": "Kad?ky", "telno": "02163620500", "faxno": "02163620507", "mahalleid": 34000015024, "mahalleadi": "Kozyata??", "ilceid": 34000015000, "ilceadi": "Kad?ky", "ilid": 34, "iladi": "?stanbul", "string1": "www.infotech.com.tr", "string2": "kurumsal@infotech.com.tr", "string3": "", "string4": "", "string5": "", "string6": "", "string7": "", "string8": "", "string9": "", "number1": 1, "number2": 2, "number3": 0, "number4": 0, "number5": 0, "number6": 0, "number7": 0, "number8": 0, "number9": 0, "latitude": 40.9686, "longitude": 29.1005, "angle": 30.5 } ] }

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.

Remove User Point

Remove User Point Service provide to remove special point on database based on criterias which you can find below.

RemoveUserPoint request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=RemoveUserPoint&Typ=output_format&Id=pointid


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (RemoveUserPoint)
Typ: Response format. (XML or JSON)
Id: ID of point.

Response Parameters


XML Response

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

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

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

The response will be as following:

<response>
 <transactionid>LBS_10770</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
</response>

JSON Response

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

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

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

The response will be as following:


{ "transactionid": "LBS_10771", "status": 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.

User Point List

User Point List Service lists special points on database that user gave based on criterias which you can find below.

UserPointList request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=UserPointList&Typ=output_format&WhereClause=whereclause&RegionId=regionid
&Latitude=latitude&Longitude=longitude&Detailed=detailed


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (UserPointList)
Typ: Response format. (XML or JSON)
WhereClause (optional): Where clause in UserPoint List fields.
RegionId (optional): UserPoint List in a UserRegion geometry.
Latitude (optional): Latitude of point.
Longitude (optional): Longitude of point.
Detailed (optional): Values greater than zero return the region list of the query in full detail. (Default value 0)

Response Parameters


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=UserPointList&Typ=XML&WhereClause=REGION_ID = 1&RegionId=78456876
&Detailed=5

The response will be as following:

<response>
 <transactionid>LBS_311312</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <items>
 <item>
  <id>1</id>
  <name>Sample</name>
  <type>0</type>
  <latitude>40.9686</longitude>
  <longitude>29.1005</longitude>
 </item>
 <item>
  <id>2</id>
  <name>Sample2</name>
  <type>3</type>
  <latitude>40.1499892613656</longitude>
  <longitude>26.4262958130633</longitude>
 </item>
 <item>
  <id>3</id>
  <name>Sample3</name>
  <type>0</type>
  <latitude>41.4269485473633</longitude>
  <longitude>32.9790115356445</longitude>
 </item>
 <item>
 </items>
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=UserPointList&Typ=JSON&WhereClause=REGION_ID = 1&RegionId=34536232
&Detailed=3

The response will be as following:


{ "transactionid": "LBS_11313", "status": 0, "items": [ { "id": "1", "name": "Sample", "type": 0, "latitude": 40.9686, "longitude": 29.1005, "angle": 30.5 }, { "id": "2", "name": "Sample2", "type": 3, "latitude": 40.1499892613656, "longitude": 26.4262958130633, "angle": 26.43 }, { "id": "3", "name": "Sample3", "type": 3, "latitude": 41.4269485473633, "longitude": 32.9790115356445, "angle": 57.5 }

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.

User Point List With Extent

User Point List With Extent Service lists special points with special extent on database that user gave based on criterias which you can find below.

User Point List With Extent request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=UserPointListWithExtent&Typ=output_format
&WhereClause=whereclause&Count=count&WhereClause=whereclause
&MinLatitude=minlatitude
&MaxLatitude=maxlatitude&MinLongitude=minlongitude
&MaxLongitude=maxlongitude


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (UserPointList)
Typ: Response format. (XML or JSON)
WhereClause (optional): Where clause in UserPoint List fields.
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
Count: Quantity of points are wanted on list.

Response Parameters


XML Response

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

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

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

The response will be as following:

<response>
 <transactionid>LBS_311312</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <items>
 <item>
  <id>1</id>
  <name>Sample</name>
  <type>0</type>
  <latitude>40.9686</longitude>
  <longitude>29.1005</longitude>
 </item>
 <item>
  <id>2</id>
  <name>Sample2</name>
  <type>3</type>
  <latitude>40.1499892613656</longitude>
  <longitude>26.4262958130633</longitude>
 </item>
 <item>
  <id>3</id>
  <name>Sample3</name>
  <type>0</type>
  <latitude>41.4269485473633</longitude>
  <longitude>32.9790115356445</longitude>
 </item>
 <item>
 </items>
</response>

JSON Response

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

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

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

The response will be as following:


{ "transactionid": "LBS_11313", "status": 0, "items": [ { "id": "1", "name": "Sample", "type": 0, "latitude": 40.9686, "longitude": 29.1005, "angle": 30.5 }, { "id": "2", "name": "Sample2", "type": 3, "latitude": 40.1499892613656, "longitude": 26.4262958130633, "angle": 26.43 }, { "id": "3", "name": "Sample3", "type": 3, "latitude": 41.4269485473633, "longitude": 32.9790115356445, "angle": 57.5 }

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.