Random phone numbers formats on orders reponse

New Member
1 0 0

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?


Reply 1 (1)
Shopify Staff
Shopify Staff
703 109 232

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