ValidateAddress

Summary

Check of the delivered customer addresses as well as a phonetic and associative identification of duplicates. Additionally, checks of client specific negative or positive lists can be processed. Usually, the AddressCheck is used for the pure verification of the address data e.g. for registration processes.

Resource URL /api/v3/validate/address
HTTP method POST
Content type application/json; charset=utf-8

Input parameters

Parameter name Location Type / Model Description
request Body ValidateAddressRequest required

Responses

HTTP status code Model Comment
OK(200) ValidateAddressResponse Check address response
BadRequest (400) array of ResponseMessage Request failed. Check response model for list of Errors.
Unauthorized (401) API user is unauthorized. Make sure X-Auth-Key header is sent.
InternalServerError (500) Request failed due internal error. Retry request later.

Examples

{
  "customer": {
    "customerNumber": "CUSTOMER1000",
    "identificationNumber": "SSN198411090111",
    "salutation": "Mr",
    "firstName": "Santa",
    "lastName": "Claus",
    "email": "santa.claus@northpole.com",
    "phone": "+3725551234",
    "mobilePhone": "06669874",
    "birthDate": "1954-12-24T00:00:00Z",
    "customerCategory": "Person",
    "address": {
      "street": "Ice road",
      "streetNumber": "55",
      "streetNumberAdditional": "a",
      "postalCode": "10088",
      "postalPlace": "North pole",
      "countryCode": "NO"
    }
  }
}
{
  "isValid": true,
  "correctedAddress": {
    "street": "Ice road",
    "streetNumber": "55",
    "streetNumberAdditional": "a",
    "postalCode": "10088",
    "postalPlace": "North pole",
    "countryCode": "NO"
  }
}
var AfterPayApi = require("./afterPay.js");
var apiKeyAuthentication = require("./api_key_filter");

var key = 'CHANGE_ME';
var client = new AfterPayApi().addFilter(apiKeyAuthentication.create(key));
var request = {
  "customer": {
    "customerNumber": "CUSTOMER1000",
    "identificationNumber": "SSN198411090111",
    "salutation": "Mr",
    "firstName": "Santa",
    "lastName": "Claus",
    "email": "santa.claus@northpole.com",
    "phone": "+3725551234",
    "mobilePhone": "06669874",
    "birthDate": "1954-12-24T00:00:00Z",
    "customerCategory": "Person",
    "address": {
      "street": "Ice road",
      "streetNumber": "55",
      "streetNumberAdditional": "a",
      "postalCode": "10088",
      "postalPlace": "North pole",
      "countryCode": "NO"
    }
  }
};

client.Common.validateAddress(request, 
  function(err, response, httpRequest, httpResponse) {
  });
$LOAD_PATH.unshift File.dirname(__FILE__)
require 'after_pay.rb'
require 'json'

client = AfterPayApi::AfterPay.new(AfterPayApi::ApiKeyCredentials.new('YOUR_API_KEY'))

requestAsJson = '{"customer":{"customerNumber":"CUSTOMER1000","identificationNumber":"SSN198411090111","salutation":"Mr","firstName":"Santa","lastName":"Claus","email":"santa.claus@northpole.com","phone":"+3725551234","mobilePhone":"06669874","birthDate":"1954-12-24T00:00:00Z","customerCategory":"Person","address":{"street":"Ice road","streetNumber":"55","streetNumberAdditional":"a","postalCode":"10088","postalPlace":"North pole","countryCode":"NO"}}}'
request = AfterPayApi::Models::ValidateAddressRequest.deserialize_object(JSON.parse(requestAsJson))


client.common.validateAddress_async(request).then{|response|

}.execute.wait
var key = "CHANGE_ME";
var client = new CommonApi(new Configuration() { DefaultHeader = new Dictionary<string, string>() { { "X-Auth-Key", key} } });

var request = new ValidateAddressRequest(){
  Customer = new CheckoutCustomer() {
    CustomerNumber = "CUSTOMER1000",
    IdentificationNumber = "SSN198411090111",
    Salutation = Salutation.Mr,
    FirstName = "Santa",
    LastName = "Claus",
    Email = "santa.claus@northpole.com",
    Phone = "+3725551234",
    MobilePhone = "06669874",
    BirthDate = "1954-12-24 00:00:00",
    CustomerCategory = CustomerCategory.Person,
    Address = new Address() {
      Street = "Ice road",
      StreetNumber = "55",
      StreetNumberAdditional = "a",
      PostalCode = "10088",
      PostalPlace = "North pole",
      CountryCode = CountryCode.NO
    }
  }
};

var responce = client.CommonValidateAddress(request);