Hello,
I am getting "Phone is invalid" error when creating an order via Shopify API. While the order json object didn't go through because of phone validation, it saves the customer data resulting to duplicate customer records.
Here's the json I am passing:
{ "order": { "name": "GRPN-O1003337299", "customer": { "first_name": "SANDRA ****" }, "currency": "AUD", "billing_address": { "name": "SANDRA ****", "phone": "+6148377****", "address1": "****** WELLINGTON STREET", "address2": "", "city": "NARRABEEN", "zip": "2101", "province_code": "NSW", "country_code": "AU" }, "shipping_address": { "name": "SANDRA ****", "phone": "+6148377****", "address1": "****** WELLINGTON STREET", "address2": "", "city": "NARRABEEN", "zip": "2101", "province_code": "NSW", "country_code": "AU" }, "line_items": [ { "product_id": "CILI463371877_FLIL1003627554", "sku": "NP1952S-Black-S_CILI-463371877_FLI-L1003627554", "price": 49.0, "quantity": 1, "name": "Men's, Size S, Black: Three-Pack of Calvin Klein Men's Trunk", "title": "Men's, Size S, Black: Three-Pack of Calvin Klein Men's Trunk", "grams": 300 } ], "phone": "+6148377****", "source_name": "GROUPON", "total_price": "49.00", "total_weight": 300 } }
I just hide some details for security reasons.
I am looking forward to your help. Thanks!
Hey @wylanosorio,
Can you kindly provide the X-Request-ID value from the response headers of a failed call? I will use this to get more details about the error from our logs.
JB | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me 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
@_JB I solved it last few days by removing the "phone" field but keeping the "phone" fields under "shipping_address" and "billing_address". But the solution is temporary. May I know an update what have you found out?
User | Count |
---|---|
12 | |
12 | |
10 | |
7 | |
6 |