A state code is required for USA orders.
What about orders outside the USA? Can we just collect any data for the state/province field or is there a specific requirement?
A state code is required for USA orders.
What about orders outside the USA? Can we just collect any data for the state/province field or is there a specific requirement?
Hi mazdamx!
Absolutely, you could send any Data there, but you would have to keep in mind that when you ship that order if you select a carrier like for example USPS that address will need to be valid for that specific carrier/method otherwise you will get an address validation error.
Hope it helps!
Thanks,
Tom
OK so as long as the state/province code provides valid data, we should be fine?
Are all of these addresses acceptable?
PO box 5351
Boise, ID 83705
PO Box 5351
Boise, Idaho 83705
3244 Cortes Ave
Coquitlam, BC v3e 1v1
3244 Cortes Ave
Coquitlam, British Colombia V3e 1V1
Would all of those work?
Absolutely, you should be good. Our API will accept valid addresses you send.
You could send something like this for those examples above:
address1: “3244 Cortes Ave”
address2: “”
city: “Coquitlam”
state: “British Columbia”
state_code: “BC”
zip: “V3E 1V1”
country: “CA”
country_code: “CA”
and
address1: “PO box 5351”
address2: “”
city: “Boise”
state: “Idaho”
state_code: “ID”
zip: “83705”
country: “US”
country_code: “US”
If it’s for testing purposes you could check if its a valid address using some online address validator, such as Smarty Streets
Is there a list of state codes and province codes that you could provide? And country codes?
Hi @mazdamx!
We don’t have a list on our own but found these ones from Fedex in case ti helps:
Hoping you can help. The state codes and country codes are giving us an error here: https://www.screencast.com/t/Gk31mA4QYifj
Hi @mazdamx
I’m currently consulting an engineer about this, I will let you know ASAP.
However, the way you are currently sending that data should create an order with a valid shipping address even though country and state codes return as null on that query
Thanks for the patience!
Tom
Hey Tomasw.
Any update?
Hi @mazdamx
I apologize for the delay on my response.
This is still pending but I’ve already flagged the request so its tackled next.
Again, sorry for the waiting and I will provide an update asap.
Thanks!,
Tom
Thanks for the update Tom
Hey Tom, just checking back to see if there is an update. Thanks for your help.
Hi @mazdamx
I just talked to the engineer working on this and a fix for this will be deployed tomorrow.
I will let you know as soon as its available.
Thanks for the patience again!
Thanks for the update.
Hi @mazdamx!
Sorry for keeping you waiting on this.
We’ll be flagging country_code & state_code fields as deprecated for the moment, because removing them might affect clients with automatic generated mutations/queries. So until we make sure no one is using them, we will first deprecate them.
So the valid fields for this will only be country & state
Please let me know if there’s anything else I can help you with,
Thanks again for the patience!
Tom
Hey Tom:
Do you have a list of the state codes? Also, what is the code for the USA?
Thank you!
Hi @mazdamx
Sorry for the delay on this!
For the USA, if you send the US should work fine.
And as for the state codes, I don’t have a list, but I found this in case it works:
Or this one from FedEx:
Let me know if that doesn’t help,
Thanks!