The variants can be shipped to the provided country
The phone number is valid
The zip code is valid
The taxNumber field
It is supposed to be there for the provided country
It is formatted correctly and passes regex validation
This endpoint does not currently check the validity of the address itself.Phone number validation is done with libphonenumber-js.Here is a demo page of the phone validation for further testing.
Partners must pass in the companyId field in the body
For Brazil, Mexico, China, Italy, and South Korea you must pass in an additional taxNumber field.
For Brazil the tax number field must pass regex validation as follows
Copy
new RegExp(`^\\d{3}\\.\\d{3}\\.\\d{3}-\\d{2}$`).test(taxNumber)
For Mexico the pattern is 13 characters (4 letters followed by 6 digits and 3 alphanumeric characters).
Copy
new RegExp(`^[A-Za-z]{4}\\d{6}[A-Za-z0-9]{3}$`).test(taxNumber)
For China, Italy, and South Korea there is no validation run on the taxNumber field.