Im trying to submit an international order through the order create api end point and the shipping/billing address is not coming through.
After digging into it it seems that having a blank "Province" in the address is causing the address validation to fail even though according to this post Order-API-Address-Validation-Updates I should not have to provide province and the country 'Gibraltar' does not have a province/state.
If I force province to be just a '-' then the order imports but this a hacky workaround for a problem that shouldn't exist especially considering if I create an order through shopify's front end checkout I do not need to provide a province for Gibraltar and it does import with an empty city and province.
Solved! Go to the solution
Hey @bdozonos ,
For cases like the one you described (i.e. Shipping to a country like Gibraltar which has no provinces) you can simply leave the fields of "province" and "province_code" as set to `null`. You should not receive an error from Shopify or the Order API Address Validation by doing this - the only fields that are required by the Order API Address Validation are the customer's last name, address line 1, city, and country. So you should have no issue with making an order that ships to a location like Gibraltar as long as you set both the city and country to "Gibraltar"
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution