I'm looking to test an integration between another service and Shopify. This other service requires zip codes to be present on any addresses, yet we've had some orders from Shopify that omit this data. We've created a fix that needs testing, yet I can't seem to create an order without a zip code (both via the GUI and the APIs).
What I'd like to understand is how some orders from specific countries can omit the zip, yet others can't? So far the countries affected include Ireland and Hong Kong, however there are no doubt others.
As an example here's the order that I'm attempting to post using the api:
{"order": {"billing_address": {"address1": "first line of address","city": "Hong Kong","country": "HK","first_name": "Firstname","last_name": "Surname","latitude": 22.378310,"longitude": 114.230498,"phone": "0123456844","province": "","zip": ""
},"customer": {"email": "james+HK@phpgenie.co.uk","first_name": "Firstname","last_name": "Surname"
},"email": "james+HK@phpgenie.co.uk","line_items": [
{"quantity": 2,"variant_id": 350323185
}
],"shipping_address": {"address1": "first line of address","city": "Hong Kong","country": "HK","first_name": "Firstname","last_name": "Surname","latitude": 22.378310,"longitude": 114.230498,"phone": "0123456844","province": "","zip": ""
}
}
}
The response that we get from the Shopify api is expected:
{"errors":{"billing_address":["Zip can't be blank"],"shipping_address":["Zip can't be blank"],"order":["Shipping address Zip can't be blank"]}}
How can we create orders that have no zip code? Any pointers would be greatly appreciated.
James