> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/platform-service/zbc/bill/describemonthlybillsummary.md).

# DescribeMonthlyBillSummary

## 1. API Description

This API (DescribeMonthlyBillSummary) is used to queries the monthly bill summary amounts by product or resource group, together with the overall bill totals.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type                                                                            | Description                                  |
| -------------- | -------- | ------------------------------------------------------------------------------- | -------------------------------------------- |
| billMonthly    | No       | Integer                                                                         | Bill month. Defaults to the current month.   |
| summaryType    | No       | [SummaryType](/api-reference/platform-service/zbc/datastructure.md#summarytype) | bill summary dimension. Defaults to PRODUCT. |

## 3. Output Parameters

| Parameter Name  | Type                                                                                                   | Description                                                                                                           |
| --------------- | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| requestId       | String                                                                                                 | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| billMonthly     | Integer                                                                                                | Bill month.                                                                                                           |
| totalSpend      | Float                                                                                                  | Total spend.                                                                                                          |
| totalVoucher    | Float                                                                                                  | Total amount paid with vouchers.                                                                                      |
| totalCash       | Float                                                                                                  | Total amount paid in cash.                                                                                            |
| totalRefund     | Float                                                                                                  | Total refund amount.                                                                                                  |
| summaryInfoList | Array of [MonthlyBillSummary](/api-reference/platform-service/zbc/datastructure.md#monthlybillsummary) | bill summary group list.                                                                                              |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Query the bill summary of a specified month by resource group.**

```json
POST /api/v2/zbc HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeMonthlyBillSummary
<Common Request Params>

Request:
  {
    "billMonthly": 202307,
    "summaryType": "RESOURCE_GROUP"
  }

Response:
  {
    "requestId": "T7BAF1918-4900-4CBC-B2AD-08A11854DBDD",
    "response": {
      "requestId": "T7BAF1918-4900-4CBC-B2AD-08A11854DBDD",
      "billMonthly": 202307,
      "totalSpend": 3781.650000,
      "totalVoucher": 0.000000,
      "totalCash": 1732.650000,
      "totalRefund": 2049.000000,
      "summaryInfoList": [
        {
          "resourceGroupId": "29b4a7bd-b1c7-4f81-b2cb-d75084811ca9",
          "resourceGroupName": "Default Resource Group",
          "spend": 1732.650000,
          "voucher": 0.000000,
          "cash": 3781.650000,
          "refund": 2049.000000
        }
      ]
    }
  }
```

**2. Query using the default dimension and the default month.**

```json
POST /api/v2/zbc HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeMonthlyBillSummary
<Common Request Params>

Request:
  {}

Response:
  {
    "requestId": "TA47C1E09-52B8-4D3F-91A6-7C0E5B82D164",
    "response": {
      "requestId": "TA47C1E09-52B8-4D3F-91A6-7C0E5B82D164",
      "billMonthly": 202408,
      "totalSpend": 1204.500000,
      "totalVoucher": 100.000000,
      "totalCash": 1104.500000,
      "totalRefund": 0.000000,
      "summaryInfoList": [
        {
          "product": "Compute",
          "spend": 1204.500000,
          "voucher": 100.000000,
          "cash": 1104.500000,
          "refund": 0.000000
        }
      ]
    }
  }
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |
