Billing Profiles - Update

Updates the properties of a billing profile. Currently, displayName, poNumber, bill-to address and invoiceEmailOptIn can be updated. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.

PATCH https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}?api-version=2019-10-01-preview

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

The ID that uniquely identifies a billing account.

billingProfileName
path True

string

The ID that uniquely identifies a billing profile.

api-version
query True

string

The version of the API to be used with the client request. The current version is 2019-10-01-preview.

Request Body

Name Type Description
properties.address

AddressDetails

Billing address.

properties.displayName

string

The name of the billing profile.

properties.enabledAzurePlans

AzurePlan[]

Information about the enabled azure plans.

properties.invoiceEmailOptIn

boolean

Flag controlling whether the invoices for the billing profile are sent through email.

properties.invoiceSections

InvoiceSection[]

The invoice sections associated to the billing profile.

properties.poNumber

string

The purchase order name that will appear on the invoices generated for the billing profile.

Responses

Name Type Description
200 OK

BillingProfile

OK. The request has succeeded.

202 Accepted

Accepted. Billing profile update is in progress.

Headers

  • Location: string
  • Retry-After: string
Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

UpdateBillingProfile

Sample Request

PATCH https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}?api-version=2019-10-01-preview

{
  "properties": {
    "displayName": "BillingProfile11",
    "invoiceEmailOptIn": true,
    "poNumber": "ABC12345"
  }
}

Sample Response

Location: /providers/Microsoft.Billing/billingOperations/ed2975a8-8f77-43bb-a717-ace54326b14b?api-version=2018-05-31-preview
Retry-After: 60
{
  "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}",
  "name": "{billingProfileName}",
  "type": "Microsoft.Billing/billingAccounts/billingProfiles",
  "properties": {
    "displayName": "BillingProfile11",
    "address": {
      "companyName": "Contoso",
      "firstName": "Test",
      "lastName": "User",
      "addressLine1": "Test Address1",
      "addressLine2": "Test Address2",
      "addressLine3": "Test Address3",
      "city": "City",
      "postalCode": "00000",
      "region": "WA",
      "country": "US"
    },
    "currency": "USD",
    "enabledAzurePlans": [
      {
        "skuId": "0001",
        "skuDescription": "Microsoft Azure Dev/Test"
      },
      {
        "skuId": "0002",
        "skuDescription": "Microsoft Azure Standard"
      }
    ],
    "invoiceDay": 5,
    "invoiceEmailOptIn": true,
    "poNumber": "ABC12345",
    "status": "Active",
    "spendingLimit": "Off"
  }
}

Definitions

Name Description
AddressDetails

Address details.

AzurePlan

Details of the Azure plan.

BillingProfile

A billing profile.

BillingProfileStatus

The status of the billing profile.

BillingRelationshipType

Identifies which services and purchases are paid by a billing profile.

ErrorDetails

The details of the error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

ErrorSubDetails
IndirectRelationshipInfo

The billing profile details of the partner of the customer for an indirect motion.

InvoiceSection

An invoice section.

InvoiceSectionState

Identifies the state of an invoice section.

SpendingLimit

The billing profile spending limit.

StatusReasonCode

Reason for the specified billing profile status.

targetCloud

Identifies the cloud environments that are associated with an invoice section. This is a system managed optional field and gets updated as the invoice section gets associated with accounts in various clouds.

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.

country

string

Country code uses ISO2, 2-digit format.

firstName

string

First name.

lastName

string

Last name.

postalCode

string

Postal code.

region

string

Address region.

AzurePlan

Details of the Azure plan.

Name Type Description
skuDescription

string

The sku description.

skuId

string

The sku id.

BillingProfile

A billing profile.

Name Type Description
id

string

Resource Id.

name

string

Resource name.

properties.address

AddressDetails

Billing address.

properties.billingRelationshipType

BillingRelationshipType

Identifies which services and purchases are paid by a billing profile.

properties.currency

string

The currency in which the charges for the billing profile are billed.

properties.displayName

string

The name of the billing profile.

properties.enabledAzurePlans

AzurePlan[]

Information about the enabled azure plans.

properties.indirectRelationshipInfo

IndirectRelationshipInfo

Identifies the billing profile that is linked to another billing profile in indirect purchase motion.

properties.invoiceDay

integer

The day of the month when the invoice for the billing profile is generated.

properties.invoiceEmailOptIn

boolean

Flag controlling whether the invoices for the billing profile are sent through email.

properties.invoiceSections

InvoiceSection[]

The invoice sections associated to the billing profile.

properties.poNumber

string

The purchase order name that will appear on the invoices generated for the billing profile.

properties.spendingLimit

SpendingLimit

The billing profile spending limit.

properties.status

BillingProfileStatus

The status of the billing profile.

properties.statusReasonCode

StatusReasonCode

Reason for the specified billing profile status.

properties.targetClouds

targetCloud[]

Identifies the cloud environments that are associated with a billing profile. This is a system managed optional field and gets updated as the billing profile gets associated with accounts in various clouds.

type

string

Resource type.

BillingProfileStatus

The status of the billing profile.

Name Type Description
Active

string

Disabled

string

Warned

string

BillingRelationshipType

Identifies which services and purchases are paid by a billing profile.

Name Type Description
CSPPartner

string

Direct

string

IndirectCustomer

string

IndirectPartner

string

ErrorDetails

The details of the error.

Name Type Description
code

string

Error code.

details

ErrorSubDetails[]

The sub details of the error.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Name Type Description
error

ErrorDetails

The details of the error.

ErrorSubDetails

Name Type Description
code

string

Error code.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.

IndirectRelationshipInfo

The billing profile details of the partner of the customer for an indirect motion.

Name Type Description
billingAccountName

string

The billing account name of the partner or the customer for an indirect motion.

billingProfileName

string

The billing profile name of the partner or the customer for an indirect motion.

displayName

string

The display name of the partner or customer for an indirect motion.

InvoiceSection

An invoice section.

Name Type Description
id

string

Resource Id.

name

string

Resource name.

properties.displayName

string

The name of the invoice section.

properties.state

InvoiceSectionState

Identifies the state of an invoice section.

properties.targetCloud

targetCloud

Identifies the cloud environments that are associated with an invoice section. This is a system managed optional field and gets updated as the invoice section gets associated with accounts in various clouds.

type

string

Resource type.

InvoiceSectionState

Identifies the state of an invoice section.

Name Type Description
Active

string

Restricted

string

SpendingLimit

The billing profile spending limit.

Name Type Description
Off

string

On

string

StatusReasonCode

Reason for the specified billing profile status.

Name Type Description
PastDue

string

SpendingLimitExpired

string

SpendingLimitReached

string

targetCloud

Identifies the cloud environments that are associated with an invoice section. This is a system managed optional field and gets updated as the invoice section gets associated with accounts in various clouds.

Name Type Description
USGov

string

USNat

string

USSec

string