Validate Address

Validate details for an address

/addresses/validate

POST 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). Also see API Pricing for usage fees.

Headers

Name
Type
Description

Authorization*

String

Set value to Bearer SECRET_KEY

Content-Type

String

Set value to application/json

Request Body

Name
Type
Description

city*

String

Address city.

country*

String

ISO 2 country code for address. Must be one of the addresses available here.

line1*

String

Street address. Required for arranging pickup / delivery.

line2

String

Second line of street address.

state*

String

State of street address.

zip*

String

Zip / Postal code. Required for arranging pickup / delivery.

{
    "status": true,
    "message": "Address validated successfully",
    "data": {
        "is_valid": true,
        "original_address": {
            "city": "London",
            "state": "London",
            "country": "GB",
            "email": "[email protected]",
            "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"
        }
    }
}

Last updated

Was this helpful?