Get address formatting rules by market

Applies To

  • Partner Center
  • Partner Center operated by 21Vianet
  • Partner Center for Microsoft Cloud Germany
  • Partner Center for Microsoft Cloud for US Government

Get the expected address format based on the iso code for the market.


  • Credentials as described in Partner Center authentication. This scenario supports authentication with both standalone App and App+User credentials.


Request syntax

Method Request URI
GET {baseURL}/v1/countryvalidationrules/{isocode-id} HTTP/1.1

URI parameter

Name Type Required Description
isocode-id string Y The two-character ISO country code.

Request headers

  • See Headers for more information.

Request body


Request example

GET{isocode-id} HTTP/1.1
Authorization: Bearer <token> 
Accept: application/json
MS-RequestId: 124b0e41-a093-4fec-b871-3eeb45fd734b
MS-CorrelationId: 5cfd634d-b936-47af-87f0-0f0217425dcc


If successful, this method returns a CountryInformation object in the response body.

Response success and error codes

Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use a network trace tool to read this code, error type, and additional parameters. For the full list, see Error Codes.

Response example

HTTP/1.1 200 OK
Content-Length: 1856
Content-Type: application/json
MS-CorrelationId: 5cfd634d-b936-47af-87f0-0f0217425dcc
MS-RequestId: 124b0e41-a093-4fec-b871-3eeb45fd734b
Date: Wed, 25 Nov 2015 06:36:47 GMT

    "iso2Code": "US",
    "defaultCulture": "en-US",
    "isStateRequired": true,
    "states": {
        "value": ["AK","AL","AR", "AZ","CA","CO","CT","DC","DE","FL","GA","HI","IA","ID","IL","IN",
    "supportedLanguages": {
        "value": ["en",
    "supportedCultures": {
        "value": ["en-US",
    "isPostalCodeRequired": true,
    "postalCodeRegex": "^\\d{
    "isCityRequired": true,
    "isVatIdSupported": false,
    "taxIdFormat": "US######",
    "taxIdSample": "US999965",
    "phoneNumberRegex": "^(1[\\-\\/\\.]?)?(\((\\d{3})\)|(\\d{3}))[\\-\\/\\.]?(\\d{3})[\\-\\/\\.]?(\\d{4})$",
    "isRegistrationNumberSupported": false,
    "isTaxIdSupported": true,
    "resellerAgreementRegion": "AOC",
    "geographicRegion": "NorthAndLatinAmerica",
    "countryCallingCodes": {
        "value": ["1"]
    "attributes": {
        "objectType": "CountryInformation"