API

LocationBox API

TrafficTmcFlowData


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (TrafficTmcFlowData)
Typ: Response format. (XML or JSON)
TmcKodList: TMC Code.

Response Parameters


XML Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=TrafficTmcFlowData&Typ=JSON&TmcKodList=40,41

The response will be as following:


<response>
 <transactionid>LBS_50366390</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <infos>
  <info>
  <tmccode>40</tmccode>
  <traveltime>137.0</traveltime>
  <speed>49</speed>
  <delay>70.0</delay>
  <optimaltraveltime>67.0</optimaltraveltime>
  <optimalspeed>100</optimalspeed>
  <lengthmeter>1876</lengthmeter>
  <linkinjam>0</linkinjam>
  <info />
  <info>
  <tmccode>41</tmccode>
  <traveltime>134.0</traveltime>
  <speed>19</speed>
  <delay>109.0</delay>
  <optimaltraveltime>25.0</optimaltraveltime>
  <optimalspeed>100</optimalspeed>
  <lengthmeter>716</lengthmeter>
  <linkinjam>1</linkinjam>
  <info />
 <infos />
</response>

JSON Response

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

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

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=TrafficTmcFlowData&Typ=JSON&TmcKodList=40,41

The response will be as following:


{ "transactionid": "LBS_50366391", "status": 0, "infos": [ { "tmccode": "40", "traveltime": "137.0", "speed": 49, "delay": 70.0, "optimaltraveltime": 67.0, "optimalspeed": 100, "lengthmeter": 1876, "linkinjam": 0 } { "tmccode": 41, "traveltime": 134.0, "speed": 19, "delay": 109.0, "optimaltraveltime": 25.0, "optimalspeed": 100, "lengthmeter": 716, "linkinjam": 1 } ] }

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.

tmccode: TMC code.
traveltime: Travel time for tmc code.
speed: Speed of TMC.
delay: Delay of TMC.
optimaltraveltime: Optimal travel time of TMC.
optimalspeed: Optimal speed of TMC.
lengthmeter: Length meter of TMC.
linkinjam: Link in jam of TMC.