Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
We are trying to place an order using admin api with below payload and it is not going through but same payload with diff phone number is working fine
Err Payload
{"order":{"customer":{"email":"sample@gmail.com","first_name":"sample","last_name":"user"},"discount_codes":[],"email":"sample@gmail.com","financial_status":"pending","line_items":[{"variant_id":36748387909794,"quantity":1,"product_id":5855894700194}],"note_attributes":[],"payment_gateway_names":["Merchant"],"phone":"98******38","send_fulfillment_receipt":"true","send_receipt":"true","tags":"COD","taxes_included":"true","test":"false","billing_address":{"address1":"Road dfsdf","city":"FARIDABAD","country":"IN","first_name":"sample","last_name":"user","phone":"98******38"","province":"HARYANA","zip":"121005"},"shipping_address":{"address1":"Road dfsdf","city":"FARIDABAD","country":"IN","first_name":"sample","last_name":"user","phone":"98******38"","province":"HARYANA","zip":"121005"},"shipping_lines":[{"name":"Free Shipping,"title":"Free Shipping"}]}}
Error we get is
{
"errors": {
"order": [
"Phone is invalid"
]
}
}
Success Payload
Above payload with diff phone number
And if we remove phone from order level then it is working fine with shared "Err Payload" as well.
Api we are using is
/admin/api/2023-01/orders.json
Not sure of the cause please help us debug this.
Hi,
I also encountered this error, phone is invalid. I tried to add a country code in front of the phone number, like: "+1 40XXXXXXXX", and it works.
Hope this can help you!
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024