Loading

Add Valid Country Code to Phone Number in Commerce Webstore Account Addresses API

Fecha de publicación: Sep 9, 2025
Descripción

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. 

Solución

To resolve this, ensure the phone number includes a valid country calling code and adheres to the correct format. 

Número del artículo de conocimiento

004205307

 
Cargando
Salesforce Help | Article