Verify Address

Verify an entity's address by proximity

The verify address endpoint (/business/verify-address) enables you to verify the address of an entity via coordinates (longitude and latitude).

An entity in this case would typically refer to a user but can represent anything else you want to verify the address of.

The verification works by calculating the proximity between a given address and a latitude and longitude. The address is verified if the address and the coordinate point match and the differences in distance between the two points falls within a reasonable margin of error.

Endpoint

POST https://api.amala.cloud/v1/business/verify-address

Requires the api_key as a query parameter and the following fields in the request body:

  • latitude - The latitude of the location (should be between -90 and 90)

  • longitude - The longitude of the location (should be between -180 and 180)

  • state - Location state

  • lga - Location LGA

  • street - Complete address line of the location

Example request

curl -X POST "https://api.amala.cloud/v1/business/verify-address?api_key=94c9a525f3d3ac72e9f953d0be4dfea1"\
-H "Content-Type: application/json"\
-d '{"latitude":"9.031960324582464", "longitude":"7.473128351428159", "country": "Nigeria", "state": "fct", "lga":"abuja municipal area council", "street": "area 1 shopping plaza"}'

Response

Status: 200 OK

Body:

{
    "status": "success",
    "verified": true
}

Response status codes

200 - Ok
400 - Bad Request
401 - Unauthorized
500 - Internal Error

Last updated