question

Robin Walmsley avatar image
Robin Walmsley asked Miguel Deactivated answered

Where do I find a list of the Country "Codes" for the API

When POSTing a Customer Address to the API from a web app, the error that is returned is as follows ..

Maximum string length exceeded for 'country'. Max length is 2

However I cannot find a list of codes for the countries.
REST APICustomers
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Miguel avatar image
Miguel Deactivated answered
Two character country codes are standardized and defined in ISO 3166-1 alpha-2. Here's one database of them: http://data.okfn.org/data/core/country-list

Note: The country field is not a required field. For example, the Customers app on the device does not allow you add or update the country. However, you can set this from the Customers web app and also through the REST API.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community