Skip to content
SynupAPI
Get an API key
GETapi.synup.com/api/v4/countries

Get a list of supported countries and their states

This API fetches a list of supported countries, including their database IDs, ISO codes, and states. The retrieved ISO codes should be used as input values when creating or updating locations.

Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Request

Request
curl -X GET 'https://api.synup.com/api/v4/countries' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json'

Responses

StatusDescription
200Successfully retrieved the list of countries and their states
401Unauthorized. API key is missing or invalid.
500Internal server error.
Example response (generated from the schema)
{
  "data": {
    "supportedCountries": [
      {
        "databaseId": 13,
        "id": "Q291bnRyeToxMw==",
        "iso": "AU",
        "name": "Australia",
        "states": [
          {
            "countryId": 13,
            "id": "136",
            "iso": "WA",
            "name": "Western Australia"
          }
        ]
      }
    ]
  }
}

Response body

NameTypeRequiredDescription
dataobjectoptional
data.supportedCountriesarray of objectoptionalList of supported countries
data.supportedCountries[].databaseIdintegeroptionalUnique identifier for the country in the database.
data.supportedCountries[].idstringoptionalBase64 encoded unique country identifier.
data.supportedCountries[].isostringoptionalISO 3166-1 alpha-2 country code.
data.supportedCountries[].namestringoptionalName of the country.
data.supportedCountries[].statesarray of objectoptionalList of states within the country (if available).
data.supportedCountries[].states[].countryIdintegeroptionalUnique identifier of the country associated with the state.
data.supportedCountries[].states[].idstringoptionalUnique identifier for the state.
data.supportedCountries[].states[].isostringoptionalState ISO code (if applicable).
data.supportedCountries[].states[].namestringoptionalName of the state.