Skip to main content

countries

Creates, updates, deletes, gets or lists a countries resource.

Overview

Namecountries
TypeResource
Idgodaddy.countries.countries

Fields

The following fields are returned by SELECT queries:

Request was successful

NameDatatypeDescription
callingCodestringThe calling code prefix used for phone numbers in this country
countryKeystring (iso-country-code)The ISO country-code
labelstringThe localized name of the country
statesarrayList of states/provinces in this country

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_countryselectcountry_key, marketIdsort, orderRetrieves country and summary state information for provided countryKey. Authorization is not required.
get_countriesselectmarketIdregionTypeId, regionName, sort, orderRetrieves summary country information for the provided marketId and filters. Authorization is not required.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
country_keystring (iso-country-code)The country key
marketIdstring (bcp-47)MarketId in which the request is being made, and for which responses should be localized
orderstringThe direction to sort the result countries by.
regionNamestringRestrict countries to this region name; required if regionTypeId is supplied
regionTypeIdintegerRestrict countries to this region type; required if regionName is supplied
sortstringThe term to sort the result countries by.

SELECT examples

Retrieves country and summary state information for provided countryKey. Authorization is not required.

SELECT
callingCode,
countryKey,
label,
states
FROM godaddy.countries.countries
WHERE country_key = '{{ country_key }}' -- required
AND marketId = '{{ marketId }}' -- required
AND sort = '{{ sort }}'
AND order = '{{ order }}'
;