Development discussions around Shopify APIs
Hello, when retrieving orders on the API, we're getting mixed phone number formats on billing_address.phone and shipping_address.phone.
Considering that 'DD' is a brazilian local code, all the bellow formats are shown on response: 'XXXXX-XXXX', 'DDXXXXXXXX' , '+55 DD XXXXX-XXXX', 'DD XXXXX-XXXX' and 'DDXXXXXXXXX'.
Why does this happens, and are there any workarounds available?
Hi @alkhemylab - for Brazilian phone numbers, they should look like this: "+55-DD-XXXX-XXXX". I was able to do some testing on my end though. I found that if a customer inputs an incorrectly formatted number in the shipping information section, Shopify will actually accept the incorrect phone numbers. This doesn't happen if they put the number in the initial "contact" section at the top of the checkout page. Here, it only accepts the number if it is formatted as mentioned above.
Do you know if these orders are being created by customers through checkout or through an app that updates order information through the API? If you're able to share an example API call with an X-Request-ID, we'd be happy to get in touch in touch with the product team to confirm if this is expected behaviour and to see if we have any workarounds.
Hope to hear from you soon.
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...By Jacqui Mar 10, 2023
Upskill and stand out with the new Shopify Foundations Certification programBy SarahF_Shopify Mar 6, 2023
One of the key components to running a successful online business is having clear and co...By Ollie Mar 6, 2023