Polyv Help Center

Help Center

Query Sub-Account Billing Statistics List

Updated: 2026-03-05 17:52:40

API Description

1、集团账号查询分账号账单统计列表
2、接口支持https协议

API URL

https://api.polyv.net/live/v4/group/user/billing-daily/list

Online API Call

Request Method

GET

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details

  2. For group account APIs, use the group master account's appId and appSecret for signature calculation.

  3. The billing period must be after 202204.

Request Parameter Description

Parameter Required Type Description
appId true String Group master account appId See details in Group Account 2.0 Key Acquisition
timestamp true Long Current 13-digit millisecond timestamp, valid within 3 minutes
sign true String Signature, a 32-character uppercase MD5 value. The appSecret used for signature generation is critical for communication data security. It must not be stored or used directly on the client. All APIs must be called through your own server to relay requests to the POLYV server for response data. See Signature Generation Rules
startDate true String Start date of the billing period, format yyyyMM, e.g., 202205. Must be after 202204.
endDate true String End date of the billing period, format yyyyMM, e.g., 202205. Must be after 202204.
email false String Sub-account email
pageSize false Integer Number of items per page, default 10, maximum 1000
pageNumber false Integer Current page number, default 1

Example

http://api.polyv.net/live/v4/group/user/billing-daily/list?appId=g8dtv537aq&timestamp=1653485867000&sign=32389FC010815EDE76028D587FFA6FB3&startDate=202505&endDate=202510

Response Parameter Description

Parameter Type Description
code Integer Status code, same as HTTP status code, used to determine basic response status
status String Response result, determined by business logic. Returns "success" on success, "error" on failure.
success Boolean Whether the response was successful
requestId String Request ID, a unique UUID generated for each request. For debugging and troubleshooting only, not for business logic.
error Object Error information when status code is not 200 See Error Field Description
data Object Billing list See Data Field Description

Error Parameter Description

Parameter Type Description
code Integer Error code, used to identify the specific error reason
desc String Error description, corresponding to error.code

Data Parameter Description

Parameter Type Description
pageNumber Integer Current page number
pageSize Integer Number of items per page
totalPages Long Total number of pages
totalItems Long Total number of items
contents Array Content of the current page See Contents Field Description

Contents Parameter Description

Parameter Type Description
unionId String Group sub-account ID
accountPeriod String Billing period
production String Product: Cloud Live / Cloud VOD
category String Usage type
Cloud Live: Watch minutes / Co-host minutes / Low-latency minutes / Director duration
Cloud VOD: Video playback / Storage space, etc.
itemConsumed Float Usage amount
itemConsumedUnit String Usage unit
statAt String Settlement date, daily, format yyyy-MM-dd
tradeType Integer Transaction type
1: Usage settlement
2: Amount settlement
3: Deduction adjustment
4: Refund adjustment

Java Request Example

For quick integration, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source code project. The test cases include HttpUtil.java and LiveSignUtil.java in the downloaded file.

It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.

private static final Logger log = LoggerFactory.getLogger(QueryGroupUserBillingListTest.class);
/**
 * 查询分账号账单统计列表
 * @throws IOException
 * @throws NoSuchAlgorithmException
 */
@Test
public void groupUserBillingListTest() throws IOException, NoSuchAlgorithmException {
    //公共参数,填写自己的实际参数
    String appId = super.groupAppId;
    String appSecret = super.groupAppSecret;
    String timestamp = String.valueOf(System.currentTimeMillis());
    
    //业务参数
    String url = "http://api.polyv.net/live/v4/group/user/billing-daily/list";
    String startDate = "202205";
    String endDate = "202210";
    String email = "xxxxx@polyv.net";
    
    //http 调用逻辑
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp", timestamp);
    requestMap.put("startDate", startDate);
    requestMap.put("endDate", endDate);
    requestMap.put("email", email);
    requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
    
    String response = HttpUtil.get(url, requestMap);
    log.info("测试查询分账号账单统计列表成功:{}", response);
    //do somethings
}

Response Example

For global system error descriptions, see Global Error Description

Success Example

{
    "code": 200,
    "status": "success",
    "requestId": "71c487ed89a94ca0b29e8779ea96f84b.57.16529454016270601",
    "data":
    {
        "pageNumber": 1,
        "pageSize": 10,
        "totalPages": 1,
        "totalItems": 7,
        "contents": [
            {
                "unionId": "******",
                "accountPeriod": "2022-05",
                "email": null,
                "memo": null,
                "production": "直播",
                "category": "导播时长",
                "itemConsumed": 120.00,
                "itemConsumedUnit": "分钟",
                "statAt": "2022-05-12",
                "tradeType": 1
            },
            {
                "unionId": "******",
                "accountPeriod": "2022-05",
                "email": null,
                "memo": null,
                "production": "直播",
                "category": "导播时长",
                "itemConsumed": 80.00,
                "itemConsumedUnit": "分钟",
                "statAt": "2022-05-12",
                "tradeType": 2
            },
            {
                "unionId": "******",
                "accountPeriod": "2022-05",
                "email": null,
                "memo": null,
                "production": "直播",
                "category": "国内观看时长",
                "itemConsumed": 71.00,
                "itemConsumedUnit": "分钟",
                "statAt": "2022-05-16",
                "tradeType": 2
            },
            {
                "unionId": "******",
                "accountPeriod": "2022-05",
                "email": null,
                "memo": null,
                "production": "点播",
                "category": "存储空间",
                "itemConsumed": 0.50,
                "itemConsumedUnit": "GB",
                "statAt": "2022-05-17",
                "tradeType": 2
            },
            {
                "unionId": "******",
                "accountPeriod": "2022-05",
                "email": null,
                "memo": null,
                "production": "直播",
                "category": "国内观看时长",
                "itemConsumed": 88.00,
                "itemConsumedUnit": "分钟",
                "statAt": "2022-05-18",
                "tradeType": 2
            },
            {
                "unionId": "******",
                "accountPeriod": "2022-05",
                "email": null,
                "memo": null,
                "production": "点播",
                "category": "存储空间",
                "itemConsumed": 0.50,
                "itemConsumedUnit": "GB",
                "statAt": "2022-05-18",
                "tradeType": 2
            },
            {
                "unionId": "******",
                "accountPeriod": "2022-05",
                "email": null,
                "memo": null,
                "production": "点播",
                "category": "存储空间",
                "itemConsumed": 0.50,
                "itemConsumedUnit": "GB",
                "statAt": "2022-05-19",
                "tradeType": 2
            }]
    },
    "success": true
}

Error Example

{
    "code": 400,
    "status": "error",
    "error": {
        "code": 10003,
        "desc": "时间戳过期"
    },
    "success": false
}
联系客服,在线咨询