Get country and region information for the store

GET /V1/directory/countries/{countryId}

Get country and region information for the store.

Path parameters

  • countryId string Required

Responses

  • 200 Success.

    Hide response attributes Show response attributes object
    • id string Required

      The country id for the store.

    • two_letter_abbreviation string Required

      The country 2 letter abbreviation for the store.

    • three_letter_abbreviation string Required

      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]

      The available regions for the store.

      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

      • extension_attributes object

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

    • extension_attributes object

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

    Hide response attributes Show response attributes object
    • id string Required

      The country id for the store.

    • two_letter_abbreviation string Required

      The country 2 letter abbreviation for the store.

    • three_letter_abbreviation string Required

      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]

      The available regions for the store.

      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

      • extension_attributes object

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

    • extension_attributes object

      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]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Errors list

      Hide errors attributes Show errors attributes object

      Error details

      • message string

        Error message

      • parameters array[object]

        Error parameters list

        Hide parameters attributes Show parameters attributes object

        Error parameters item

        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters list

      Hide parameters attributes Show parameters attributes object

      Error parameters item

      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

GET /V1/directory/countries/{countryId}
curl \
 --request 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 (200)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <id>string</id>
  <two-letter-abbreviation>string</two-letter-abbreviation>
  <three-letter-abbreviation>string</three-letter-abbreviation>
  <full-name-locale>string</full-name-locale>
  <full-name-english>string</full-name-english>
  <available-regions type="array">
    <available-region>
      <id>string</id>
      <code>string</code>
      <name>string</name>
      <extension-attributes>
      </extension-attributes>
    </available-region>
  </available-regions>
  <extension-attributes>
  </extension-attributes>
</root>
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 (400)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>
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"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <message>string</message>
  <errors type="array">
    <error>
      <message>string</message>
      <parameters type="array">
        <parameter>
          <resources>string</resources>
          <fieldName>string</fieldName>
          <fieldValue>string</fieldValue>
        </parameter>
      </parameters>
    </error>
  </errors>
  <code type="integer">42</code>
  <parameters type="array">
    <parameter>
      <resources>string</resources>
      <fieldName>string</fieldName>
      <fieldValue>string</fieldValue>
    </parameter>
  </parameters>
  <trace>string</trace>
</root>