# Statistical changes in user billing points according to the cycle - QueryBillPointDeductionFlowByCycle

## Overview

Statistics on user billing point changes (increase/decrease/reservation) according to the cycle (currently only supports daily).






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `QueryBillPointDeductionFlowByCycle`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.ckcloudai.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ProjectId** | string | Project ID |**Yes**|
| **Type** | string | Period (Available value: day) |**Yes**|
| **StartTime** | string | (Optional) Query start time, format xxxx-xx-xx" translates to "(Optional) Query start time, format xxxx-xx-xx". |No|
| **EndTime** | string | (Optional) Query end time, format xxxx-xx-xx" translates to "(Optional) Query end time, format yyyy-mm-dd". |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **Result** | array[[*CycleBillPointStat*](#cyclebillpointstat)] | Returned data |No|

#### Data Model


#### CycleBillPointStat

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Time** | string | Statistics Time |**Yes**|
| **SubPointNum** | int | Increased Points |**Yes**|
| **AddPointNum** | int | Decrease of decrease |**Yes**|
| **RemainPointNum** | int | Remaining Points |**Yes**|

## Example

### Request Example
    
```
https://api.ckcloudai.com/?Action=QueryBillPointDeductionFlowByCycle
&ProjectId=ViRJHBkS
&Type=BmCRsszk
&StartTime=zSLhhENJ
&EndTime=HnSmEist
```

### Response Example
    
```json
{
  "Action": "QueryBillPointDeductionFlowByCycleResponse",
  "Result": [
    {
      "AddPointNum": 4,
      "RemainPointNum": 3,
      "SubPointNum": 5,
      "Time": "TcRxrYJJ"
    }
  ],
  "RetCode": 0
}
```





