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"
}
]
}
-
metadataobjectMetadata for this response
-
tagstringUnique data identifier
-
attributionsarrayData attribution or statements that must be displayed with the response data
-
-
asOfdate-timeData cutoff time in ISO 8601 UTC format
-
currencystringCurrency code, including
CNYandUSD -
balancenumberAccount balance
-
accruedChargesobjectAccrued Charges
-
previousDaynumberAccrued charges in the previous calendar day
-
thisMonthnumberAccrued charges for this calendar month
-
sinceLastBillnumberAccrued charges since the last bill
-
-
pendingBillsarrayPending bill list
-
numberstringBill number
-
datedate-timeThe issue date of the bill
-
typestringThe type of bill
-
statusstringPayment status of the bill, including
unpaid,outstandingandoverdue -
amountnumberTotal amount of the bill
-
amountDuenumberThe unpaid portion of the bill that is still due
-
dueDatedate-timeThe due date for the bill payment
-
-
availableSavingsPlansarrayAvailable savings plan list
-
billNumberstringBill number
-
statusstringStatus of the savings plan, including
pendingandactive -
termstringDuration of the savings plan commitment, default is 1 year
-
commitmentsnumberTotal committed amount under the savings plan
-
utilizednumberCommitted amount that has been utilized
-
effectiveTimedate-timeTime when the savings plan becomes effective
-
-
availableResourcePlansarrayAvailable resource plan list
-
billNumberstringBill number
-
statusstringStatus of the resource plan, including
pendingandactive -
requestsnumberTotal request volume included in the resource plan
-
utilizednumberNumber of requests used from the resource plan
-
effectiveTimedate-timeTime when the resource plan becomes effective
-