API

LocationBox API

What3Words

What3Words service provides for taking a 3 word address and turning it into a pair of latitude, longitude coordinates or
taking latitude, longitude coordinates and turning them into a 3 word address.(Click for more information)

This service is working, must be defined WHAT3WORDS package.

List of supported What3Words languages


English(en), German(de), Spanish(es), French(fr), Italian(it), Portuguese(pt), Russian(ru), Swedish(sv), Swahili(sw), Turkish(tr)


1. Convert 3 words to position


A What3Words request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=What3Words&Typ=output_format&Lang=lang&Words=threewords


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (What3Words)
Typ: Response format. (XML or JSON)
Lang: The language of words.
Words: Three key words that describe the desired point.

Response Parameters


XML Response

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

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

LANG=EN

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=What3Words&Typ=xml&Lang=en&Words=index.home.raft

The response will be as following:

<response>
 <transactionid>LBS_83255</transactionid>
 <status>0</status>
 <errno/><errdesc/>
 <type>3 words</type>
 <words>index,home,raft</words>
 <latitude>51.521251</latitude>
 <longitude>-0.203586</longitude>
 <language>en</language>
</response>

LANG=TR

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=What3Words&Typ=xml&Lang=tr&Words=kocan,mide,ustam

The response will be as following:

<response>
 <transactionid>LBS_83255</transactionid>
 <status>0</status>
 <errno/><errdesc/>
 <type>3 words</type>
 <words>kocan,mide,ustam</words>
 <latitude>51.521251</latitude>
 <longitude>-0.203586</longitude>
 <language>tr</language>
</response>

JSON Response

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

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

LANG=EN

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=What3Words&Typ=json&Lang=en&Words=index.home.raft

The response will be as following:

{"transactionid":"LBS_83254","status":0,"type":"3 words",
"words":"index,home,raft","latitude":51.521251,"longitude":-0.203586,"language":"en"}


LANG=TR

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=What3Words&Typ=json&Lang=tr&Words=kocan,mide,ustam

The response will be as following:

{"transactionid":"LBS_83254","status":0,"type":"3 words",
"words":"kocan,mide,ustam","latitude":51.521251,"longitude":-0.203586,"language":"tr"}


2. Convert position to 3 words


A What3Words request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=What3Words&Typ=output_format&Lang=lang&Position=latitude,longitude


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (What3Words)
Typ: Response format. (XML or JSON)
Lang: The language of words.
Position: The latitude and longitude.

Response Parameters


XML Response

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

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

LANG=EN

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=What3Words&Typ=xml&Lang=en&Position=51.521521,0.203586

The response will be as following:

<response>
 <transactionid>LBS_83255</transactionid>
 <status>0</status>
 <errno/><errdesc/>
 <words>that,went,drive</words>
 <latitude>51.521251</latitude>
 <longitude>0.203586</longitude>
 <language>en</language>
</response>

LANG=TR

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=What3Words&Typ=xml&Lang=tr&Position=51.521521,0.203586

The response will be as following:

<response>
 <transactionid>LBS_83255</transactionid>
 <status>0</status>
 <errno/><errdesc/>
 <words>ticari,dvme,kocan</words>
 <latitude>51.521251</latitude>
 <longitude>0.203586</longitude>
 <language>tr</language>
</response>

JSON Response

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

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

LANG=EN

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=What3Words&Typ=json&Lang=en&Position=51.521521,0.203586

The response will be as following:

{"transactionid":"LBS_83254","status":0,
"words":"that,went,drive","latitude":51.521251,"longitude":0.203586,"language":"en"}


LANG=TR

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=What3Words&Typ=json&Lang=tr&Position=51.521521,0.203586

The response will be as following:

{"transactionid":"LBS_83254","status":0,
"words":"ticari,dvme,kocan","latitude":51.521251,"longitude":0.203586,"language":"tr"}


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.