Discussing APIs and development related to customers, discounts, and order management.
G'day all,
We're getting back this error when creating an order via the Order API https://help.shopify.com/api/reference/order
HTTP status 422, body of message:
{"errors":{"customer":["Email is invalid"],"order":["Customer Email is invalid"]}}
The JSON fragment is this:
"customer": { "first_name": "First", "last_name": "Last", "email": "removed@australiandesignerhandbags.com.au" }, "email": "removed@australiandesignerhandbags.com.au",
The email value looks valid to my naked eye, so I wonder what validation is performed on the field and where can I find the docos.
The other question is, since this order already exists in an external system (ie: money have been paid, buyer expects the goods), is this correct behaviour that Shopify refuses to ingest the order due to an alleged email error?
Thanks,
Radu
I wish I could thank somebody from Shopify for answering my question.
But one week is too soon, I presume. Not impressed.
😞
Radu, this is typically the case when there is a customer record with the same email.
This error comes back for an Order API call. What you say would make sense if we were trying to create an exisiting customer. Not the case here.
Radu, I tried out this email and it failed for us too!
The email domain is invalid, and it appears there is a check against the domain, causing an error where there is one.
James is on the right track here 😉
If the server is validating the address you're going to need to use a real email address - not just one that appears real.
Thanks guys, I figured this out myself, there is indeed an issue with the DNS and or the MX record, the domain name actually exists and is registered according to http://whois.ausregistry.net.au/
Whatever the issue, the value is formally a correct email address, and this is a real order processed offline/different system, and we can't push it to Shopify because of the error.
I was hoping the Shopify people will explain the validation or point me to the docos.
As it is, I wouldn't call this a feature, really.
Thanks again, James and Jason for your time.
Cheers,
Radu
Radu, you have reached out to support@shopify at minimum correct?
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
I did not. Is this an option?
On a previous occasion they said no support for APIs is officially offered, try the forums...
I could be wrong though, it could have been Bigcommerce 🙂
Asking is always an option.
If you've found a bug they need to know about it. Email validation is typically through a 3rd party blacklist, if the domain had previous owners or was parked it may have been flagged in the past for shenigans and fixing that issue is an issue external to shopify. You can verify|dispute this with various blacklist services.
Buuuut put your ducks in a row, make a reduced test case first and verify all other information is working(same info different email =? works?), examine your own requests,etc. Might also want to check if that domain can be used to register a customer account through the front end.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org