Billing Automation Specialist ← Back to Jobs. Staffmark Cincinnati, OH. Full-Time Job Description. At Staffmark Group our vision is to Change the World one person, one job, one community at a time. Each of us has the power to change the world. And when a group of people come together with a common goal, anything is possible. Subscription Management & Billing Automation Made Easy Work 365 is a Subscription Management and Billing Automation application built on Microsoft Cloud used by MSPs and ISVs companies to automate processes and grow recurring revenue.

  1. Billing Automation
  2. Billing Automation Systems
  3. Medical Billing Automation
-->

This article lists common scenarios for Azure billing and cost management. It maps these scenarios to APIs that you can use. Under each scenario-to-API mapping, you can find a summary of the APIs and the functionality that they offer.

Common scenarios

You can use the billing and cost management APIs in several scenarios to answer cost-related and usage-related questions. Here's an outline of common scenarios:

  • Invoice reconciliation: Did Microsoft charge me the right amount? What's my bill, and can I calculate it myself?

  • Cross-charges: Now that I know how much I'm being charged, who in my organization needs to pay?

  • Cost optimization: I know how much I've been charged. How can I get more out of the money I'm spending on Azure?

  • Cost tracking: I want to see how much I'm spending and using Azure over time. What are the trends? How can I do better?

  • Azure spending during the month: How much is my current month's spending to date? Do I need to make any changes in my spending and/or usage of Azure? When during the month am I consuming Azure the most?

  • Alerts: How can I set up resource-based consumption or monetary-based alerts?

Scenario-to-API mapping

APIInvoice reconciliationCross-chargesCost optimizationCost trackingMidmonth spendingAlerts
BudgetsXX
Marketplace ChargesXXXXXX
Price SheetXXXXX
Reservation RecommendationsX
Reservation DetailsXX
Reservation SummariesXX
Usage DetailsXXXXXX
Billing PeriodsXXXX
InvoicesXXXX
Azure Retail PricesXXX

Note

The scenario-to-API mapping doesn't include the Enterprise Consumption APIs. Where possible, use the general Consumption APIs for new development scenarios.

API summaries

Consumption

Web Direct and Enterprise customers can use all the following APIs, except where noted:

  • Budgets API (Enterprise customers only): Create either cost or usage budgets for resources, resource groups, or billing meters. When you've created budgets, you can configure alerts to notify you when you've exceeded defined budget thresholds. You can also configure actions to occur when you've reached budget amounts.

  • Marketplace Charges API: Get charge and usage data on all Azure Marketplace resources (Azure partner offerings). You can use this data to add up costs across all Marketplace resources or to investigate costs/usage on specific resources.

  • Price Sheet API (Enterprise customers only): Get custom pricing for all meters. Enterprises can use this data in combination with usage details and marketplace usage information to calculate costs by using usage and marketplace data.

  • Reservation Recommendations API: Get recommendations for purchasing Reserved VM Instances. Recommendations help you analyze expected cost savings and purchase amounts. For more information, see APIs for Azure reservation automation.

  • Reservation Details API: See information on previously purchased VM reservations, such as how much consumption is reserved versus how much is used. You can see data at per-VM-level detail. For more information, see APIs for Azure reservation automation.

  • Reservation Summaries API: See aggregated information on VM reservations that your organization bought, like how much consumption is reserved versus how much is used in the aggregate. For more information, see APIs for Azure reservation automation.

  • Usage Details API: Get charge and usage information on all Azure resources from Microsoft. Information is in the form of usage detail records, which are currently emitted once per meter per day. You can use the information to add up the costs across all resources or investigate costs/usage on specific resources.

  • Azure Retail Prices: Get meter rates with pay-as-you-go pricing. You can then use the returned information with your resource usage information to manually calculate the expected bill.

Billing

  • Billing Periods API: Determine a billing period to analyze, along with the invoice IDs for that period. You can use invoice IDs with the Invoices API.

  • Invoices API: Get the download URL for an invoice for a billing period in PDF form.

Enterprise consumption

Billing Automation

