The /format endpoint is used in the Singleline, Typedown, Verification, Keyfinder and Intuitive search types.
Name | Type | Description |
---|---|---|
Monikers (Optional) |
string | This is the moniker that will have the action performed upon it. |
Timeout-Seconds (Optional) |
integer | Maximum time you are prepared to wait for a response, expressed in seconds. Acceptable values: 1-60. If a timeout occurs, an HTTP status code of 408 - Request Timeout will be returned. The default value of this setting is 15. |
Diagnostics (Optional) |
boolean | Enable diagnostic info The default value of this setting is False. |
In the request body you can specify:
Name | Type | Description | |
---|---|---|---|
layout | string | This contains the set of layouts that are valid. |
Name | Type | Description |
---|---|---|
Monikers (Optional) |
string | This is the moniker that will have the action performed upon it. |
Timeout-Seconds (Optional) |
integer | Maximum time you are prepared to wait for a response, expressed in seconds. Acceptable values: 1-60. If a timeout occurs, an HTTP status code of 408 - Request Timeout will be returned. The default value of this setting is 15. |
Diagnostics (Optional) |
boolean | Enable diagnostic info The default value of this setting is False. |
The response from the API returns the below fields within a result
object. Should an error occur, an error
object is returned instead.
The address elements of the Format result are:
Name | Type | Description | |
---|---|---|---|
address_lines | label | string | This defines a text label for the line, which will describe the contents of the line. |
line | string | This defines the final formatted address line, as described by the layout that was used to format the address result. | |
has_overflown_to_other_line | boolean | This element signifies that some address elements could not be formatted upon this line, and so had to overflow onto other lines. | |
has_truncated_lines | boolean | This element signifies that some address elements were truncated when formatted upon this line. | |
dpv_status | string | The dpv status of the Search result are:
|
|
has_missing_sub_premise | boolean | This attribute indicates that the address is a large volume receiver and may be missing subpremises information. |
The following response codes can be returned by the API:
Status Code | Reason phrase | Description |
---|---|---|
200 | Success | Request processed successfully. |
400 | Bad Request | Request failed due to malformed syntax. |
408 | Request Timeout | Response was not returned within the timeout allowance. |
500 | Internal Server Error | The server has encountered an error. |