# Validate Address

## /addresses/validate

<mark style="color:green;">`POST`</mark> `https://api.terminal.africa/v1/addresses/validate`

This endpoint allows you to validate the details of any global address. For list of accepted countries check ([Validation Countries](/tship/miscallaneous/validation-countries.md)). Also see [API Pricing](/tship/miscallaneous/api-pricing.md) for usage fees.

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Set value to `Bearer SECRET_KEY` |
| Content-Type                                    | String | Set value to `application/json`  |

#### Request Body

| Name                                      | Type   | Description                                                                                                                  |
| ----------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| city<mark style="color:red;">\*</mark>    | String | Address city.                                                                                                                |
| country<mark style="color:red;">\*</mark> | String | ISO 2 country code for address. Must be one of the addresses available [here](/tship/miscallaneous/validation-countries.md). |
| line1<mark style="color:red;">\*</mark>   | String | Street address. Required for arranging pickup / delivery.                                                                    |
| line2                                     | String | Second line of street address.                                                                                               |
| state<mark style="color:red;">\*</mark>   | String | State of street address.                                                                                                     |
| zip<mark style="color:red;">\*</mark>     | String | Zip / Postal code. Required for arranging pickup / delivery.                                                                 |

{% tabs %}
{% tab title="200: OK Address validated successfully" %}

```javascript
{
    "status": true,
    "message": "Address validated successfully",
    "data": {
        "is_valid": true,
        "original_address": {
            "city": "London",
            "state": "London",
            "country": "GB",
            "email": "claudettearnold@hotmail.co.uk",
            "first_name": "Claudette",
            "is_residential": true,
            "last_name": "Arnold",
            "line1": "43 northumberland park",
            "line2": "",
            "phone": "+44 7908908329",
            "zip": "N17 OTB",
            "user": "USER-27450202164"
        },
        "validation_results": {
            "country_valid": true,
            "city_valid": true,
            "state_valid": true,
            "address_valid": true,
            "zip_valid": true
        },
        "validation_messages": [
            {
                "code": "POSTAL_MISMATCH",
                "field": "postalCode",
                "severity": "warning",
                "message": "The postal code was corrected.",
                "meta": {
                    "inputPostal": "N17 OTB",
                    "updatedPostal": "N17 0TB"
                }
            }
        ],
        "suggestion_provided": true,
        "suggested_address": {
            "line1": "43 northumberland park",
            "city": "London",
            "zip": "N17 OTB",
            "country": "GB"
        }
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.terminal.africa/tship/address/validate-address.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
