Account Information
Public API

Get Country by ID

Changed on

Returns a single country from the catalog as a JSON object, identified by its numeric id. Each field matches the corresponding element returned by Get Countries (get-countries-options). Use this for a single country lookup by id. For ISO 3166-1 code lookup or the full country list, use Get Countries (get-countries-options) instead.

OAuth Scopes: meta

get/api/v1/meta/countries/{id}

Request

Path parameters

idstring required

Country id, as a numeric string. Obtain valid ids from the id field of Get Countries (get-countries-options).

Response

The requested country as a single JSON object.

idstring

Internal country identifier, returned as a numeric string.

namestring

Full display name of the country

isoCodestring nullable

ISO 3166-1 alpha-2 when defined. The isoCode key is always present; the value is JSON null when the country has no code set in data (not omitted).

Changes

    • breaking

      added the pattern ^0*[1-9]\d*$ to the path request parameter id

    • breaking

      the response's property type changed from integer to string for status

    • info

      api operation id get-meta-country-by-id removed and replaced with get-country-by-id

    • info

      api tag Account Information added

    • info

      for the path request parameter id, the type was generalized from integer to string

    • info

      the response's property pattern ^\d+$ was added for the status