Order API Address Validation Updates

Jamie_D_
Shopify Staff (Retired)
Shopify Staff (Retired)
533 1 109

Hey Shopify Developers,

There are some changes today to how addresses are validated when importing Orders through the Order API.

Shipping and billing addresses are now being validated to ensure the presence of the following fields:

  • Customer last name (last_name)
  • First address line (address1)
  • City
  • Country

If the address validation fails, the order will still be created but the address import will fail silently – that is, the order will be created but the Order record in Shopify won't contain a shipping_address or billing_address (depending on which address failed validation).

If you have any questions or concerns, feel free to reply to this thread.

Jamie | 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 the Shopify Help Center or the Shopify Blog

Replies 14 (14)
ThomasBorowski
Shopify Expert
803 71 227

Hi Jamie,

why does Province need to be present? It's not part of the default address format in many countries, including Germany. So when importing from some other system into Shopify, that field is likely going to be empty or missing entirely. What's the advice for handling such a scenario?

Thanks

Thomas

★ Smart Upgrades, Tips and Tutorials for Shopify themes: cartpunk.com
Did my solution work? Help other Community members easily find the correct solution and apply it to their own stores by marking it as the Accepted Solution and giving it a Thumbs Up
Nevil_Hulspas
Tourist
10 0 2

I agree with Thomas. Why should province be required? And if this field is not present, will the whole address not be passed through?

Jamie_D_
Shopify Staff (Retired)
Shopify Staff (Retired)
533 1 109

Hey all,

We hear you – we are relaxing the requirement for province and zip

I'll post an update here as soon as the change is live.

Jamie | 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 the Shopify Help Center or the Shopify Blog

Jamie_D_
Shopify Staff (Retired)
Shopify Staff (Retired)
533 1 109

We've removed validation for the presence of province and zip.

Apologies for any issues caused by this – please reply to this thread if you're experiencing any ongoing issues.

Jamie | 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 the Shopify Help Center or the Shopify Blog

HunkyBill
Shopify Expert
4837 60 587

where did my reply go? censored? 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
Jamie_D_
Shopify Staff (Retired)
Shopify Staff (Retired)
533 1 109

Not seeing any replies by you other than that one, caught by the spam filter or otherwise. If I don't see another reply from you, I'll reach out by e-mail

Jamie | 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 the Shopify Help Center or the Shopify Blog

Nevil_Hulspas
Tourist
10 0 2

Thanks for changing this, but we still need to see if everything works correctly now.

I'm very suprised how this was implemented by Shopify. It was by coincidence that I was subscribed to this forum, 
AND clicked the link in the email, that I found this out. I think there are a lot of developers/owners out there who don't know why their address is missing (which is the case with quite a few orders for us). Shouldn't shopify provide a warning or implementation time for this kind of thing?

Jamie_D_
Shopify Staff (Retired)
Shopify Staff (Retired)
533 1 109

Hey Nevil,

I agree that ideally there should be a warning in place before such changes are made – these changes were partially made to solve a bug in the Orders API with Billing Address validation. We felt that the value of fixing the issue was worth pushing out the change ASAP.

These changes with address validation affect less than 1% of orders being imported through the Orders API. In fact, address validation has always failed silently so there isn't a major change here but I do empathize with the fact that any changes in the API can potentially cause a headache for developers on the platform.

Thanks for your understanding, everyone.

Jamie | 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 the Shopify Help Center or the Shopify Blog

André_Veltstra
Excursionist
35 0 6

What does this means for Orders that get downloaded from the /admin/orders.json endpoint? Might they lack addresses? Or will they never reach an order status that gets them downloaded until the address is corrected? If so, will the storefront manager get notified?

I architect and optimize software, focusing on data integration. Currently I do this for a fashion design and manufacturing company located in midtown Manhattan, NYC.
Rephael
Shopify Partner
1 0 0

I'm having issues with address validation even though the incoming address is compliant with the validation published above...using Zapier - I can see all the address data is there but not going into the Shopify order. This worked for a few days then stopped. Did you change anything recently?

Charles_Marsh
Shopify Expert
35 0 0

I know this post is a little outdated now, but I'm getting the same address validation issues with existing orders.

I'll finding an order via the API, adding a field.. but then when I try to save I get address validation issues.

"Shipping address zip is not valid for australia"

Surely this existing orders address would have been validated in the checkout? I can't find any options to ignore this validation when saving.

Any help/advice would be much appreciated!

Julia_Okun
Tourist
9 0 4

We have been having an ongoing issue with address validation on shopify for the past month and a half and have been on the phone and email with shopify support and they have not fixed this bug.  It mainly effects international orders (the middle east seems to be the trickiest to validate) but I've seen it happen with domestic orders too.  I also have the shipping program endicia for USPS, and everything always validates fine on there.  The only issue is many international customers want DHL because it's a more reliable and quick service.  Shipping directly on DHL.com is cost prohibitive, and only worthwhile to do through shopfiy shipping due to the discount of their builk shipping account.

Is anyone else having this problem?  Have you found any work arounds?

Shopify has acknowledged this is an issue but has told me there is no time table for fixing it.  They said other shops are also being effected too.

HunkyBill
Shopify Expert
4837 60 587

@Julia. Why not just use a DHL connector directly? It is easy to hook up to both USPS and DHL, so you can ship correctly and cheaply. If using Shopify is a problem, roll your own solution! Shopify lets merchants do their own Shipping through custom carrier services, hence you can hook up to USPS and DHL with your own business accounts, and get decent to same rates as anyone.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
developer8971
Tourist
44 0 2

Hi,

I've followed the requirement for address validation:

address_1, country, city and last_name

Still, when I send a POST request to create order through the API, the shipping and billing addresses are still not populated even though I sent them in the JSON.

Is there any sort of logging or error handling I can check to see why it wasn't populated?  I'm in the dark right now and could use some pointers....thanks!