What3words Objects

HostedW3WResponse Harmony RightAddress what3words wrapper response.
StatusResponse Harmony RightAddress what3words wrapper status response.
Autosuggest The results of what3words suggest API.
Suggestion The individual result of what3words suggest API.
ConvertTo3WA The result of what3words 3wa API.
AvailableLanguages The result of what3words languages API.
ConvertToCoordinatesResponse The wrapper result of what3words coordinates API.
ConvertToCoordinates The result of what3words coordinates API.
GridSectionResponse The wrapper result of what3words gridsection API.
GridSection The results of what3words gridsection API for JSON format.
Line One line in a what3words grid section for a bounding box.
Coordinates One pair of latitude and longitude point from what3words.
Square The bounds of the grid square of a 3 words address.

HostedW3WResponse <<extends>> StatusResponse

A HostedW3WResponse object extends a StatusResponse object and is returned in all HTTP 200 what3words wrapper method response.

See StatusResponse for inherited attributes.

w3w

Type: what3words object An optional what3words object value.

JSON Representation


    "w3w": {
        "suggestions": [
            {
                "country": "AU",
                "nearestPlace": "Sydney, New South Wales",
                "words": "dice.back.lowest",
                "distanceToFocusKm": 0,
                "rank": 1,
                "language": "en"
            }
        ]
    }
    

StatusResponse

A StatusResponse object is always returned in the what3words wrapper method response.

status

Type: int The HTTP response status code, example: 200, 400.

code

Type: String The HTTP response status name, example: OK, BadClipToCountry or BAD_REQUEST.

timestamp

Type: LocalDateTime The timestamp when invoking the API.

messages

Type: List of String An optional error messages value. This will be returned if encountered an error from what3words wrapper service or from address service.

JSON Representation


    {
        "status": 200,
        "code": "OK",
        "timestamp": "2020-11-16 09:22:34",
        "w3w": {
            "suggestions": [
                {
                    "country": "AU",
                    "nearestPlace": "Sydney, New South Wales",
                    "words": "dice.back.lowest",
                    "distanceToFocusKm": 0,
                    "rank": 1,
                    "language": "en"
                },
                {
                    ....
                }
            ]
        }
    }
    

    {
        "status": 400,
        "code": "BadCoordinates",
        "messages": [
            "coordinates must be two comma separated lat,lng coordinates"    
        ],
        "timestamp": "2020-11-17 12:28:02"
    }

Autosuggest <<extends>> Response

An Autosuggest object extends a Response object and is returned from suggest API for HTTP 200 response.

suggestions

Type: List of what3words Suggestion An optional suggestions object value.

JSON Representation


    "w3w": {
        "suggestions": [
            {
                "country": "AU",
                "nearestPlace": "Sydney, New South Wales",
                "words": "dice.back.lowest",
                "distanceToFocusKm": 0,
                "rank": 1,
                "language": "en"
            }
        ]
    }
    

Suggestion

An Suggestion object is an individual result returned from suggest API for HTTP 200 response.

country

Type: String The country of this suggested 3 words address.

nearestPlace

Type: String The nearest place (such as a local town) of this suggested 3 words address.

words

Type: String The 3 words address.

distanceToFocusKm

Type: int The distance in km from the focus point to this suggested 3words address.

rank

Type: int The rank (order) of this suggested 3 words address for proximity relevance to the focus point.

language

Type: String The supported language for this suggested 3 words address.

JSON Representation


    "w3w": {
        "suggestions": [
            {
                "country": "AU",
                "nearestPlace": "Sydney, New South Wales",
                "words": "dice.back.lowest",
                "distanceToFocusKm": 0,
                "rank": 1,
                "language": "en"
            }
        ]
    }
    

ConvertTo3WA or ConvertToCoordinates <<extends>> Response

A ConvertTo3WA or ConvertToCoordinates has the same attributes. A ConvertTo3WA object extends a Response object and is returned from 3wa API for HTTP 200 response. A ConvertToCoordinates object extends a Response object and is returned from coordinates API for HTTP 200 response.

country

Type: String The country of this 3 words address.

square

Type: Square The bounds of the grid square of this 3 words address.

nearestPlace

Type: String The nearest place (such as a local town) of this 3 words address.

coordinates

Type: Coordinates The coordinates (latitude,longitude pairs in standard WGS-84) of this 3 words address.

words

Type: String The 3 words address.

language

Type: String The supported language for this 3 words address.

map

Type: String A link to what3words map for this 3 words address.

JSON Representation


    "w3w": {
        "country": "AU",
        "square": {
            "southwest": {
                "lng": 151.208268,
                "lat": -33.864435
            },
            "northeast": {
                "lng": 151.208301,
                "lat": -33.864408
            }
        },
        "nearestPlace": "Sydney, New South Wales",
        "coordinates": {
            "lng": 151.208285,
            "lat": -33.864422
        },
        "words": "dice.back.lowest",
        "language": "en",
        "map": "https://w3w.co/dice.back.lowest"
    }
    

ConvertToCoordinatesResponse <<extends>> HostedW3WResponse

