Finance Summary
Retrieve your financial and billing summary.
Hint: The data returned is as of the previous hour or earlier, it may be delayed from the data displayed in the Console.
Privileges#
This API requires the account owner to enable permissions for the credentials in the Console.
- Go to Console - Project
- Click on the credential that requires the Console API to be enabled.
- Scroll down to "Console data privileges".
- Check "Allow access to finance summary data".
- Click the Save button.
Endpoint#
GET /finance/v1/summaryParameters#
Request example#
curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your-api-host/finance/v1/summary'
Replace your_token and your_api_host with your JWT Authentication and API Host
Response#
{
"metadata": {
"tag": "2a9873efd0a6c75665dc4f6116b19bdf"
},
"asOf": "2024-04-03T17:13Z",
"currency": "CNY",
"balance": -17.54,
"accruedCharges": {
"previousDay": 28.92,
"thisMonth": 113.12,
"sinceLastBill": 113.12
},
"pendingBills": [
{
"number": "20681CYX",
"date": "2024-04-01T10:00Z",
"type": "PayAsYouGo",
"status": "unpaid",
"amount": 535.1,
"amountDue": 17.54,
"dueDate": "2024-04-10T23:59Z"
},
{
"number": "605D0FYX",
"date": "2024-04-02T13:34Z",
"type": "SavingsPlans",
"status": "unpaid",
"amount": 2000,
"amountDue": 2000,
"dueDate": "2024-04-30T12:59Z"
}
],
"availableSavingsPlans": [
{
"billNumber": "605D0FYX",
"status": "pending",
"term": "1",
"commitments": 2000,
"utilized": 0,
"effectiveTime": "2024-04-30T13:00Z"
}
],
"availableResourcePlans": [
{
"billNumber": "613D1FYX",
"status": "active",
"requests": "1000000",
"commitments": 2000,
"utilized": 12,
"effectiveTime": "2024-04-03T17:00Z"
}
]
}
-
metadataobject Response metadata-
tagstring Unique tag for this data
-
-
asOfdate-time The cutoff time for the current data in ISO 8601 UTC format -
currencystring Currency code, includingCNYandUSD -
balancenumber Account balance -
accruedChargesobject Accrued Charges-
previousDaynumber Accrued charges in the previous calendar day -
thisMonthnumber Accrued charges in the current calendar month -
sinceLastBillnumber Accrued charges since the last bill
-
-
pendingBillsarray Pending bill list-
numberstring Bill number -
datedate-time The issue date of the bill -
typestring The type of bill -
statusstring Payment status of the bill, includingunpaid,outstandingandoverdue -
amountnumber Total amount of the bill -
amountDuenumber The unpaid portion of the bill that is still due -
dueDatedate-time The due date for the bill payment
-
-
availableSavingsPlansarray Available savings plan list-
billNumberstring Bill number -
statusstring Status of the savings plan, includingpendingandactive -
termstring Duration of the savings plan commitment, default is 1 year -
commitmentsnumber Total committed amount under the savings plan -
utilizednumber Committed amount that has been utilized -
effectiveTimedate-time Time when the savings plan becomes effective
-
-
availableResourcePlansarray Available resource plan list-
billNumberstring Bill number -
statusstring Status of the resource plan, includingpendingandactive -
requestsnumber Total request volume included in the resource plan -
utilizednumber Number of requests used from the resource plan -
effectiveTimedate-time Time when the resource plan becomes effective
-