Validate an E911 Address

Lets you validate an E911 address whether it is a new or an existing address on your account.

Endpoint

POST /e911s/validate

Body Parameters

  • data
    object REQUIRED

    E911 object to be validated which is composed of type and attributes.

    • type
      string REQUIRED

      Object type. This will always be e911.

    • attributes
      object REQUIRED

      Object composed of the following required attributes of an E911 object:

      • label string- Unique friendly name for the E911 address to be validated.

      • first_name string- First name associated with the E911 address to be validated.

      • last_name string- Last name associated with the E911 address to be validated.

      • street_number integer- The street number of the E911 address to be validated.

      • street_name string- The street name of the E911 address to be validated.

      • address_type string- Address type for the E911 address to be validated and added to your account, if applicable. You can set the address type to any of the following case-insensitive options:

        • Apartment
        • Basement
        • Building
        • Department
        • Floor
        • Front
        • Key
        • Lobby
        • Lot
        • Lower
        • Office
        • Penthouse
        • Pier
        • Rear
        • Room
        • Side
        • Slip
        • Space
        • Stop
        • Suite
        • Trailer
        • Unit
        • Upper
      • address_type_number integer- Number associated with the address type. Required if the E911 address to be validated contains an address type.

      • city string- City where the E911 address to be validated is located.

      • state string- Two-letter abbreviated US state or Canadian province or territory in uppercase where the E911 city is located.

      • country string- Two-letter abbreviated country code in uppercase where the city and state or province of the E911 address are located. Valid options are US for USA and CA for Canada.

      • zip string- Valid US or Canada zip code for the E911 address to be validated. For example, 98104 for the US and M4C 5K7 for Canada.

Response Fields

On success, the HTTP status code in the response header is 200 OK and the response body contains an e911 object in JSON format. On error, the header status code is an error code and the response body contains an array of error objects.

Example Request

POST /v2/e911s/validate HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json

{
  "data": {
    "type": "e911",
    "attributes": {
      "label": "First e911 record",
      "first_name": "Bob",
      "last_name": "Law",
      "street_number": "123",
      "street_name": "Smith St",
      "city": "Seattle",
      "state": "WA",
      "country": "US",
      "zip": "98101"
    }
  }
}

                        

Example Request

curl -X POST https://api.flowroute.com/v2/e911s/validate -u accessKey:secretKey -d '{"data":{"type": "e911", "attributes":{"label": "First e911 record", "first_name": "Bob", "last_name": "Law", "street_number": "123", "street_name": "Smith St", "city": "Seattle", "state": "WA", "country": "US", "zip": "98101"}}}' -H 'Content-Type':'application/vnd+api.json'

                        

Example Request

This assumes that you have the Python API Wrapper installed and set up. The following example is from cnam_demo.py. Please make sure to use neutral (vertical) quotes in your request. Smart quotes are known to cause errors.

print("\n--Validate an Address")
try:
    result = e911s_controller.validate_address(
                                               label="Test Address",
                                               first_name="Chris",
                                               last_name="Smith",
                                               street_name="3rd Ave",
                                               street_number="1182",
                                               city="Seattle",
                                               state="WA",
                                               country="CA",
                                               zipcode="98101")
    pprint.pprint(result)
except Exception as e:
    print(str(e))
   
                        

Example Responses

200 OK

{
  "data": {
    "attributes": {
      "city": "Seattle",
      "country": "US",
      "first_name": "Bob",
      "label": "First e911 record",
      "last_name": "Law",
      "state": "WA",
      "street_name": "Smith St",
      "street_number": 123,
      "zip": 98101
    },
    "id": 20217,
    "links": {
      "self": "https://api.flowroute.com/v2/e911s/20217"
    },
    "type": "e911"
  }
}

            

400 NOT FOUND

--Validate an Address
HTTP response not OK.
{"errors":[{"detail":"Could not geocode this address. Please check the validity of your address.","id":"7fcfd1cd-486b-4159-8484-b710bd4bbab4","status":400,"title":"Client Error"}]}

                    

422 UNPROCESSABLE ENTITY

{
    "errors": [
        { 
            "detail": "Duplicate e911 address found on your account.", 
            "id": "d8cc519f-6640-42f0-9feb-768775c85d96", 
            "status": 400, 
            "title": "Client Error" 
        }
    ]
}