The /lookup endpoint is used in the Lookup search type.
| Name | Type | Description |
|---|---|---|
| Diagnostics (Optional) |
boolean | Enable diagnostic info The default value of this setting is False. |
In the request body you can specify:
| Name | Type | Description | |
|---|---|---|---|
| datasets | collection | The collection of datasets you want to search against. | |
| key | type (Optional) |
string | Specify the type of lookup you want to do.Currently only `postal_code` |
| value | string | Specify the postcode for your lookup. | |
| Name | Type | Description |
|---|---|---|
| Diagnostics (Optional) |
boolean | Enable diagnostic info The default value of this setting is False. |
In the response body you can specify:
| Name | Type | Description | |
|---|---|---|---|
| type | string | This contains the individual results from the postcode lookup | |
| fields | type | string | This represents an individual record from the postcode lookup results' list. |
| value | string | This defines the total number of results returned from the search | |
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. |