The following APIs are for Enterprise only:

  • Balance Summary API: Get a monthly summary of information on balances, new purchases, Azure Marketplace service charges, adjustments, and overage charges. You can get this information for the current billing period or any period in the past. Enterprises can use this data to compare with manually calculated summary charges. This API does not provide resource-specific information or an aggregate view of costs.

  • Usage Details API: Get information about Azure usage (of Microsoft offerings) for the current month, a specific billing period, or a custom date period. Enterprises can use this data to manually calculate bills based on rate and consumption. Enterprises can also use department/organization information to attribute costs across organizations. The data provides a resource-specific view of usage/cost.

  • Marketplace Store Charge API: Get information about Azure usage (of partner offerings) for the current month, a specific billing period, or a custom date period. Enterprises can use this data to manually calculate bills based on rate and consumption. Enterprises can also use department/organization information to attribute costs across organizations. This API provides a resource-specific view of usage/cost.

  • Price Sheet API: Get the applicable rate for each meter for the given enrollment and billing period. You can use this rate information in combination with usage details and marketplace usage information to manually calculate the expected bill.

  • Billing Periods API: Get a list of billing periods. The API also gives you a property that points to the API route for the four sets of Enterprise API data that pertain to the billing period: BalanceSummary, UsageDetails, Marketplace Charges, and PriceSheet.

  • Reserved Instance Recommendations API: Look at 7 days, 30 days, or 60 days of virtual machine usage and get Single and Shared Purchase recommendations. You can use this API to analyze expected cost savings and recommended purchase amounts. For more information, see APIs for Azure reservation automation.

Frequently asked questions

What's the difference between the Enterprise Reporting APIs and the Consumption APIs? When should I use each?

These APIs have a similar set of functionality and can answer the same broad set of questions in the billing and cost management space. But they target different audiences:

PDF Converter - Convert PDF to Word, Excel, HTML or Image Formats. Pdf converter free download Online Document Converter makes it possible for anyone to. In case you do not need batch capabilities but would like to create PDF or Image files from. PDF Converter is a online web-based document to PDF converter software. Convert and create PDF from various types of files like Word DOC, Excel XLS, PowerPoint PPT.

  • Enterprise Reporting APIs are available to customers who have signed an Enterprise Agreement with Microsoft that grants them access to negotiated Azure Prepayment (previously called monetary commitment) and custom pricing. The APIs require a key that you can get from the Enterprise Portal. For a description of these APIs, see Overview of Reporting APIs for Enterprise customers.

  • Consumption APIs are available to all customers, with a few exceptions. For more information, see Azure consumption API overview and the Azure Consumption API reference. We recommend the provided APIs as the solution for the latest development scenarios.

What's the difference between the Invoice API and the Usage Details API?

These APIs provide a different view of the same data:

  • The Invoice API is for Web Direct customers only. It provides a monthly rollup of your bill based on the aggregate charges for each meter type.

  • The Usage Details API provides a granular view of the usage/cost records for each day. Both Enterprise and Web Direct customers can use it.

What's the difference between the Price Sheet API and the RateCard API?

These APIs provide similar sets of data but have different audiences:

  • The Price Sheet API provides the custom pricing that was negotiated for an Enterprise customer.

  • The Azure Retail Prices API provides public-facing pay-as-you-go pricing that applies to Web Direct customers.

Next steps

  • For information about using REST APIs retrieve prices for all Azure services, see Azure Retail Prices overview.

  • To compare your invoice with the detailed daily usage file and the cost management reports in the Azure portal, see Understand your bill for Microsoft Azure.

  • If you have questions or need help, create a support request.

-->

You can use Cost Management automation to build a custom set of solutions to retrieve and manage cost data. This article covers common scenarios for Cost Management automation and options available based on your situation. If you want to develop using APIs, common API request examples and presented to help accelerate your development process.

Automate cost data retrieval for offline analysis

You might need to download your Azure cost data to merge it with other datasets. Or you might need to integrate cost data into your own systems. There are different options available depending on the amount of data involved. You must have Cost Management permissions at the appropriate scope to use APIs and tools in any case. For more information, see Assign access to data.

Suggestions for handling large datasets

Automation

If your organization has a large Azure presence across many resources or subscriptions, you'll have a large amount of usage details data. Excel often can't load such large files. In this situation, we recommend the following options:

Power BI

Power BI is used to ingest and handle large amounts of data. If you're an Enterprise Agreement customer, you can use the Power BI template app to analyze costs for your billing account. The report contains key views used by customers. For more information, see Analyze Azure costs with the Power BI template app.

Power BI data connector

If you want to analyze your data daily, we recommend using the Power BI data connector to get data for detailed analysis. Any reports that you create are kept up to date by the connector as more costs accrue.

Cost Management exports

