Finance Summary

Platform: API

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.

  1. Go to Console - Project
  2. Click on the credential that requires the Console API to be enabled.
  3. Scroll down to “Console data privileges”.
  4. Check “Allow access to finance summary data”.
  5. Click the Save button.

Endpoint

/finance/v1/summary

Parameters

No parameters are required.

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

The response is in JSON format and is Gzip compressed.

{
  "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": []
}
  • asOf The date and time for this data.
  • currency Currency code, including CNY and USD.
  • balance Account balance.
  • accruedCharges.previousDay Charges accrued during the previous calendar day.
  • accruedCharges.thisMonth Total charges accrued in the current calendar month.
  • accruedCharges.sinceLastBill Charges accrued since the last billing.
  • pendingBills.number Unpaid or overdue bill number.
  • pendingBills.type The type of bill.
  • pendingBills.amount Total amount of the bill.
  • pendingBills.amountDue The unpaid portion of the bill that is still due.
  • pendingBills.dueDate The due date for the bill payment.
  • availableSavingsPlans.billNumber Bill number for the savings plans in active or pending.
  • availableSavingsPlans.status Status of the savings plan, including pending and active.
  • availableSavingsPlans.term Duration of the savings plan commitment, default is 1 year.
  • availableSavingsPlans.commitments Total committed amount under the savings plan.
  • availableSavingsPlans.utilized Committed amount that has been utilized.
  • availableSavingsPlans.effectiveTime Time when the savings plan becomes effective.
  • availableResourcePlans.billNumber Bill number for resource plans in active or pending.
  • availableResourcePlans.status Status of the resource plan, including pending and active.
  • availableResourcePlans.requests Total request volume included in the resource plan.
  • availableResourcePlans.utilized Requests that have been used.
  • availableResourcePlans.effectiveTime Time when the resource plan becomes effective.