The Commerce Webstore Account Addresses API enforces validation for phone numbers, requiring them to include a valid country calling code. Submissions with invalid or incorrect country codes, such as "999" or "923" result in the error: "INVALID_API_INPUT", message: "Enter a valid number and try again."
For example, when calling the API endpoint:
/services/data/v63.0/commerce/webstores/0ZEHo000000L3voOAC/accounts/001Ho00001Ab3QLIAZ/addresses
{
"addressType": "Shipping",
"city": "rampur",
"country": "CA",
"isDefault": false,
"name": "test",
"phoneNumber": "(999) 999-9999",
"postalCode": "244901",
"region": "BC",
"street": "41 xyz\ncolony"
}
The API returns the error due to the invalid phone number format.
To resolve this, ensure the phone number includes a valid country calling code and adheres to the correct format.
004205307

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.