Reservation Order - Calculate

Calculate price for a ReservationOrder.
Calculate price for placing a ReservationOrder.

POST https://management.azure.com/providers/Microsoft.Capacity/calculatePrice?api-version=2022-11-01

URI Parameters

Name In Required Type Description
api-version
query True

string

Supported version.

Request Body

Name Type Description
location

string

The Azure region where the reserved resource lives.

properties.appliedScopeProperties

AppliedScopeProperties

Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup

properties.appliedScopeType

AppliedScopeType

Type of the Applied Scope.

properties.appliedScopes

string[]

List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.

properties.billingPlan

ReservationBillingPlan

Represent the billing plans.

properties.billingScopeId

string

Subscription that will be charged for purchasing reservation or savings plan

properties.displayName

string

Friendly name of the reservation

properties.quantity

integer

Quantity of the skus that are part of the reservation.

properties.renew

boolean

Setting this to true will automatically purchase a new reservation on the expiration date time.

properties.reservedResourceProperties

ReservedResourceProperties

Properties specific to each reserved resource type. Not required if not applicable.

properties.reservedResourceType

ReservedResourceType

The type of the resource that is being reserved.

properties.reviewDateTime

string

This is the date-time when the Azure hybrid benefit needs to be reviewed.

properties.term

ReservationTerm

Represent the term of reservation.

sku

SkuName

The name of sku

Responses

Name Type Description
200 OK

CalculatePriceResponse

Detailed price info for purchasing ReservationOrder

Other Status Codes

Error

Unexpected error

Examples

CalculatePrice

Sample request

POST https://management.azure.com/providers/Microsoft.Capacity/calculatePrice?api-version=2022-11-01

{
  "sku": {
    "name": "standard_D1"
  },
  "location": "westus",
  "properties": {
    "reservedResourceType": "VirtualMachines",
    "billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83",
    "term": "P1Y",
    "billingPlan": "Monthly",
    "quantity": 1,
    "displayName": "TestReservationOrder",
    "appliedScopes": null,
    "appliedScopeType": "Shared",
    "reservedResourceProperties": {
      "instanceFlexibility": "On"
    }
  }
}

Sample response

{
  "properties": {
    "billingCurrencyTotal": {
      "currencyCode": "USD",
      "amount": 46
    },
    "reservationOrderId": "6d9cec54-7de8-abcd-9de7-80f5d634f2d2",
    "skuTitle": "Reserved VM Instance, Standard_D1, US West, 1 Year",
    "skuDescription": "standard_D1",
    "pricingCurrencyTotal": {
      "currencyCode": "USD",
      "amount": 46
    },
    "paymentSchedule": [
      {
        "dueDate": "2019-05-14",
        "pricingCurrencyTotal": {
          "currencyCode": "USD",
          "amount": 46
        },
        "billingCurrencyTotal": {
          "currencyCode": "EUR",
          "amount": 40
        }
      },
      {
        "dueDate": "2019-06-14",
        "pricingCurrencyTotal": {
          "currencyCode": "USD",
          "amount": 46
        }
      },
      {
        "dueDate": "2019-07-14",
        "pricingCurrencyTotal": {
          "currencyCode": "USD",
          "amount": 46
        }
      }
    ]
  }
}

Definitions

Name Description
AppliedScopeProperties

Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup

AppliedScopeType

Type of the Applied Scope.

BillingCurrencyTotal

Currency and amount that customer will be charged in customer's local currency for renewal purchase. Tax is not included.

CalculatePriceResponse

The response of calculate price for reservation.

CalculatePriceResponseProperties

Properties for calculate price response

Error

Error information

ErrorResponseCode

Error code describing the reason that service is not able to process the incoming request

ExtendedErrorInfo

Extended error information including error code and error message

ExtendedStatusInfo
InstanceFlexibility

Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.

PaymentDetail

Information about payment related to a reservation order.

PaymentStatus

Describes whether the payment is completed, failed, cancelled or scheduled in the future.

Price

Pricing information containing the amount and the currency code

PricingCurrencyTotal

Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included. This is locked price 30 days before expiry.

PurchaseRequest

The request for reservation purchase

ReservationBillingPlan

