All Products
Search
Document Center

QueryInstanceBill

Last Updated: Jun 18, 2020

API Name

QueryInstanceBill

Overview

You can call this operation to query the bill information of the monthly instacne or billing item in a specified billing cycle.

Request parameters

Name Type Required Description
BillingCycle String Yes The billing cycle. Format: YYYY-MM. Example: 2018-07
ProductCode String No The code of the specified product.
ProductType String No The type of the specified product.
SubscriptionType String No The type of billing method. Valid values: Subscription and PayAsYouGo.
IsBillingItem String No Whether to get data in BillingItem level. True is BillingItem, false is Instance level. By default is Instance.
IsHideZeroCharge String No According to the PretaxGrossAmount and the PretaxAmount are 0 that to filter data. By default is False (compatible with existing logic)
PageNum Integer No Page number,default:1
PageSize Integer No Number of per page,default:20,max:300
OwnerId Long No The ID of the owner. OwnerID must be specified in BID scene/distribution scene
Granularity String No The granularity of the billing, Valid values: MONTHLY or DAILY
BillingDate String No The billing date,Only used when Granularity is DAILY,format: YYYY-MM-DD

Response parameters

Name Type Required
BillingCycle String The billing cycle. Format: YYYY-MM.
AccountID String Account unique ID
AccountName String Account name.
TotalCount String Total count number.
PageNum Integer
PageSize Integer
Items Item The billing details of Alibaba Cloud services.

Item:

Name Type Required
OwnerID String Subaccount accountid
CostUnit String Cost unit defined by user.
SubscriptionType String The type of billing method. Valid values: Subscription and PayAsYouGo.
Item String SubscriptionOrder/PayAsYouGoBill/Refund/Adjustment
ProductCode String The code of the specified product.
ProductName String The name of the specified product.
ProductType String The type of the specified product.
ProductDetail String Product detail information
BillingType String Billing type.
InstanceID String Instance name
NickName String Instance nick name.
ResourceGroup String Resource group name
Tag String Tag information,format:key1:value1;key2:value2…
InstanceConfig String Instance configuration information, for example,OS:1970324836975976;CPU:12
InstanceSpec String Instance spec, for example: ecs.sn1ne.3xlarge
InternetIP String Internet IP address
IntranetIP String Intranet IP address
Region String Region
Zone String Availability zone
BillingItem String Billing item information,only available when the input parameter ‘isBillingItem’ is true
ListPrice String List price,only available when the input parameter ‘isBillingItem’ is true
ListPriceUnit String Unit of list price,only available when the input parameter ‘isBillingItem’ is true
Usage String Usage,only available when the input parameter ‘isBillingItem’ is true
UsageUnit String Unit of usage,only available when the input parameter ‘isBillingItem’ is true
DeductedByResourcePackage String Dedecuted with resource package,only available when the input parameter ‘isBillingItem’ is true
PretaxGrossAmount Double The pretax gross amount.
InvoiceDiscount Double The invoice discount amount.
DeductedByCoupons Double The amount deducted with coupons.
PretaxAmount Double The pretax amount, which is the total refunded amount when the system handles a refund request.
DeductedByCashCoupons Double Vouchers deduction
DeductedByPrepaidCard Double Stored value card deduction
PaymentAmount Double The amount paid with cash.
OutstandingAmount Double The outstanding amount of a common user or the amount of credit used by a credit customer.
Currency String CNY/USD/JPY
BillingDate String The date of billing, only avaliable when granularity is DAILY
  • Note 1: The instance bill is generated based on the bill data split, usually one day delay;

  • Note 2: The instance information will change during the accounting period. The monthly summary instances Config and Spec correspond to the record generation time information. For details, please refer to the corresponding detailed bill;

  • Note 3: The instance and billing bills do not include Ali Communications and Domain Name products.

Sample requests

  1. &Action=QueryInstanceBill
  2. &BillingCycle=2018-10

Sample responses

  1. "Data": {
  2. "Items": {
  3. "Item": [
  4. {
  5. "ListPrice": "",
  6. "BillingItem": "",
  7. "NickName": "",
  8. "PretaxAmount": 0,
  9. "Usage": "",
  10. "Region": "",
  11. "InstanceConfig": "-",
  12. "Item": "SubscriptionOrder",
  13. "UsageUnit": "",
  14. "IntranetIP": "",
  15. "ProductType": "cmjj011736",
  16. "Tag": "",
  17. "ProductName": "Third-Party Services in Marketplace",
  18. "Zone": "",
  19. "PretaxGrossAmount": 0,
  20. "Currency": "USD",
  21. "InvoiceDiscount": 0,
  22. "SubscriptionType": "Subscription",
  23. "ResourceGroup": "",
  24. "ProductCode": "mpintl-mt9-dt41",
  25. "InstanceID": "5000000124771",
  26. "ProductDetail": "",
  27. "ListPriceUnit": "",
  28. "CostUnit": "Not Allocated",
  29. "DeductedByResourcePackage": "",
  30. "InternetIP": "",
  31. "DeductedByCoupons": 0,
  32. "InstanceSpec": "",
  33. "OwnerID": "54**********188",
  34. "BillingType": "Others"
  35. },
  36. {
  37. "ListPrice": "",
  38. "BillingItem": "",
  39. "NickName": "",
  40. "PretaxAmount": 0,
  41. "Usage": "",
  42. "Region": "",
  43. "InstanceConfig": "-",
  44. "Item": "SubscriptionOrder",
  45. "UsageUnit": "",
  46. "IntranetIP": "",
  47. "ProductType": "cmjj011736",
  48. "Tag": "",
  49. "ProductName": "Third-Party Services in Marketplace",
  50. "Zone": "",
  51. "PretaxGrossAmount": 0,
  52. "Currency": "USD",
  53. "InvoiceDiscount": 0,
  54. "SubscriptionType": "Subscription",
  55. "ResourceGroup": "",
  56. "ProductCode": "mpintl-mt9-dt41",
  57. "InstanceID": "5000000124647",
  58. "ProductDetail": "",
  59. "ListPriceUnit": "",
  60. "CostUnit": "Not Allocated",
  61. "DeductedByResourcePackage": "",
  62. "InternetIP": "",
  63. "DeductedByCoupons": 0,
  64. "InstanceSpec": "",
  65. "OwnerID": "54**********188",
  66. "BillingType": "Others"
  67. },
  68. {
  69. "ListPrice": "",
  70. "BillingItem": "",
  71. "NickName": "",
  72. "PretaxAmount": 0,
  73. "Usage": "",
  74. "Region": "",
  75. "InstanceConfig": "-",
  76. "Item": "SubscriptionOrder",
  77. "UsageUnit": "",
  78. "IntranetIP": "",
  79. "ProductType": "cmjj016159",
  80. "Tag": "",
  81. "ProductName": "Third-Party Services in Marketplace",
  82. "Zone": "",
  83. "PretaxGrossAmount": 0,
  84. "Currency": "USD",
  85. "InvoiceDiscount": 0,
  86. "SubscriptionType": "Subscription",
  87. "ResourceGroup": "",
  88. "ProductCode": "mpintl-mt9-dt41",
  89. "InstanceID": "5000000137147",
  90. "ProductDetail": "",
  91. "ListPriceUnit": "",
  92. "CostUnit": "Not Allocated",
  93. "DeductedByResourcePackage": "",
  94. "InternetIP": "",
  95. "DeductedByCoupons": 0,
  96. "InstanceSpec": "",
  97. "OwnerID": "54**********188",
  98. "BillingType": "Others"
  99. },
  100. ]
  101. },
  102. "TotalCount": 17,
  103. "BillingCycle": "2018-10",
  104. "AccountID": "54**********188",
  105. "PageSize": 20,
  106. "AccountName": "w********",
  107. "PageNum": 1
  108. },
  109. "Message": "Successful!",
  110. "RequestId": "A1161648-6BBE-4AFF-A347-070CA5558B30",
  111. "Success": true,
  112. "Code": "Success"