Get all country subdivisions by code
Description
Retrieves a list of all country subdivisions. A subdivision is a state or a province for a specific country.
For example, Ontario is a subdivision for the country of Canada.
Package Details
Interface
IAddressManager
Syntax
_addressManager.GetCountrySubdivisionByCode(string code)
Returns
Task<CountrySubdivision>
API
/api/v1/provinces/{id}
Parameters
id - the country subdivision code. For example "ON" would return details on the province of Ontario.
Returns
200 OK - Country subdivision details.
Example
const string subdivisionCode = "ON";
var countrySubdivision = await addressManager.GetCountrySubdivisionByCode(subdivisionCode);