Obtain Billing Details - ListUBillDetail
Overview
Retrieve all expenditures within a certain billing period.
💡 Obtaining the details of the current month's bill usually has a one-day delay.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is ListUBillDetail . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
BillingCycle | string | Billing period, YYYY-MM, for example 2021-08, only supports queries after 2018-05. | Yes |
ProjectName | string | Project Name (Filter option, default all) | No |
ResourceIds.N | string | Resource ID (Filter option, all by default) Supports multiple filters, please add multiple fields in the request parameters for multiple filters Example ResourceIds.0: uhost-bzgf1gh5, ResourceIds.1: uhost-gu1xpspa, | No |
OrderType | string | Order Type (Filter option, default is all). Enumeration values: > OT_BUY: New Purchase > OT_RENEW: Renewal > OT_UPGRADE: Upgrade > OT_DOWNGRADE: Downgrade > OT_SUSPEND: Settlement > OT_ADDITIONAL: Additional Order > OT_REFUND: Deletion > OT_POSTPAID_RENEW: Expiration > OT_POSTPAID_PAYMENT: Postpaid > OT_RECOVER: Deletion Recovery | No |
ChargeType | string | Billing Method (Filter option, default all). Enumerated values: > Year: Yearly > Month: Monthly > Day: Daily > Dynamic: Hourly > Used: Pay-as-you-go > Donate: Gift > Trial: Trial > Post: Postpaid > Spot: Spot Instance | No |
ShowZero | int | Display $0 orders or not (0 for not displaying, 1 for displaying, default is 0) | No |
PaidState | int | Payment Status (Filter option, 1: Display unpaid orders only; 2: Display paid orders only; 0: Display both) Current month pass 1 or 0, will return all historical unpaid bills; Historical months do not support unpaid query, please do not pass 1 | No |
UserEmail | string | User email, can be filtered according to the user's email | No |
Limit | int | Number per page, default value is 25, maximum value: 100. | No |
Offset | int | Data Offset (Default 0) | No |
ResourceTypes.N | string | Product Type (Filter option, default is all), Supports multiple filters, please add multiple fields in the request parameters for multiple filtering. Enumerated values: > uhost: UHost > udisk: UDisk > udb: UDB > eip: Elastic IP > ufile: Object Storage > fortress_host: Fortress Machine > ufs: UFS > waf: WEB Application Firewall > ues: Elastic Search > udisk_ssd: SSD UDisk > rssd: RSSD UDisk | 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 |
Items | array[BillDetailItem] | Bill Details Array | Yes |
TotalCount | int | Total Length of Billing Details | Yes |
Data Model
BillDetailItem
Field Name | Type | Description Information | Required |
---|---|---|---|
ProjectId | string | Project ID | Yes |
Amount | string | Total Order Amount | Yes |
AmountReal | string | Payment from Cash Account | Yes |
AmountFree | string | Deductible Gift Amount | Yes |
AmountCoupon | string | Voucher Deduction | Yes |
AzGroupCName | string | Availability Zone | Yes |
ChargeType | string | Billing Method (Filter option, default is all). Enumeration values: > Year: Yearly > Month: Monthly > Day: Daily > Dynamic: Hourly > Used: Pay-as-you-go > Donate: Gift > Trial: Trial > Post: Postpaid > Spot: Spot Instance | Yes |
CreateTime | int | Creation Time (Timestamp) | Yes |
StartTime | int | Start Time (Timestamp) | Yes |
EndTime | int | End Time (Timestamp) | Yes |
OrderNo | string | Order Number | Yes |
OrderType | string | Order Type (Filter option, default is all). Enumeration values: > OT_BUY: New Purchase > OT_RENEW: Renewal > OT_UPGRADE: Upgrade > OT_DOWNGRADE: Downgrade > OT_SUSPEND: Settlement > OT_ADDITIONAL: Supplement > OT_REFUND: Deletion > OT_POSTPAID_RENEW: Expired > OT_POSTPAID_PAYMENT: Postpaid > OT_RECOVER: Deletion Recovery | Yes |
ProjectName | string | Project Name | Yes |
BusinessGroup | string | Business Group | Yes |
ResourceId | string | Resource ID | Yes |
ResourceType | string | Product type. Enumerated values: > uhost: UHost > udisk: UDisk > udb: UDB > eip: Elastic IP > ufile: US3 > fortress_host: Fortress Host > ufs: UFS > waf: WEB Application Firewall > ues: Elastic Search > udisk_ssd: SSD UDisk > rssd: RSSD UDisk | Yes |
ResourceTypeCode | int | Product Type Code | Yes |
ItemDetails | array[ItemDetail] | Product Configuration | Yes |
ResourceExtendInfo | array[ResourceExtendInfo] | Resource Identifier | Yes |
ResourceLabel | object | Resource Tags. Map of string key-value pairs: {"cs_label": "cs_label_value"} | Yes |
ShowHover | int | Order payment status. Enumerated values: > 0: Unpaid > 1: Paid | Yes |
UserEmail | string | Account Email | Yes |
UserName | string | Account Name | Yes |
UserDisplayName | string | Account Nickname | Yes |
Admin | int | Whether it is a main account. Enumerated values: > 0: Sub-account > 1: Main account | Yes |
ItemDetail
Field Name | Type | Description Information | Required |
---|---|---|---|
ProductName | string | Subcategory Name | Yes |
Value | string | Product Subcategory Specifications | Yes |
ResourceExtendInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
KeyId | string | Resource Health Indicator | Yes |
Value | string | Resource Identifier Value | Yes |
Example
Request Example
https://api.ucloud-global.com/?Action=ListUBillDetail
&BillingCycle= 2022-01,
&ResourceTypes.0= uhost,
&ResourceTypes.1= udisk,
&ProjectName= Default,
&ResourceIds.0= uhost-bzgf1gh5,
&ResourceIds.1= uhost-gu1xpspa,
&OrderType= OT_RENEW,
&ChargeType= Dynamic,
&ShowZero= 0,
&PaidState= 0,
&Limit= 25,
&Offset= 0
Response Example
{
"Action": "ListUBillDetailResponse",
"Items": [
{
"Admin": 1,
"Amount": "4.21",
"AmountCoupon": "0.00",
"AmountFree": "0.00",
"AmountReal": "4.21",
"AzGroupCName": "北京二",
"ChargeType": "Dynamic",
"CreateTime": 1643641241,
"EndTime": 1643644800,
"ItemDetails": [
{
"ProductName": "主机CPU",
"Value": "4核"
},
{
"ProductName": "主机内存",
"Value": "16384MB"
},
{
"ProductName": "GPU_P40",
"Value": "1颗"
},
{
"ProductName": "SSD云盘(系统盘)",
"Value": "40GB"
}
],
"OrderNo": "20220131033108259519838",
"OrderType": "OT_RENEW",
"ProjectName": "Default",
"ResourceExtendInfo": [
{
"KeyId": "name",
"Value": "UHost-hl4"
},
{
"KeyId": "private_ip",
"Value": "10.25.113.204"
}
],
"ResourceId": "uhost-bzgf1gh5",
"ResourceType": "uhost",
"ResourceTypeCode": 1,
"ShowHover": 1,
"StartTime": 1643641200,
"UserDisplayName": "数据学院",
"UserEmail": "daseucloud@foxmail.com",
"UserName": "root"
},
{
"Admin": 1,
"Amount": "4.21",
"AmountCoupon": "0.00",
"AmountFree": "0.00",
"AmountReal": "4.21",
"AzGroupCName": "北京二",
"ChargeType": "Dynamic",
"CreateTime": 1643641239,
"EndTime": 1643644800,
"ItemDetails": [
{
"ProductName": "主机CPU",
"Value": "4核"
},
{
"ProductName": "主机内存",
"Value": "16384MB"
},
{
"ProductName": "GPU_P40",
"Value": "1颗"
},
{
"ProductName": "SSD云盘(系统盘)",
"Value": "40GB"
}
],
"OrderNo": "20220131032808257245615",
"OrderType": "OT_RENEW",
"ProjectName": "Default",
"ResourceExtendInfo": [
{
"KeyId": "name",
"Value": "UHost-hl2"
},
{
"KeyId": "private_ip",
"Value": "10.25.98.190"
}
],
"ResourceId": "uhost-gu1xpspa",
"ResourceType": "uhost",
"ResourceTypeCode": 1,
"ShowHover": 1,
"StartTime": 1643641200,
"UserDisplayName": "数据学院",
"UserEmail": "daseucloud@foxmail.com",
"UserName": "root"
}
],
"RetCode": 0,
"TotalCount": 2
}