Home > API > Common > Validate address

Validate address

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.

PATH:

/api/v3/validate/address

REQUEST BODY SCHEMA:

customer
required

customer object

Customer

customerNumber

string <= 100 characters

Customer unique number

identificationNumber

string <= 20 characters

National ID number (if the customer is a physical person). Registration number (if the customer is a company).

salutation

string

Enum: Mr Mrs Miss

Salutation.

firstName
required

string <= 50 characters

First name. Everything over 50 characters will be truncated

lastName
required

string <= 50 characters

Last name. Everything over 50 characters will be truncated

companyName

string <= 50 characters

Purchasing company name. Required if customerCategory is 'Company'. Everything over 50 characters will be truncated.

email
required

string <= 255 characters

Email

phone

string <= 20 characters

Phone

mobilePhone

string <= 20 characters

Mobile phone

birthDate
required

string

Date of birth. Format is 'YYYY-MM-DD'. Not required if customerCategory is 'Company'.

customerCategory
required

string

Enum: Company Person

Customer category.

address
required

address object

Address

street
required

string <= 100 characters

Name of street or packstation

streetNumber

string <= 10 characters

Street or packstation number

streetNumberAdditional

string <= 10 characters

Additional street number

postalCode
required

string <= 10 characters

Postal code

postalPlace
required

string <= 100 characters

Postal place

countryCode
required

string

Enum: NO SE FI DK DE AT CH NL BE

Country code

careOf

string <= 50 characters

Care of. Intermediary who is responsible for transferring a piece of mail between the postal system and the final addressee. For example Jane c/o John (“Jane at John's address”).This field has to be used for company, authority and organization names as well - e. g. "Sportverein Blau-Weiß e.V.

riskData
required

riskData object

Risk related data. Merchants can do external risk checks and provide that information to AfterPay.

existingCustomer

boolean

Is customer an existing customer for merchant

verifiedCustomerIdentification

boolean

Is identification verified

marketingOptIn

boolean

Shows if merchant is allowed to send marketing information to customer

customerSince

string

Since when customer has been merchant's client

customerClassification

string <= 255 characters

Customer reputation (e.g. VIP client)

acquisitionChannel

string

Enum: NotSet Advertisment SocialNetwork Direct SearchEngine Other

Specify the channel which consumer has used for accessing merchant page

hasCustomerCard

boolean

Shows if customer has loyalty card

customerCardSince

string

The date when the loyalty card was issued to the customer

customerCardClassification

string

Specifies the level of the loyalty card (e.g Gold member).For DE, AT, CH, this must be an integer from 1 to 5, where 5 is the highest VIP level.

profileTrackingId

string <= 50 characters

Unique Id of the device for profile tracking

ipAddress
required

string <= 39 characters

Customer’s IP address

numberOfTransactions

integer

Total number of successful purchases that have been made by the specific consumer

customerIndividualScore

string

The customer's individual risk score provided by the merchant.Accepts a number from -10000 to 10000 (can be encased in quotation marks or not), or a single case-insensitive letter from 'a' to 'z'.

userAgent

string <= 4096 characters

UserAgent of this specific consumer

conversationLanguage

string

Enum: NO SV SE FI DA DK EN DE NL FR

Conversation language. 'SE' and 'DK' are obsolete values, and will be removed in the future. Use 'SV' instead of 'SE', and 'DA' instead of 'DK'.

distributionType

string

Enum: Paper Email Sms

Specifies how information (invoices, notices, etc.) will be distributed to customer.

vatId

string <= 50 characters

VAT registration number, the unique number that identifies a business. VatId is a mandatory field for processing B2B transactions for Germany.

RESPONSES:

200 OK

RESPONSE SCHEMA:

isValid

boolean

Is response valid

correctedAddress

correctedAddress object

Corrected address

street
required

string <= 100 characters

Name of street or packstation

streetNumber

string <= 10 characters

Street or packstation number

streetNumberAdditional

string <= 10 characters

Additional street number

postalCode
required

string <= 10 characters

Postal code

postalPlace
required

string <= 100 characters

Postal place

countryCode
required

string

Enum: NO SE FI DK DE AT CH NL BE

Country code

careOf

string <= 50 characters

Care of. Intermediary who is responsible for transferring a piece of mail between the postal system and the final addressee. For example Jane c/o John (“Jane at John's address”). This field has to be used for company, authority and organization names as well - e. g. "Sportverein Blau-Weiß e.V.

riskCheckMessages

array of riskCheckMessages

Risk check messages

Array () [
type

string

Enum: BusinessError TechnicalError NotificationMessage

Message type

code

string <= 100 characters

Confirmation or error code

message

string <= 4096 characters

Message content

customerFacingMessage

string <= 4096 characters

Message to display to customer

actionCode

string

Enum: Unavailable AskConsumerToConfirm AskConsumerToReEnterData OfferSecurePaymentMethods RequiresSsn AskConsumerToIdentify

Possible next action to make

fieldReference

string <= 100 characters

Reference to field that caused an error


]
400 Model validation failed.

RESPONSE SCHEMA:

Array () [
type

string

Enum: BusinessError TechnicalError NotificationMessage

Message type

code

string <= 100 characters

Confirmation or error code

message

string <= 4096 characters

Message content

customerFacingMessage

string <= 4096 characters

Message to display to customer

actionCode

string

Enum: Unavailable AskConsumerToConfirm AskConsumerToReEnterData OfferSecurePaymentMethods RequiresSsn AskConsumerToIdentify

Possible next action to make

fieldReference

string <= 100 characters

Reference to field that caused an error

]
401 Authorization has been denied for this request.
500 Internal server error.

Path

post

/api/v3/validate/address

Request samples

  • {
    • "customer": { ...
      • "customerNumber": "string",
      • "identificationNumber": "string",
      • "salutation": "string",
      • "firstName": "string",
      • "lastName": "string",
      • "companyName": "string",
      • "email": "string",
      • "phone": "string",
      • "mobilePhone": "string",
      • "birthDate": "string",
      • "customerCategory": "string",
      • "address": { ...
        • "street": "string",
        • "streetNumber": "string",
        • "streetNumberAdditional": "string",
        • "postalCode": "string",
        • "postalPlace": "string",
        • "countryCode": "string",
        • "careOf": "string"
        },
      • "riskData": { ...
        • "existingCustomer": true,
        • "verifiedCustomerIdentification": true,
        • "marketingOptIn": true,
        • "customerSince": "string",
        • "customerClassification": "string",
        • "acquisitionChannel": "string",
        • "hasCustomerCard": true,
        • "customerCardSince": "string",
        • "customerCardClassification": "string",
        • "profileTrackingId": "string",
        • "ipAddress": "string",
        • "numberOfTransactions": 1,
        • "customerIndividualScore": "string",
        • "userAgent": "string"
        },
      • "conversationLanguage": "string",
      • "distributionType": "string",
      • "vatId": "string"
      }
  • }

Response samples

200400
  • {
    • "isValid": true,
    • "correctedAddress": { ...
      • "street": "string",
      • "streetNumber": "string",
      • "streetNumberAdditional": "string",
      • "postalCode": "string",
      • "postalPlace": "string",
      • "countryCode": "string",
      • "careOf": "string"
      },
    • "riskCheckMessages": [ ...
      • {
        • "type": "string",
        • "code": "string",
        • "message": "string",
        • "customerFacingMessage": "string",
        • "actionCode": "string",
        • "fieldReference": "string"
        }
      ]
    }
  • [
      ...
      • {
        • "type": "string",
        • "code": "string",
        • "message": "string",
        • "customerFacingMessage": "string",
        • "actionCode": "string",
        • "fieldReference": "string"
        }
    ]