Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Order API error: Customer Email is invalid

Order API error: Customer Email is invalid

Radu_Vissarion
Shopify Partner
8 0 0

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

 

Replies 9 (9)

Radu_Vissarion
Shopify Partner
8 0 0

I wish I could thank somebody from Shopify for answering my question.

But one week is too soon, I presume. Not impressed. 

😞

 

james148
Shopify Partner
27 0 12

Radu, this is typically the case when there is a customer record with the same email.

Radu_Vissarion
Shopify Partner
8 0 0

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.

 

james148
Shopify Partner
27 0 12

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.

Jason
Shopify Partner
11206 226 2315

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.

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★

Radu_Vissarion
Shopify Partner
8 0 0

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

 

PaulNewton
Shopify Partner
7450 657 1565

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


Radu_Vissarion
Shopify Partner
8 0 0

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 🙂

 

PaulNewton
Shopify Partner
7450 657 1565

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