> 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/describecustomerbalance.md).

# DescribeMonthlyBillSummary

## 1. API Description

This API is used to query monthly spend by product or by resource group.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

<table><thead><tr><th width="195">Parameter Name</th><th width="115">Required</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>summaryType</td><td>No</td><td>Enum of <a href="/pages/faGaDHzEBVopTOJSsemY#summarytype">SummaryType</a></td><td>Query bills by by product or by resource group.<br>Default value: <code>PRODUCT</code></td></tr><tr><td>billMonthly</td><td>No</td><td>Integer</td><td><p>Month of the bill.</p><p>Default value: the current month.</p></td></tr></tbody></table>

## 3. Output Parameters

<table><thead><tr><th width="195">Parameter Name</th><th width="192">Type</th><th>Description</th></tr></thead><tbody><tr><td>requestId</td><td>String</td><td>The unique request ID, which is returned for each request. RequestId is required for locating a problem.</td></tr><tr><td>billMonthly</td><td>Integer</td><td>Month of the bill.</td></tr><tr><td>totalSpend</td><td>Double</td><td>Total spend</td></tr><tr><td>totalCash</td><td>Double</td><td>Total cash.</td></tr><tr><td>totalRefund</td><td>Double</td><td>Total refund.</td></tr><tr><td>totalVoucher</td><td>Double</td><td>Total voucher.</td></tr><tr><td>summaryInfoList</td><td>Array of <a href="/pages/faGaDHzEBVopTOJSsemY#monthlybillsummary">MonthlyBillSummary</a></td><td>List of bill data.</td></tr></tbody></table>

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query monthly spend.**

```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": {
        "billMonthly": 202307,
        "totalSpend": 3781.650000,
        "summaryInfoList": [
            {
                "product": null,
                "resourceGroupName": "Default Resource Group",
                "voucher": 0.000000,
                "spend": 1732.650000,
                "resourceGroupId": "29b4a7bd-b1c7-4f81-b2cb-d75084811ca9",
                "cash": 3781.650000,
                "refund": 2049.000000
            }
        ],
        "requestId": "T7BAF1918-4900-4CBC-B2AD-08A11854DBDD",
        "totalVoucher": 0.000000,
        "totalRefund": 2049.000000,
        "totalCash": 1732.650000
    }
}

```

{% endtab %}
{% endtabs %}

## 5. Developer Resources <a href="#id-5.-kai-fa-zhe-gong-ju" id="id-5.-kai-fa-zhe-gong-ju"></a>

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

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