How to get outstanding balance with Azure billing API

I have to display outstanding balance for a Azure subscription. Currently I am using Resource Usage API (Preview) and Resource RateCard API(Preview) which is giving me very large detailed data for Rate for each meter and its usage. As per this article, I've to multiply Rate card details with the Usage Details.

As in my case, I've to show only outstanding balance lets say 500 USD, and what I am currently getting is rate card and usage details which is not what I am looking for

Is there any way (API) where I can directly get the outstanding balance?

Calling Usage API:

string requesturl = String.Format("https://management.azure.com/subscriptions/{0}/providers/Microsoft.Commerce/

UsageAggregates?api-version=2015-06-01-preview&reportedstartTime=

2015-05-15+00%3a00%3a00Z&reportedEndTime=2015-05-16+00%3a00%3a00Z", subscriptionId);


Calling RateCard API:

string requesturl = String.Format("{0}/{1}/{2}/{3}","https://management.azure.com",
                   "subscriptions",
                   subscriptionId,
                   "providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId eq 'MS-AZR-0121p' and Currency eq 'USD' and Locale eq 'en-US' and RegionInfo eq 'US'");
September 4th, 2015 7:29am

Hi,

 

Thank you for reaching out to us.I am currently researching to gather more information with regards to your request. I shall revert back to you with an update at the earliest. Sincerely appreciate your patience.

Regards.
Free Windows Admin Tool Kit Click here and download it now
September 5th, 2015 4:14am


Hello,

There is no such Api for current credit available.

Check this link for detail info about API:
https://azure.microsoft.com/en-in/documentation/articles/billing-usage-rate-card-overview/

I would request you to leave a feedback here:
http://feedback.azure.com/forums/34192--general-feedback

Regards DOD..
September 6th, 2015 12:31pm

Hi Shreya,

Did you get anything?

Free Windows Admin Tool Kit Click here and download it now
September 7th, 2015 4:50am

Hi SaurabhLprocks,

There isn't an API today that can provide the outstanding balance/ running total for the open billing period, but we are discussing this internally. We don't have an ETA on the ask but certainly understand the value this can bring to the customer.

It would be great if you could leave a detailed ask here: feedback.azure.com/forums/170030-billing

September 9th, 2015 2:40pm

Hi SaurabhLprocks,

There isn't an API today that can provide the outstanding balance/ running total for the open billing period, but we are discussing this internally. We don't have an ETA on the ask but certainly understand the value this can bring to the customer.

It would be great if you could leave a detailed ask here: feedback.azure.com/forums/170030-billing

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 6:38pm

Hi SaurabhLprocks,

There isn't an API today that can provide the outstanding balance/ running total for the open billing period, but we are discussing this internally. We don't have an ETA on the ask but certainly understand the value this can bring to the customer.

It would be great if you could leave a detailed ask here: feedback.azure.com/forums/170030-billing

September 9th, 2015 6:38pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics