Depending on applicable regulations or business limitations, specific API requests may not be available for your use.

Primary Address Regex Validation

This request validates a primary address for PO Box and ZIP code rules. The API call gives a 200 for valid zipcode and line1 address. A 400 is returned with a validation error message if the primary address would fail during member creation. The zip code is validated against these rules

Request URL

Syntax POST /restapi/utils/addressregex/
Example URL https://api.uat.foliofn.com/restapi/utils/addressregex

Request Data Fields

Field Type Description Required Value
line1 String Line 1 of the address Yes
line2 String Line 2 of the address No
city String City Yes
state String Two character code for State name Yes
zipcode String Country code for the address. Note that primary address must be in the U.S. Yes

Response Data Fields

Field Type Description Value
type String VALIDATION_FIELD VALIDATION_FIELD
field String Field where the validation failed zipcode / line1
errorCode String Error Message Refer error codes below

Sample Request and Examples

Invalid Address Request


POST https://api.uat.foliofn.com/restapi/utils/addressregex
Content-Type: application/json
{
  "line1": "P.O. Box 123",
  "city": "samplecity",
  "state": "VA",
  "country": "US",
  "zipcode": "123ab4343"
}

Invalid Address Response


HTTP/1.1 400 Bad Request
Date: Wed, 15 Nov 2017 15:22:37 GMT
Transfer-Encoding: chunked
Content-Type: application/json
Strict-Transport-Security: max-age=157680000
[
	{
      "type": "VALIDATION_FIELD",
      "field": "zipcode",
      "errorCode": "invalid.zipcode"
	},
	{
      "type": "VALIDATION_FIELD",
      "field": "line1",
      "errorCode": "member.primary.address.cannot.be.po.box"
	}
]

Valid Address Request


POST https://api.uat.foliofn.com/restapi/utils/addressregex
Content-Type: application/json
{
  "line1": "123 Broadway Street",
  "city": "testcity",
  "state": "VA",
  "country": "US",
  "zipcode": "12345"
}

Valid Address Response


HTTP/1.1 200 OK
Date: Wed, 15 Nov 2017 15:23:16 GMT
Content-Length: 0
Content-Language: en

Error Codes

HTTP Status Code Field Code Message Description
403 - - - The specified user is not allowed to use this request.
400 zipcode cannot.be.null - Zip Code cannot be null
400 zipcode invalid.zipcode - The Zip Code entered in invalid
400 line1 cannot.be.null - Line 1 cannot be null
400 line1 member.primary.address.cannot.be.po.box - Line 1 does not allow PO Box address.

Change Log

03/12/2020

  1. Remove extra spaces, especially at the bottom

11/24/2017

  1. New documentation

Getting Started

REST APIs

Resources