Service API
Address
POI
Route
Map
Indoor
Dynamic Information
Campaign
Demography
Traffic
User Data
Risk
Analysis
- Spatial Analysis
- Add Service Area
- Add Buffered Line To User Region
- Add Buffered Route To User Region
- Add Route To User Line
LocationBox API
Add User Line Service provide to add special line on database based on criterias which you can find below.
AddUserLine request must look like this:
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserLine&Typ=output_format&Id=lineid&Name=linename
&Type=linetype&Coors=coors
Key
: LocationBox user key. (Register for user key) Cmd
: LocationBox service name. (AddUserLine)Typ
: Response format. (XML or JSON)Id
: ID of line.Name
: Name of line.Type
: Type of line. Coors
: Coordinates of line corners.String1...String9
: Available parameters for user data in string format. Number1...Number9
: Available parameters for user data in number format. AddUserLine response returns in XML format when the Typ
parameter is set as "XML".
Below is an example for a AddUserLine request which is expected to return a response in XML format.
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserLine&Typ=XML&Id=1&Name=SampleLine
&Type=4&Coors=29.0606,40.9889,29.1609,40.9858,29.1624,40.9453,29.0792,40.9631
The response will be as following:
<response>
<transactionid>LBS_37538770</transactionid>
<status>0</status>
<errno />
<errdesc />
</response>
AddUserLine response returns in JSON format when the Typ
parameter is set as "JSON".
Below is an example for a AddUserLine request which is expected to return a response in JSON format.
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserLine&Typ=JSON&Id=1&Name=SampleLine
&Type=4&Coors=29.0606,40.9889,29.1609,40.9858,29.1624,40.9453,29.0792,40.9631
The response will be as following:
{
"transactionid": "LBS_37538773",
"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 codeerrdesc
: Error definitionError 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 Lines Service provide to add multible special lines on database based on criterias which you can find below.
AddUserLines request must look like this:
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserLines&Typ=output_format&DataType=data_type_format&Data=post_data
Key
: LocationBox user key. (Register for user key) Cmd
: LocationBox service name. (AddUserLines)Typ
: Response format. (XML or JSON)DataType
: Data type format. (XML or JSON)Data
: Data to be posted.AddUserLines response returns in XML format when the Typ
parameter is set as "XML".
Below is an example for a AddUserLines request which is expected to return a response in XML format.
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserLines&Typ=output_format&DataType=XML&Data=post_data
Data to be posted should be like the following example.
<?xml version="1.0"?>
<userlines>
<userline>
<id>1</id>
<name>NameOfLine</name>
<type>0</type>
<coors>29.0606,40.9889,29.1609,40.9858,29.1624,40.9453</coors>
<string1>StringValue</string1>
<string2>StringValue</string2>
<string3>StringValue</string3>
<string4>StringValue</string4>
<string5>StringValue</string5>
<string6>StringValue</string6>
<string7>StringValue</string7>
<string8>StringValue</string8>
<string9>StringValue</string9>
<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>
</userline>
<userline>
<id>2</id>
<name>NameOfLine</name>
<type>0</type>
<coors>29.0606,40.9889,29.1609,40.9858,29.1624,40.9453</coors>
<string1>StringValue</string1>
<string2>StringValue</string2>
<string3>StringValue</string3>
<string4>StringValue</string4>
<string5>StringValue</string5>
<string6>StringValue</string6>
<string7>StringValue</string7>
<string8>StringValue</string8>
<string9>StringValue</string9>
<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>
</userline>
</userlines>
The response will be as following:
<response>
<transactionid>LBS_41589</transactionid>
<status>0</status>
<errno />
<errdesc />
</response>
AddUserLines response returns in JSON format when the Typ
parameter is set as "JSON".
Below is an example for a AddUserLines request which is expected to return a response in JSON format.
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=AddUserLines&Typ=output_format&DataType=JSON&Data=post_data
Data to be posted should be like the following example.
{"userlines": [
{
"id": "1",
"name": "NameOfLine",
"type": 99,
"string1": "",
"string2": "",
"string3": "",
"string4": "",
"string5": "",
"string6": "",
"string7": "",
"string8": "",
"string9": "",
"number1": 0,
"number2": 0,
"number3": 0,
"number4": 0,
"number5": 0,
"number6": 0,
"number7": 0,
"number8": 0,
"number9": 0,
"coors": "29.0606,40.9889,29.1609,40.9858,29.1624,40.9453,29.0792,40.9631"
},
{
"id": "2",
"name": "NameOfLine",
"type": 99,
"string1": "",
"string2": "",
"string3": "",
"string4": "",
"string5": "",
"string6": "",
"string7": "",
"string8": "",
"string9": "",
"number1": 0,
"number2": 0,
"number3": 0,
"number4": 0,
"number5": 0,
"number6": 0,
"number7": 0,
"number8": 0,
"number9": 0,
"coors": "29.0606,40.9889,29.1609,40.9858,29.1624,40.9453,29.0792,40.9631"
}
]
}
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 codeerrdesc
: Error definitionError 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 Line Service provide to get special line on map based on criterias which you can find below.
GetUserLine request must look like this:
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetUserLine&Typ=output_format&Id=lineid&WithCoors=coordinates
Key
: LocationBox user key. (Register for user key) Cmd
: LocationBox service name. (GetUserLine)Typ
: Response format. (XML or JSON)Id
: ID of line.WithCoors
: If value is 1, line coordinates data can be seen on response.GetUserLine response returns in XML format when the Typ
parameter is set as "XML".
Below is an example for a GetUserLine request which is expected to return a response in XML format.
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetUserLine&Typ=XML&Id=1&WithCoors=1
The response will be as following:
<response>
<transactionid>LBS_37538710</transactionid>
<status>0</status>
<errno />
<errdesc />
<linelist>
<userline>
<id>1</id>
<name>SampleLine</name>
<type>4</type>
<string1>S1</string1>
<string2>S2</string2>
<string3/>
<string4/>
<string5/>
<string6/>
<string7/>
<string8/>
<string9/>
<number1>111</number1>
<number2>777</number2>
<number3>0</number3>
<number4>0</number4>
<number5>0</number5>
<number6>0</number6>
<number7>0</number7>
<number8>0</number8>
<number9>0</number9>
<latitude>40.9710025422803</latitude>
<longitude>29.1195495847177</longitude>
<extent>
<minlatitude>0</minlatitude>
<minlongitude>0</minlongitude>
<maxlatitude>0</maxlatitude>
<maxlongitude>0</maxlongitude>
</extent>
<coors> 29.0606,40.9889,29.1609,40.9858,29.1624,40.9453,29.0792,40.9631</coors>
</userline>
</linelist>
</response>
GetUserLine response returns in JSON format when the Typ
parameter is set as "JSON".
Below is an example for a GetUserLine request which is expected to return a response in JSON format .
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=GetUserLine&Typ=JSON&Id=1&WithCoors=1
The response will be as following:
{
"transactionid": "LBS_60616660",
"status": 0,
"userlines": [
{
"id": "49",
"name": "",
"type": 0,
"string1": "",
"string2": "",
"string3": "",
"string4": "",
"string5": "",
"string6": "",
"string7": "",
"string8": "",
"string9": "",
"number1": 0,
"number2": 0,
"number3": 0,
"number4": 0,
"number5": 0,
"number6": 0,
"number7": 0,
"number8": 0,
"number9": 0,
"latitude": 0.0,
"longitude": 0.0,
"extent": {
"minlatitude": 40.9453,
"minlongitude": 29.0606,
"maxlatitude": 40.9889,
"maxlongitude": 29.1624
},
"coors": "29.0606,40.9889,29.1609,40.9858,29.1624,40.9453,29.0792,40.9631"
}
]
}
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 codeerrdesc
: Error definitionError 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 Line Service provide to remove special line on database based on criterias which you can find below.
RemoveUserLine request must look like this:
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=RemoveUserLine&Typ=output_format&Id=lineid
Key
: LocationBox user key. (Register for user key) Cmd
: LocationBox service name. (RemoveUserLine)Typ
: Response format. (XML or JSON)Id
: ID of line.RemoveUserLine response returns in XML format when the Typ
parameter is set as "XML".
Below is an example for a RemoveUserLine request which is expected to return a response in XML format .
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=RemoveUserLine&Typ=XML&Id=1
The response will be as following:
<response>
<transactionid>LBS_37572451</transactionid>
<status>0</status>
<errno />
<errdesc />
</response>
RemoveUserLine response returns in JSON format when the Typ
parameter is set as "JSON".
Below is an example for a RemoveUserLine request which is expected to return a response in JSON format .
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=RemoveUserLine&Typ=JSON&Id=1
The response will be as following:
{
"transactionid": "LBS_37572454",
"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 codeerrdesc
: Error definitionError 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 Line List Service lists special lines on database that user gave based on criterias which you can find below.
UserLineList request must look like this:
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=UserLineList&Typ=output_format&WhereClause=whereclause&Detailed=detailed
Key
: LocationBox user key. (Register for user key) Cmd
: LocationBox service name. (UserLineList)Typ
: Response format. (XML or JSON)PointId
(optional): UserLine List interacting UserPoint Id.Latitude
(optional): UserLine List interacting point of latitude.Longitude
(optional): UserLine List interacting point of longitude.Detailed
(optional): Values greater than zero return the region list of the query in full detail. (Default value 0) WhereClause
(optional): Where clause in UserLine List fields. Note: whereclause is requires single quotes around text values like this (country = 'USA')UserLineList response returns in XML format when the Typ
parameter is set as "XML".
Below is an example for a UserLineList request which is expected to return a response in XML format.
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=UserLineList&Typ=XML&WhereClause=&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>4</type>
<extent>
<minlatitude>40.9453</minlatitude>
<minlongitude>29.0606</minlongitude>
<maxlatitude>40.9889</maxlatitude>
<maxlongitude>29.1624</maxlongitude>
</extent>
</item>
<item>
<id>2</id>
<name>Sample2</name>
<type>4</type>
<extent>
<minlatitude>40.1499535063903</minlatitude>
<minlongitude>26.4262958130633</minlongitude>
<maxlatitude>40.1502449094385</maxlatitude>
<maxlongitude>26.4266551505644</maxlongitude>
</extent>
</item>
<item>
<id>3</id>
<name>Sample3</name>
<type>4</type>
<extent>
<minlatitude>40.150060771316</minlatitude>
<minlongitude>26.4262743600781</minlongitude>
<maxlatitude>40.1501984279707</maxlongitude>
<maxlongitude>26.4267248727662</maxlongitude>
</extent>
</item>
</items>
</response>
UserLineList response returns in JSON format when the Typ
parameter is set as "JSON".
Below is an example for a UserLineList request which is expected to return a response in JSON format.
http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=UserLineList&Typ=JSON&WhereClause=&Detailed=5
The response will be as following:
{
"transactionid": "LBS_37572902",
"status": 0,
"items": [
{
"id": "1", "name": "Sample", "type": 4, "extent": { "minlatitude": 40.9453, "minlongitude": 29.0606, "maxlatitude": 40.9889, "maxlongitude": 29.1624
}
},
{
"id": "2", "name": "Sample2", "type": 4, "extent": { "minlatitude": 40.1499535063903, "minlongitude": 26.4262958130633, "maxlatitude": 40.1502449094385, "maxlongitude": 26.4266551505644
}
},
{
"id": "3", "name": "Sample3", "type": 4, "extent": { "minlatitude": 40.150060771316, "minlongitude": 26.4262743600781, "maxlatitude": 40.1501984279707, "maxlongitude": 26.4267248727662
}
}
}
]
}
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 codeerrdesc
: Error definitionError 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.