A ConvertToCoordinatesResponse object extends a HostedW3WResponse object of ConvertToCoordinates object, and is returned from coordinates API for HTTP 200 response.

See HostedW3WResponse for inherited attributes.

hra

Type: List of Address An optional reverse geocode result for the latitude, longitude and country. It is returned when reverseGeocode is true.

JSON Representation


    "hra": [
        {
            "attributes": {
                "GNAFGroupPID": "Nsw2813775",
                "GNAFPIDPosition": "Doorstop",
                "ParcelID": "1//dp628553",
                "GNAFReliability": "2",
                "GNAFPointPID": "Gansw717802735",
                "GNAFPID": "Gansw717802735",
                "GNAFConfidence": "1",
                "GNAFLocalityPID": "Nsw3749",
                "Latitude": "-33.86440996",
                "Longitude": "151.20828704",
                "GeocodeLevel": "7",
                "MeshblockId": "10743110000"
            },
            "buildingName": "",
            "country": null,
            "eid": "6721786C850D16E4CEEE6DD98DA869B2DEC0193E94A58D2501BF03DF7F080A01",
            "flatUnitNumber": "",
            "flatUnitType": "",
            "floorLevelNumber": "1",
            "floorLevelType": "L",
            "fullAddress": "L 1 20 Bond Street, Sydney NSW 2000",
            "id": "GANSW717802735",
            "lotNumber": "",
            "postal": "",
            "postalNumber": "",
            "postalType": "",
            "postcode": "2000",
            "street": "Bond Street",
            "street2": null,
            "streetName": "Bond",
            "streetNumber": "20",
            "streetSuffix": "",
            "streetType": "Street",
            "subLocality": null,
            "subdwelling": "L 1"
        },
        {
            ....
        }
    ]
    

GridSectionResponse <<extends>> HostedW3WResponse

A GridSectionResponse object extends a HostedW3WResponse object. It is returned from gridsection API for HTTP 200 response. The returned w3w object depends on the format: it returns GridSection object for JSON format (default), while for GeoJSON format, it will return a Map of JSONObject.

See HostedW3WResponse for inherited attributes.

JSON Representation

With JSON format (default):


    "w3w": {
        "lines": [
            {
                "start": {
                    "lng": 151.208268,
                    "lat": -33.86440815006468
                },
                "end": {
                    "lng": 151.208301,
                    "lat": -33.86440815006468
                }
            },
            {
                "start": {
                    "lng": 151.20826838139777,
                    "lat": -33.864435
                },
                "end": {
                    "lng": 151.20826838139777,
                    "lat": -33.864408
                }
            },
            {
                ....                
            }
        ]
    }
    

With GeoJSON format:


    "w3w": {
        "features": [
            {
                "geometry": {
                    "coordinates": [
                        [
                            [
                                151.208268,
                                -33.86440815006468
                            ],
                            [
                                151.208301,
                                -33.86440815006468
                            ]
                        ],
                        [
                            [
                                151.20826838139777,
                                -33.864435
                            ],
                            [
                                151.20826838139777,
                                -33.864408
                            ]
                        ],
                        [
                                ....
                        ]
                    ],
                    "type": "MultiLineString"
                },
                "type": "Feature",
                "properties": {}
            }
        ],
        "type": "FeatureCollection"
    }

GridSection <<extends>> Response

A GridSection object extends a Response object and is returned from gridsection API for HTTP 200 response.

lines

Type: List of what3words Line An optional lines object value.

JSON Representation


    "lines": [
        {
            "start": {
                "lng": 151.208268,
                "lat": -33.86440815006468
            },
            "end": {
                "lng": 151.208301,
                "lat": -33.86440815006468
            }
        },
        {
            ....                
        }
    ]
    

Line

A Line object is returned as part of GridSection result from gridsection API for HTTP 200 response. It represents one line in the returned section of the 3m x 3m what3words grid for a bounding box.

start

Type: Coordinates An optional start object value for the start of a line.

end

Type: Coordinates An optional end object value for the end of a line.

JSON Representation


    {
        "start": {
            "lng": 151.208268,
            "lat": -33.86440815006468
        },
        "end": {
            "lng": 151.208301,
            "lat": -33.86440815006468
        }
    }
    

Coordinates

A Coordinates object is returned as part of Line result from gridsection API for HTTP 200 response, and as part of Square result from 3wa API and coordinates API for HTTP 200 response, It represents one pair of latitude and longitude point from what3words.

lng

Type: double An optional longitude value.

lat

Type: double An optional latitude value.

JSON Representation


    {
        "lng": 151.208268,
        "lat": -33.86440815006468
    }
    

Square

A Square object is returned as part of ConvertTo3WA result from 3wa API and ConvertToCoordinates result from coordinates API for HTTP 200 response, It represents the bounds of the grid square of a 3 words address.

southwest

Type: Coordinates An optional southwest object value for the South West point.

northeast

Type: Coordinates An optional northeast object value for the North East point.

JSON Representation


    {
        "southwest": {
            "lng": 151.208268,
            "lat": -33.864435
        },
        "northeast": {
            "lng": 151.208301,
            "lat": -33.864408
        }
    }