You might not need to analyze the data daily. If so, consider using Cost Management's Exports feature to schedule data exports to an Azure Storage account. Then you can load the data into Power BI as needed, or analyze it in Excel if the file is small enough. Exports are available in the Azure portal or you can configure exports with the Exports API.

Usage Details API

Consider using the Usage Details API if you have a small cost data set. If you have a large amount of cost data, you should request the smallest amount of usage data as possible for a period. To do so, specify either a small time range or use a filter in your request. For example, in a scenario where you need three years of cost data, the API does better when you make multiple calls for different time ranges rather than with a single call. From there, you can load the data into Excel for further analysis.

Automate retrieval with Usage Details API

The Usage Details API provides an easy way to get raw, unaggregated cost data that corresponds to your Azure bill. The API is useful when your organization needs a programmatic data retrieval solution. Consider using the API if you're looking to analyze smaller cost data sets. However, you should use other solutions identified previously if you have larger datasets. The data in Usage Details is provided on a per meter basis, per day. It's used when calculating your monthly bill. The general availability (GA) version of the APIs is 2019-10-01. Use 2019-04-01-preview to access the preview version for reservation and Azure Marketplace purchases with the APIs.

If you want to get large amounts of exported data regularly, see Retrieve large cost datasets recurringly with exports.

Usage Details API suggestions

Request schedule

We recommend that you make no more than one request to the Usage Details API per day. For more information about how often cost data is refreshed and how rounding is handled, see Understand cost management data.

Target top-level scopes without filtering

Use the API to get all the data you need at the highest-level scope available. Wait until all needed data is ingested before doing any filtering, grouping, or aggregated analysis. The API is optimized specifically to provide large amounts of unaggregated raw cost data. To learn more about scopes available in Cost Management, see Understand and work with scopes. Once you've downloaded the needed data for a scope, use Excel to analyze data further with filters and pivot tables.

Notes about pricing

If you want to reconcile usage and charges with your price sheet or invoice, note the following information.

Price Sheet price behavior - The prices shown on the price sheet are the prices that you receive from Azure. They're scaled to a specific unit of measure. Unfortunately, the unit of measure doesn't always align to the unit of measure at which the actual resource usage and charges are emitted.

Usage Details price behavior - Usage files show scaled information that may not match precisely with the price sheet. Specifically:

  • Unit Price - The price is scaled to match the unit of measure at which the charges are actually emitted by Azure resources. If scaling occurs, then the price won't match the price seen in the Price Sheet.
  • Unit of Measure - Represents the unit of measure at which charges are actually emitted by Azure resources.
  • Effective Price / Resource Rate - The price represents the actual rate that you end up paying per unit, after discounts are taken into account. It's the price that should be used with the Quantity to do Price * Quantity calculations to reconcile charges. The price takes into account the following scenarios and the scaled unit price that's also present in the files. As a result, it might differ from the scaled unit price.
    • Tiered pricing - For example: $10 for the first 100 units, $8 for the next 100 units.
    • Included quantity - For example: The first 100 units are free and then $10 per unit.
    • Reservations
    • Rounding that occurs during calculation – Rounding takes into account the consumed quantity, tiered/included quantity pricing, and the scaled unit price.

A single resource might have multiple records for a single day

Azure resource providers emit usage and charges to the billing system and populate the Additional Info field of the usage records. Occasionally, resource providers might emit usage for a given day and stamp the records with different datacenters in the Additional Info field of the usage records. It can cause multiple records for a meter/resource to be present in your usage file for a single day. In that situation, you aren't overcharged. The multiple records represent the full cost of the meter for the resource on that day.

Example Usage Details API requests

The following example requests are used by Microsoft customers to address common scenarios that you might come across.

Get Usage Details for a scope during specific date range

The data that's returned by the request corresponds to the date when the usage was received by the billing system. It might include costs from multiple invoices. The call to use varies by your subscription type.

For legacy customers with an Enterprise Agreement (EA) or a pay-as-you-go subscription, use the following call:

For modern customers with a Microsoft Customer Agreement, use the following call:

Get amortized cost details

If you need actual costs to show purchases as they're accrued, change the metric to ActualCost in the following request. To use amortized and actual costs, you must use the 2019-04-01-preview version. The current API version works the same as the 2019-10-01 version, except for the new type/metric attribute and changed property names. If you have a Microsoft Customer Agreement, your filters are startDate and endDate in the following example.

Automate alerts and actions with budgets

