Address - Validate

Validates an address. Use the operation to validate an address before using it as soldTo or a billTo address.

POST https://management.azure.com/providers/Microsoft.Billing/validateAddress?api-version=2024-04-01

URI Parameters

Name In Required Type Description
api-version
query True

string

The version of the API to be used with the client request. The current version is 2024-04-01.

Request Body

Name Required Type Description
addressLine1 True

string

Address line 1.

country True

string

Country code uses ISO 3166-1 Alpha-2 format.

addressLine2

string

Address line 2.

addressLine3

string

Address line 3.

city

string

Address city.

companyName

string

Company name. Optional for MCA Individual (Pay-as-you-go).

district

string

Address district.

email

string

Email address.

firstName

string

First name. Optional for MCA Enterprise.

isValidAddress

boolean

Indicates if the address is incomplete.

lastName

string

Last name. Optional for MCA Enterprise.

middleName

string

Middle name.

phoneNumber

string

Phone number.

postalCode

string

Postal code.

region

string

Address region.

Responses

Name Type Description
200 OK

AddressValidationResponse

Result of the address validation.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Examples

AddressValidateInvalid
AddressValidateValid

AddressValidateInvalid

Sample request

POST https://management.azure.com/providers/Microsoft.Billing/validateAddress?api-version=2024-04-01

{
  "addressLine1": "1 Test",
  "city": "bellevue",
  "country": "us",
  "postalCode": "12345",
  "region": "wa"
}

Sample response

{
  "status": "Invalid",
  "suggestedAddresses": [
    {
      "addressLine1": "1 Test Address",
      "city": "Bellevue",
      "country": "US",
      "postalCode": "98052",
      "region": "WA"
    },
    {
      "addressLine1": "1 Test Address",
      "city": "Bellevue",
      "country": "US",
      "postalCode": "12345-0000",
      "region": "WA"
    }
  ],
  "validationMessage": "Invalid address"
}

AddressValidateValid

Sample request

POST https://management.azure.com/providers/Microsoft.Billing/validateAddress?api-version=2024-04-01

{
  "addressLine1": "1 Test",
  "city": "bellevue",
  "country": "us",
  "postalCode": "12345",
  "region": "wa"
}

Sample response

{
  "status": "Valid"
}

Definitions

Name Description
AddressDetails

Address details.

AddressValidationResponse

Result of the address validation.

AddressValidationStatus

Status of the address validation.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

AddressDetails

Address details.

Name Type Description
addressLine1

string

Address line 1.

addressLine2

string

Address line 2.

addressLine3

string

Address line 3.

city

string

Address city.

companyName

string

Company name. Optional for MCA Individual (Pay-as-you-go).

country

string

Country code uses ISO 3166-1 Alpha-2 format.

district

string

Address district.

email

string

Email address.

firstName

string

First name. Optional for MCA Enterprise.

isValidAddress

boolean

Indicates if the address is incomplete.

lastName

string

Last name. Optional for MCA Enterprise.

middleName

string

Middle name.

phoneNumber

string

Phone number.

postalCode

string

Postal code.

region

string

Address region.

AddressValidationResponse

Result of the address validation.

Name Type Description
status

AddressValidationStatus

Status of the address validation.

suggestedAddresses

AddressDetails[]

The list of suggested addresses.

validationMessage

string

Validation error message.

AddressValidationStatus

Status of the address validation.

Name Type Description
Invalid

string

Other

string

Valid

string

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.