0

I am trying to fetch rate card data for the usage information for my PAY-AS-YOU-GO Azure account using the following API:

https://management.azure.com/subscriptions/<subscription_id>/providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId+eq+'MS-AZR-0003P'+and+Currency+eq+'USD'+and+Locale+eq+'en-US'+and+RegionInfo+eq+'IN'

And I get the expected rate card data. However, when I change the currency to something like GBP, I get a 400/Bad request as response.

Any idea if I can get the response in any desired currency? If yes, then how? If no, is there a documentation which will help me in identifying which currencies are permissible in the request for a particular region?

jobin
  • 2,600
  • 7
  • 32
  • 59

1 Answers1

1

I don't think you can do this (and that's why you're getting a 400 error). If you look at the error details, you will see something like below:

Invalid region info:in and currency code:GBP combination specified

If you want to get the rate card information in other currencies, you would need to ensure that proper combination of currency code and region is specified. For example if you try GBP and GB for currency and country code respectively, you will get desired reults.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • However, then the rate card information will be application to Great Britain, right? I need the rate card information application to the region I specify but in the currency I specify. – jobin Nov 18 '15 at 10:09
  • So the region you specify in your query is the country where you purchased the Azure Subscription. I don't think Azure will allow you to purchase a subscription in India and pay for it in GBP. There's a list of countries and the billing currency published here: https://azure.microsoft.com/en-in/offers/ms-azr-0003p/. – Gaurav Mantri Nov 18 '15 at 10:13
  • Even if I go by that document, even a request for `regionInfo:In & currency: USD` should have failed, right? – jobin Nov 18 '15 at 10:15
  • Normally I would agree but India and USD is a different story :). Till some time ago, your Azure Subscriptions in India were charged in USD. In fact, I have a BizSpark subscription with Billing address in India that gets charged in USD. – Gaurav Mantri Nov 18 '15 at 10:17