Get country and region information for the store

GET /V1/directory/countries/{countryId}

Get country and region information for the store.

Responses

  • 200 Success.

    Hide response attributes Show response attributes object

    Country Information interface.

    • id string Required

      The country id for the store.

    • The country 2 letter abbreviation for the store.

    • The country 3 letter abbreviation for the store.

    • full_name_locale string Required

      The country full name (in store locale) for the store.

    • full_name_english string Required

      The country full name (in English) for the store.

    • available_regions array[object]

      Region Information interface.

      Hide available_regions attributes Show available_regions attributes object

      Region Information interface.

      • id string Required

        Region id

      • code string Required

        Region code

      • name string Required

        Region name

      • ExtensionInterface class for @see \Magento\Directory\Api\Data\RegionInformationInterface

    • ExtensionInterface class for @see \Magento\Directory\Api\Data\CountryInformationInterface

  • 400 Bad Request

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Hide parameters attributes Show parameters attributes object

        Error parameters item

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object

      Error parameters item

    • trace string

      Stack trace

  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Hide parameters attributes Show parameters attributes object

        Error parameters item

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Hide parameters attributes Show parameters attributes object

      Error parameters item

    • trace string

      Stack trace

GET /V1/directory/countries/{countryId}
curl \
 -X GET https://magento2.winkelstraat.mac/rest/all/V1/directory/countries/{countryId}
Response examples (200)
{
  "id": "string",
  "two_letter_abbreviation": "string",
  "three_letter_abbreviation": "string",
  "full_name_locale": "string",
  "full_name_english": "string",
  "available_regions": [
    {
      "id": "string",
      "code": "string",
      "name": "string",
      "extension_attributes": {}
    }
  ],
  "extension_attributes": {}
}
Response examples (400)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}
Response examples (default)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}