API

LocationBox API

Add User Point

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 (Optional) : Description of point.
String2 (Optional): Description of point..
Number1 (Optional): Description of point.
Number2 (Optional): Description of point.

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=Test
&Address=Kadýköy&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=Test
&Address=Kadýköy&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.