Represent the billing plans.

ReservationStatusCode
ReservationTerm

Represent the term of reservation.

ReservedResourceProperties

Properties specific to each reserved resource type. Not required if not applicable.

ReservedResourceType

The type of the resource that is being reserved.

SkuName

The name of sku

AppliedScopeProperties

Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup

Name Type Description
displayName

string

Display name

managementGroupId

string

Fully-qualified identifier of the management group where the benefit must be applied.

resourceGroupId

string

Fully-qualified identifier of the resource group.

subscriptionId

string

Fully-qualified identifier of the subscription.

tenantId

string

Tenant ID where the savings plan should apply benefit.

AppliedScopeType

Type of the Applied Scope.

Name Type Description
ManagementGroup

string

Shared

string

Single

string

BillingCurrencyTotal

Currency and amount that customer will be charged in customer's local currency for renewal purchase. Tax is not included.

Name Type Description
amount

number

currencyCode

string

The ISO 4217 3-letter currency code for the currency used by this purchase record.

CalculatePriceResponse

The response of calculate price for reservation.

Name Type Description
properties

CalculatePriceResponseProperties

Properties for calculate price response

CalculatePriceResponseProperties

Properties for calculate price response

Name Type Description
billingCurrencyTotal

BillingCurrencyTotal

Currency and amount that customer will be charged in customer's local currency. Tax is not included.

grandTotal

number

Total amount in pricing currency.

isBillingPartnerManaged

boolean

True if billing is managed by Microsoft Partner. Used only for CSP accounts.

isTaxIncluded

boolean

Whether or not tax is included in grand total

netTotal

number

Net total amount in pricing currency.

paymentSchedule

PaymentDetail[]

Information about payment related to a reservation order.

pricingCurrencyTotal

PricingCurrencyTotal

Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included.

reservationOrderId

string

GUID that represents reservation order that can be placed after calculating price.

skuDescription

string

Description of sku that is being purchased.

skuTitle

string

Title of sku that is being purchased.

taxTotal

number

Tax amount in pricing currency.

Error

Error information

Name Type Description
error

ExtendedErrorInfo

Extended error information including error code and error message

ErrorResponseCode

Error code describing the reason that service is not able to process the incoming request

Name Type Description
ActivateQuoteFailed

string

AppliedScopesNotAssociatedWithCommerceAccount

string

AppliedScopesSameAsExisting

string

AuthorizationFailed

string

BadRequest

string

BillingCustomerInputError

string

BillingError

string

BillingPaymentInstrumentHardError

string

BillingPaymentInstrumentSoftError

string

BillingScopeIdCannotBeChanged

string

BillingTransientError

string

CalculatePriceFailed

string

CapacityUpdateScopesFailed

string

ClientCertificateThumbprintNotSet

string

CreateQuoteFailed

string

Forbidden

string

FulfillmentConfigurationError

string

FulfillmentError

string

FulfillmentOutOfStockError

string

FulfillmentTransientError

string

HttpMethodNotSupported

string

InternalServerError

string

InvalidAccessToken

string

InvalidFulfillmentRequestParameters

string

InvalidHealthCheckType

string

InvalidLocationId

string

InvalidRefundQuantity

string

InvalidRequestContent

string

InvalidRequestUri

string

InvalidReservationId

string

InvalidReservationOrderId

string

InvalidSingleAppliedScopesCount

string

InvalidSubscriptionId

string

InvalidTenantId

string

MissingAppliedScopesForSingle

string

MissingTenantId

string

NoValidReservationsToReRate

string

NonsupportedAccountId

string

NotSpecified

string

NotSupportedCountry

string

OperationCannotBePerformedInCurrentState

string

OperationFailed

string

PatchValuesSameAsExisting

string

PaymentInstrumentNotFound

string

PurchaseError

string

ReRateOnlyAllowedForEA

string

RefundLimitExceeded

string

ReservationIdNotInReservationOrder

string

ReservationOrderCreationFailed

string

ReservationOrderIdAlreadyExists

string

ReservationOrderNotEnabled

string

ReservationOrderNotFound

string

RiskCheckFailed

string

RoleAssignmentCreationFailed

string

SelfServiceRefundNotSupported

string

ServerTimeout

string

UnauthenticatedRequestsThrottled

string

UnsupportedReservationTerm

string

ExtendedErrorInfo

Extended error information including error code and error message

Name Type Description
code

ErrorResponseCode

Error code describing the reason that service is not able to process the incoming request

message

string

ExtendedStatusInfo

Name Type Description
message

string

The message giving detailed information about the status code.

statusCode

ReservationStatusCode

InstanceFlexibility

Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.

Name Type Description
Off

string

On

string

PaymentDetail

Information about payment related to a reservation order.

Name Type Description
billingAccount

string

Shows the Account that is charged for this payment.

billingCurrencyTotal

Price

Amount charged in Billing currency. Tax not included. Is null for future payments

dueDate

string

Date when the payment needs to be done.

extendedStatusInfo

ExtendedStatusInfo

paymentDate

string

Date when the transaction is completed. Is null when it is scheduled.

pricingCurrencyTotal

Price

Amount in pricing currency. Tax not included.

status

PaymentStatus

Describes whether the payment is completed, failed, cancelled or scheduled in the future.

PaymentStatus

Describes whether the payment is completed, failed, cancelled or scheduled in the future.

Name Type Description
Cancelled

string

Failed

string

Scheduled

string

Succeeded

string

Price

Pricing information containing the amount and the currency code

Name Type Description
amount

number

currencyCode

string

The ISO 4217 3-letter currency code for the currency used by this purchase record.

PricingCurrencyTotal

Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included. This is locked price 30 days before expiry.

Name Type Description
amount

number

currencyCode

string

The ISO 4217 3-letter currency code for the currency used by this purchase record.

PurchaseRequest

The request for reservation purchase

Name Type Default value Description
location

string

The Azure region where the reserved resource lives.

properties.appliedScopeProperties

AppliedScopeProperties

Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup

properties.appliedScopeType

AppliedScopeType

Type of the Applied Scope.

properties.appliedScopes

string[]

List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.

properties.billingPlan

ReservationBillingPlan

Represent the billing plans.

properties.billingScopeId

string

Subscription that will be charged for purchasing reservation or savings plan

properties.displayName

string

Friendly name of the reservation

properties.quantity

integer

Quantity of the skus that are part of the reservation.

properties.renew

boolean

False

Setting this to true will automatically purchase a new reservation on the expiration date time.

properties.reservedResourceProperties

ReservedResourceProperties

Properties specific to each reserved resource type. Not required if not applicable.

properties.reservedResourceType

ReservedResourceType

The type of the resource that is being reserved.

properties.reviewDateTime

string

This is the date-time when the Azure hybrid benefit needs to be reviewed.

properties.term

ReservationTerm

Represent the term of reservation.

sku

SkuName

The name of sku

ReservationBillingPlan

Represent the billing plans.

Name Type Description
Monthly

string

Upfront

string

ReservationStatusCode

Name Type Description
Active

string

Expired

string

Merged

string

None

string

PaymentInstrumentError

string

Pending

string

Processing

string

PurchaseError

string

Split

string

Succeeded

string

ReservationTerm

Represent the term of reservation.

Name Type Description
P1Y

string

P3Y

string

P5Y

string

ReservedResourceProperties

Properties specific to each reserved resource type. Not required if not applicable.

Name Type Description
instanceFlexibility

InstanceFlexibility

Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.

ReservedResourceType

The type of the resource that is being reserved.

Name Type Description
AVS

string

AppService

string

AzureDataExplorer

string

AzureFiles

string

BlockBlob

string

CosmosDb

string

DataFactory

string

Databricks

string

DedicatedHost

string

ManagedDisk

string

MariaDb

string

MySql

string

NetAppStorage

string

PostgreSql

string

RedHat

string

RedHatOsa

string

RedisCache

string

SapHana

string

SqlAzureHybridBenefit

string

SqlDataWarehouse

string

SqlDatabases

string

SqlEdge

string

SuseLinux

string

VMwareCloudSimple

string

VirtualMachineSoftware

string

VirtualMachines

string

SkuName

The name of sku

Name Type Description
name

string