All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

GetPostpayDetailBill

Last updated:2021-07-16 15:31:59

GetPostpayDetailBill

You can call this operation to query the details of a postpaid bill by product code or project ID.
Note: You can query the details only of postpaid bills that are generated after June 2018.

Request parameters

Parameter Type Required Length (number of characters) Format Description
Action String Yes Fixed value [a-zA-Z]+ The operation that you want to perform. Set the value to GetPostpayDetailBill.
Version String Yes Fixed value The version number of the API operation. Set the value to 2018-06-01.
BillStartMonth String Yes YYYY-MM The start month of the bill. Example: 2018-06. This parameter is required.
BillEndMonth String Yes YYYY-MM The end month of the bill. This parameter is required.
ProductCode String No The code of the product based on which you query the bill. Example: KEC. This parameter is optional. If you do not specify this parameter, the bills of all products are returned. For more information about product codes, see GetProductCode.
ProjectId String No The ID of the project based on which you query the bill. This parameter is optional. If you do not specify this parameter, the bills of all projects are returned.


Response parameters

Parameter Type Description
RequestId String The ID of the request.
PostpayDetailBillSet PostpayDetailBill array The details of the bill.


Error codes

Error code Error message HTTP status code Description
InvalidParameter There is one or more invalid parameter(%s)." 400 The error message returned because the %s parameter is invalid. For more information about the parameter, see %s.
Forbidden Request user %s forbidden request this api" 400 The error message returned because the user denies the API request. For more information about the user ID, see %s.
Server unavailable Server error 500 The error message returned because exceptions occur on the backend server.


Successful call examples

In the following example, the details of the KEC bill of the default project in June 2018 is queried.

Sample requests

https://bill.api.ksyun.com/?Action=GetPostpayDetailBill
&Version=2018-06-01
&BillStartMonth=2018-06
&BillEndMonth=2018-06
&ProductCode=KEC
&ProjectId=0
&Common request parameters

Sample success responses

  • XML format
<GetPostpayDetailBillResponse>
    <RequestId>ht-test</RequestId>
    <PostpayDetailBillSet>
        <Item>
            <DetailBillNo>000000017299675</DetailBillNo>
            <BillMonth>2018-06</BillMonth>
            <CustomerId>73400575</CustomerId>
            <DetailBillStartTime>2018-06-01 00:00:00</DetailBillStartTime>
            <DetailBillEndTime>2018-06-25 23:59:59</DetailBillEndTime>
            <ProductCode>KEC</ProductCode>
            <ProductName>KEC</ProductName>
            <ProductSubTypeName>Local high-performance KEC instance</ProductSubTypeName>
            <InstanceId>c35d5c4a-06e6-446c-811f-db5380e8627c</InstanceId>
            <InstanceName>KSC180308172229_1</InstanceName>
            <Cost>55.00</Cost>
            <ServiceStartTime>2018-03-08 17:22:54</ServiceStartTime>
            <BillType>Pay-By-Daily-Config</BillType>
            <BillDays>25</BillDays>
            <BillHours>0</BillHours>
            <RegionName>Yizhuang (VPC)</RegionName>
            <ZoneName>Availability zone A of CN North 1 (Beijing)</ZoneName>
            <RuleRemark></RuleRemark>
            <MeasureAmount>73.33</MeasureAmount>
            <Discount>0.75</Discount>
            <ProjectId>0</ProjectId>
            <ProjectName>Default project</ProjectName>
            <ProviderSet>
                <ProviderItem>
                    <Key>Operating system</Key>
                    <Value>linux</Value>
                </ProviderItem>
            </ProviderSet>
            <ConfigSet>
                <ConfigItem>
                    <Key>SSD size, in GB</Key>
                    <Value>50.0000</Value>
                </ConfigItem>
                <ConfigItem>
                    <Key>Number of CPU cores</Key>
                    <Value>1.0000</Value>
                </ConfigItem>
                <ConfigItem>
                    <Key>Size of the Serial Advanced Technology Attachment (SATA) disk, in GB</Key>
                    <Value></Value>
                </ConfigItem>
                <ConfigItem>
                    <Key>Memory size, in GB</Key>
                    <Value>1.0000</Value>
                </ConfigItem>
            </ConfigSet>
            <ExtraSet>
                <ExtraItem>
                    <Key>Private IP address</Key>
                    <Value>10.136.26.121</Value>
                </ExtraItem>
                <ExtraItem>
                    <Key>Public IP address</Key>
                    <Value></Value>
                </ExtraItem>
            </ExtraSet>
            <TagSet/>
        </Item>
    </PostpayDetailBillSet>
</GetPostpayDetailBillResponse>
  • JSON format
{
    "RequestId": "ht-test",
    "PostpayDetailBillSet": [
        {
            "DetailBillNo": "000000017299675",
            "BillMonth": "2018-06",
            "CustomerId": "73400575",
            "DetailBillStartTime": "2018-06-01 00:00:00",
            "DetailBillEndTime": "2018-06-25 23:59:59",
            "ProductCode": "KEC",
            "ProductName": "KEC",
            "ProductSubTypeName": "Local high-performance KEC instance",
            "InstanceId": "c35d5c4a-06e6-446c-811f-db5380e8627c",
            "InstanceName": "KSC180308172229_1",
            "Cost": "55.00",
            "ServiceStartTime": "2018-03-08 17:22:54",
            "BillType": "Pay-By-Daily-Config",
            "BillDays": "25",
            "BillHours": "0",
            "RegionName": "Yizhuang (VPC)",
            "ZoneName": "Availability zone A of CN North 1 (Beijing)",
            "RuleRemark": "",
            "MeasureAmount": "73.33",
            "Discount": "0.75",
            "ProjectId": "0",
            "ProjectName": "Default project",
            "ProviderSet": [
                {
                    "Key": "Operating system",
                    "Value": "linux"
                }
            ],
            "ConfigSet": [
                {
                    "Key": "SSD size in GB",
                    "Value": "50.0000"
                },
                {
                    "Key": "Number of CPU cores",
                    "Value": "1.0000"
                },
                {
                    "Key": "Size of the SATA disk, in GB",
                    "Value": ""
                },
                {
                    "Key": "Memory size, in GB",
                    "Value": "1.0000"
                }
            ],
            "ExtraSet": [
                {
                    "Key": "Private IP address",
                    "Value": "10.136.26.121"
                },
                {
                    "Key": "Public IP address",
                    "Value": ""
                }
            ],
            "TagSet": []
        }
    ]
}
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback