The service will attempt to validate the supplied postcode. The postcode can be supplied in any format, so CH2 4NE and ch24ne will both be accepted. If the postcode is valid, a version of the same postcode with standardised formatting will be returned.
Whether or not the supplied postcode is valid, a list of possible alternative postcodes will also be returned. These will be postcodes that could be possible mistypings of the supplied postcode and could be offered to the user as suggested corrections, especially when the supplied postcode is flagged as invalid.
To connect to this service you'll need to use one of these endpoints:
| Protocol | URL |
|---|---|
| JSON |
JSON
https://webservices.data-8.co.uk/PostcodeVerify/IsValid.json |
| OPEN API |
OPEN API
https://webservices.data-8.co.uk/swagger/PostcodeVerify/swagger.json |
| SOAP |
SOAP
https://webservices.data-8.co.uk/postcodeverify.asmx |
| MCP |
MCP
https://webservices.data-8.co.uk/mcp/postcodeverify
is_valid) |
| Name | Description |
|---|---|
| username | username
See the available authentication methods. If you are using username & password authentication, specify the username to authenticate as. If you are using API Key authentication and you are not using the JSON, Javascript or ADO APIs, use your API Key here with the prefix |
| password | password
If you are using username & password authentication, specify the password to use for authentication. Otherwise leave this blank. |
| postcode | postcode
The postcode to verify |
| options | options
An array of options that control further details of how this method operates. See the |
option parameter. Each option is specified as a key/value pair.
The list of available names is shown below, along with a description of the allowable values for that name.
| Name | Description |
|---|---|
| Common Options | |
| ApplicationName |
ApplicationName
Gives the name of the calling application - used to break down usage by application in the usage reports on the dashboard.
|
| Name | Description |
|---|---|
| Status | Status
Indicates whether the method call was successful, or if some error occurred. If the |
| ValidPostcode | ValidPostcode
Indicates if the supplied |
| FormattedPostcode | FormattedPostcode
The supplied |
| AlternativePostcodes | AlternativePostcodes
A list of other valid postcodes which are potential mistypings of the supplied |
Each request to this method consumes 1 PostcodeVerify credit.
This method has a maximum execution time of 1 second.
This is a fail-safe limit only - most requests are expected to return much quicker than this. If the time limit is reached, the response will be returned with a Status.Success value of false and you will not be charged.
Request Format
{
"postcode": "CH2 4NE",
"options": {}
}
Response Format
{
"Status": {
"Success": true,
"CreditsRemaining": 1000
},
"ValidPostcode": true,
"FormattedPostcode": "CH2 4NE",
"AlternativePostcodes": [
"CA2 4NE",
"CH2 4NE",
"CV2 4NE",
"CH1 4NE",
"CH42 4NE",
"CH5 4NE",
"CH7 4NE",
"CH2 1NE",
"CH2 2NE",
"CH2 4EN",
"CH2 4AE",
"CH2 4NA",
"CH2 4BE",
"CH2 4NB",
"CH2 4DE",
"CH2 4ND",
"CH2 4EE",
"CH2 4FE",
"CH2 4NG",
"CH2 4HE",
"CH2 4NH",
"CH2 4JE",
"CH2 4NJ",
"CH2 4LE",
"CH2 4NL",
"CH2 4NN",
"CH2 4PE",
"CH2 4NP",
"CH2 4QE",
"CH2 4NQ",
"CH2 4RE",
"CH2 4NR",
"CH2 4NS",
"CH2 4TE",
"CH2 4NT",
"CH2 4NU",
"CH2 4NW",
"CH2 4NX",
"CH2 4NY",
"CH2 4NZ"
]
}
Depending on your chosen authentication method you will need to modify this request slightly:
API Key
https://webservices.data-8.co.uk/PostcodeVerify/IsValid.json?key=your-api-keyand do NOT include the
username or password properties in the request JSON document.
Username and Password
https://webservices.data-8.co.uk/PostcodeVerify/IsValid.jsonand include
username and password properties in the request JSON document.Do not use for client-side requests!
JWT Token
https://webservices.data-8.co.uk/PostcodeVerify/IsValid.jsonInclude the JWT token in the request headers as:
Authorization: Bearer your-jwt-token| Parameter | Value |
|---|---|
| Parameters | |
| postcode | postcode
|
| Common Options | |
| ApplicationName |
ApplicationName
|
Credits Remaining Today: 5 | |