ReDoc documentation

directory/countries/{countryId}/regions/{regionId}

directory/countries/{countryId}/regions/{regionId}

Delete a region belonging to the given country. Cascades to its locale names.

Request
path Parameters
countryId
required
string

two-letter (ISO 3166-1 alpha-2) country id, e.g. "US"

regionId
required
integer
Responses
200

200 Success.

401

401 Unauthorized

500

Internal Server error

default

Unexpected error

delete/V1/directory/countries/{countryId}/regions/{regionId}
Response samples
true

directory/countries/{countryId}/regions/{regionId}

Update an existing region belonging to the given country. Locale names use replace semantics: the provided array fully replaces the existing set of locale-name rows for the region. A region cannot be moved to a different country through this operation.

Request
path Parameters
countryId
required
string

two-letter (ISO 3166-1 alpha-2) country id, e.g. "US"

regionId
required
integer
Request Body schema:
required
object (directory-region-rest-api-data-region-create-request-interface)

Writable fields accepted when creating a region. Deliberately excludes region_id, country_id, and system: region_id is assigned by the database, country_id comes from the countryId URL segment, and system is always server-computed. Magento's webapi framework resolves setters strictly against this interface, so sending any of those three fields in a request body is rejected with a 400 InputException ("... is not supported") rather than being accepted and applied.

Responses
200

200 Success.

401

401 Unauthorized

500

Internal Server error

default

Unexpected error

put/V1/directory/countries/{countryId}/regions/{regionId}
Request samples
{
  • "region": {
    }
}
Response samples
{
  • "code": "string",
  • "country_id": "string",
  • "default_name": "string",
  • "locale_names": [
    ],
  • "region_id": 0,
  • "system": true
}