How to treat Countries and States in the API?

Your software
My Mautic version is: 4.4.12

Your problem
My problem is:
I am trying to write an integration between WooCommerce and Mautic. I discovered the /contacts/new endpoint expects country and state written out and does not accept the 2 digit codes. The aggravating problem is that country names in WooCommerce are different then country names in Mautic, and using the WooCommerce names will often create an error. There is no way I can submit the 2 digit country codes to the API? And if not, where do I find an authoritative list of accepted countries? And of accepted states for every country? What happens if I change the language in the Mautic instance? Does it expect the translated country names? There are some incertainties here that are making life just difficult. If anybody can point me to a feasible solution, I would be very grateful.

These errors are showing in the log:
The API returns the error:
state: This value is not valid., country: This value is not valid.

Steps I have tried to fix the problem:
Translating the country names to the written out form, which is a trial and error approach.