1

The rate card API for Microsoft Azure's billing API:

https://management.azure.com/subscriptions/{subscription-Id}/providers/Microsoft.Commerce/RateCard?api-version={api-version}&$filter=OfferDurableId eq ’{OfferDurableId}’ and Currency lt ’{Currency}’ and Locale eq ’{Locale}’ and RegionInfo eq ’{RegionInfo}’’

requires the regionInfo to be provided for each request. The regionInfo, according to the documentation, refers to the location where the offer was purchased (offer referring to the OfferDurableId). The OfferDurableId can be obtained from the subscription and subsequently from here. However, I didn't find the regionInfo anywhere.

How to get the regionInfo for a subscription?

N.B.: I have raised an issue on the API's github repository.

jobin
  • 2,600
  • 7
  • 32
  • 59
  • How are you obtaining the `OfferDurabledId` from the subscription? – Shaun Luttin Sep 12 '15 at 13:40
  • 2
    From the API to get all subscriptions, the response contains the display name of the offer. From the display name, I can look up [here](http://azure.microsoft.com/en-gb/support/legal/offer-details/) to get the OfferDurableID. – jobin Sep 12 '15 at 13:51

1 Answers1

2

Find out the purchase location as follows:

Login in the Azure Portal. In the top right corner, click on your username and then choose "View my bill." This will open account.windowsazure.com. Choose profile. Your country code will be there.

Hi UserName. Your email is some@domain.ca. The address we have on file is ISO Country Code. Your company is Company Name.

Also, you an look up the two digit ISO region code here: https://www.iso.org/obp/ui/#search For instance, Canada is CA in the ISO list

Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
  • 1
    I am using Azure's usage and billing API's. I only know the user's (using the system I am building) client ID and have access to his account for billing and usage information. How do I get from where he has purchased the offer? – jobin Sep 12 '15 at 13:50
  • 1
    Today, you can't find this information programmatically. You would need to ask your user to give you this information including `OfferDurableId`. The way I am planning on doing in my application is to redirect the user to Azure Portal and tell them where exactly they can find this information. – Gaurav Mantri Sep 12 '15 at 13:53