There are two critical components to maximizing the value of your investment in the cloud. One is automatic budget creation. The other is configuring cost-based orchestration in response to budget alerts. There are different ways to automate Azure budget creation. Various alert responses happen when your configured alert thresholds are exceeded.

The following sections cover available options and provide sample API requests to get you started with budget automation.

How costs are evaluated against your budget threshold

Your costs are evaluated against your budget threshold once per day. When you create a new budget or at your budget reset day, the costs compared to the threshold will be zero/null because the evaluation might not have occurred.

When Azure detects that your costs have crossed the threshold, a notification is triggered within the hour of the detecting period.

View your current cost

To view your current costs, you need to make a GET call using the Query API.

A GET call to the Budgets API won't return the current costs shown in Cost Analysis. Instead, the call returns your last evaluated cost.

Automate budget creation

You can automate budget creation using the Budgets API. You can also create a budget with a budget template. Templates are an easy way for you to standardize Azure deployments while ensuring cost control is properly configured and enforced.

Supported locales for budget alert emails

With budgets, you're alerted when costs cross a set threshold. You can set up to five email recipients per budget. Recipients receive the email alerts within 24 hours of crossing the budget threshold. However, your recipient might need to receive an email in a different language. You can use the following language culture codes with the Budgets API. Set the culture code with the locale parameter similar to the following example.

Languages supported by a culture code:

Culture codeLanguage
en-usEnglish (United States)
ja-jpJapanese (Japan)
zh-cnChinese (Simplified, China)
de-deGerman (Germany)
es-esSpanish (Spain, International)
fr-frFrench (France)
it-itItalian (Italy)
ko-krKorean (Korea)
pt-brPortuguese (Brazil)
ru-ruRussian (Russia)
zh-twChinese (Traditional, Taiwan)
cs-czCzech (Czech Republic)
pl-plPolish (Poland)
tr-trTurkish (Turkey)
da-dkDanish (Denmark)
en-gbEnglish (United Kingdom)
hu-huHungarian (Hungary)
nb-noNorwegian Bokmal (Norway)
nl-nlDutch (Netherlands)
pt-ptPortuguese (Portugal)
sv-seSwedish (Sweden)

Common Budgets API configurations

There are many ways to configure a budget in your Azure environment. Consider your scenario first and then identify the configuration options that enable it. Review the following options:

  • Time Grain - Represents the recurring period your budget uses to accrue and evaluate costs. The most common options are Monthly, Quarterly, and Annual.
  • Time Period - Represents how long your budget is valid. The budget actively monitors and alerts you only while it remains valid.
  • Notifications
    • Contact Emails – The email addresses receive alerts when a budget accrues costs and exceeds defined thresholds.
    • Contact Roles - All users who have a matching Azure role on the given scope receive email alerts with this option. For example, Subscription Owners could receive an alert for a budget created at the subscription scope.
    • Contact Groups - The budget calls the configured action groups when an alert threshold is exceeded.
  • Cost dimension filters - The same filtering you can do in Cost Analysis or the Query API can also be done on your budget. Use this filter to reduce the range of costs that you're monitoring with the budget.

After you've identified the budget creation options that meet your needs, create the budget using the API. The example below helps get you started with a common budget configuration.

Create a budget filtered to multiple resources and tags

Request URL: PUT https://management.azure.com/subscriptions/{SubscriptionId} /providers/Microsoft.Consumption/budgets/{BudgetName}/?api-version=2019-10-01

Configure cost-based orchestration for budget alerts

Billing Automation Systems

You can configure budgets to start automated actions using Azure Action Groups. To learn more about automating actions using budgets, see Automation with Azure Budgets.

Data latency and rate limits

Medical Billing Automation

We recommend that you call the APIs no more than once per day. Cost Management data is refreshed every four hours as new usage data is received from Azure resource providers. Calling more frequently doesn't provide more data. Instead, it creates increased load. To learn more about how often data changes and how data latency is handled, see Understand cost management data.

Error code 429 - Call count has exceeded rate limits

To enable a consistent experience for all Cost Management subscribers, Cost Management APIs are rate limited. When you reach the limit, you receive the HTTP status code 429: Too many requests. The current throughput limits for our APIs are as follows:

  • 30 calls per minute - It's done per scope, per user, or application.
  • 200 calls per minute - It's done per tenant, per user, or application.

Next steps

  • Analyze Azure costs with the Power BI template app.
  • Create and manage exported data with Exports.
  • Learn more about the Usage Details API.