Data Validations
Account Data Validation Criteria (Europe)
As part of Alpaca Europe's regulatory obligation to comply with reporting requirements defined by the European General Data Protection Regulation (GDPR), the anti-money laundering (AML) mandates, and the Comisión Nacional del Mercado de Valores (CNMV) under the MiFID II framework, we are required to collect and submit accurate user information. To avoid errors and potential delays with account opening and AML screening, data must be provided in the correct format at the time of account creation.
A validation check on user information submitted via the account creation (POST /v1/accounts) and update (PATCH /v1/accounts/{account_id}) endpoints will return a 422 error if the information submitted does not meet our validation criteria. The Canadian validation criteria include the following:
- Name and Address Romanization
given_name,middle_name,family_name,street_address,unit,city,state,postal_code,email_address, andtax_idare required to be provided in Latin characters. The accepted input for these fields is limited to ASCII character range 32-126.given_nameandfamily_namemust reflect the user's full legal name (no abbreviations).
- Tax ID Number (SIN) Validation
tax_idis mandatory for all European securities accounts.- The
tax_id_typevaries by member state. Examples of tax IDs includeDEU_TAX_ID,FRA_TAX_ID,SPA_TAX_ID, etc. . If one of these is for a member of the EU:- Values must adhere to standard European tax identification number formats.
- Street Address Validation
- No values consisting of only digits.
- Length must be greater than 1 character.
- P.O. Box Restriction: P.O. Boxes are not accepted as a primary permanent address without an explicit, documented explanation. A validation detects keywords indicative of a P.O. Box (e.g., PO Box, Post Office Box, P.O. Box, Box #). If detected, the request will be blocked, returning a 422 error.
- Postal Code Validation
- If the country of tax residence is a European nation (e.g., ESP for Spain):
- The
postal_codeattribute is required upon account creation. - Must support and map to valid European postal code formats (e.g., 5-digit formats for Spain).
- The
- If the country of tax residence is a European nation (e.g., ESP for Spain):
- State / Province Validation
- For
EURaddresses, thestateattribute must reflect valid European provinces, autonomous communities, or territories. - The max length for a state/province should not be greater than 50 characters, and cannot consist of only digits.
- For
- Country Validation
- The fields
country,country_of_citizenship,country_of_birth, andcountry_of_tax_residencemust be accepted in ISO 3166-1 alpha-3 format (i.e.,ESPfor Spain).
- The fields
- Date of Birth Validation
- Values must be exactly 10 characters in length in
YYYY-MM-DDformat. - Age of Majority: The system will validate that the user meets the European age of majority (which is generally 18 across the European Union).
- Values must be exactly 10 characters in length in
- Email Address Validation
- Email addresses, after aliases are removed, are restricted to a maximum of 60 characters in length. Alpaca defines an alias as all characters after a
+sign and before the@sign.
- Email addresses, after aliases are removed, are restricted to a maximum of 60 characters in length. Alpaca defines an alias as all characters after a
- City Validation
- The
cityattribute cannot consist of only digits. It must be alphanumeric.
- The
- Whitespace Validation
- The space character (ASCII character 32) is the only whitespace character accepted.
- Leading and trailing spaces present in the string will return a
422error for core fields (given_name,family_name,street_address,city,state,postal_code,email_address,tax_id).
Updated 5 days ago