[UserError(field=Optional[[input, deliveryMethod, shipping, address, provinceCode]], message=Delivery method shipping address province code can't be blank)
Which countries require province codes? I need to create a mapping of province name to province code since I don’t have province codes. What countries do I need to do this for? Is it just US and Canada?
Hey Joseph,
I’ve connected with the team that owns this area - it does seem to be primarily US and Canada but could also include some other countries like Spain and Italy. I’ll report back here when I have more info.
Thanks Liam!
I’m gonna put together something that can map province names to province codes based on the ISO 3166-2 country subdivision standard. That should cover most cases, definitely US and CA. I’ll report back when I’ve tested it out.
Just to follow up, we’re already using this geodb API for other things, but they have a “find country regions” endpoint so we’re utilizing that now to map region name to code.
I think under the hood it utilizes this: ISO - Country Codes Collection
But there’s a subscription cost to that so much cheaper to access it through the GeoDB API.