Logo
Akamai APIs API Documentation

Billing API

Number of APIs: 9


Use the Billing API to access data about your account's monthly usage on the ​Akamai​ network. The daily and monthly usage data is available for products that appear on your contract or invoice as usage-based services.

With this API, you can: - Develop your own tools to visualize and track how your site is being used, if you administer an Akamai-accelerated website. - Compare usage data with your billing invoice.

Note: Data is available for 18 months. For compute usage, data is available for the current month only.

Authentication

Create an authentication credential that contains the client token and client secret required to authenticate Akamai API requests.

Note: Only Akamai customers can create credentials. If you aren't an Akamai customer and wish to become one, you can sign up for our services.

  1. Navigate to the Identity and Access Management section of Akamai Control Center and click Create API Client.

Note: If you don't have access to the Identity and Access Management tool, contact your local Akamai Control Center admin or your Akamai account team for assistance.

  1. Click Quick and then Download in the Credentials section.

Note: If you need to refine access levels or permissions, see Create a client with custom permissions.

  1. Open the downloaded file with a text editor and add [default] as a header above all text.
  [default]
  client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=
  host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net
  access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij
  client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj
  1. Fork the [Akamai Authentication] environment, populate the variables, and [set it for your workspace]

Dependencies

To use this API to generate billing reports, make sure you have the following services configured: - CP code data. To get CP codes for reporting groups and contracts, run the Get a reporting group operation via the CP Codes and Reporting Groups API. - Contract data. To get billable contracts, run the List contracts operation via the Contract API. - Reporting groups data. - To get products for reporting groups, run the List products per reporting group operation via the Contract API. - To get billable reporting groups, run the List reporting groups operation via the CP Codes and Reporting Groups API.

Integration methods

You can use this API collection in these integration methods: - API


1. Usage by reporting group - List cumulative daily usage per reporting group

GET https://{{host}}/billing/v1/reporting-groups/:reportingGroupId/products/:productId/usage/daily?month={{month}}



2. Usage by reporting group - List monthly usage summary per reporting group

GET https://{{host}}/billing/v1/reporting-groups/:reportingGroupId/products/:productId/usage/monthly-summary?start={{start}}&end={{end}}



3. Subcustomer geobilling usage - Download subcustomer geobilling files

GET https://{{host}}/billing/v1/contracts/:contractId/products/:productId/geo-billing-files?day={{day}}&month={{month}}&year={{year}}



4. Compute usage by contract and compute customer - List compute customers per contract

GET https://{{host}}/billing/v1/contracts/:contractId/compute-customers



5. Compute usage by contract and compute customer - Get compute usage summary per contract and compute customer

GET https://{{host}}/billing/v1/contracts/:contractId/compute-customers/:computeCustomerId/usage/monthly-summary



6. Usage by contract and product - List monthly usage summary per CP code

GET https://{{host}}/billing/v1/contracts/:contractId/products/:productId/usage/by-cp-code/monthly-summary?start={{start}}&end={{end}} <

ENDPOINTS