Invoicing API v2
Develop your own tools to track invoice files, and keep others updated about their status.
Learn more:
Download this API’s RAML and JSON schema descriptors.
Overview
This API allows you to access your Akamai invoices.
Who should use this API
Use this API if you administer an Akamai-accelerated website, and want to develop your own tools to track invoice files and keep others in your organization updated about their status. Use it also to compare your invoices with your monthly usage.
Get started
To configure this API for the first time:
Review Get Started with APIs for details on how to set up client tokens to access any Akamai API. These tokens appear as custom hostnames that look like this:
https://akzz-XXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX.luna.akamaiapis.net
.To enable this API, choose the API service named Invoicing, and set the access level to READ-WRITE.
If you want to use this API to compare your final bill with your usage data, you need a separate token to provision the Billing Center API.
Some API operations require
contractId
andproductId
identifiers. They’re both available programmatically from the Contract API. The Invoicing API allows access to any contract for which you have permission to view invoicing data.Some API operations require an account identifier. If it’s not already available, you can access it with the Property Manager API from listing contracts as described above. Select the top-level
accountId
member and remove theact_
prefix.If you need help with the API, provide feedback with the Akamai developer community, or else contact Technical Support for help interpreting your invoice data.
Resources
This section provides details on each API operation. See Get
started for information on obtaining valid accountId
,
contractId
, and productId
values.
API summary
Download the RAML descriptors for this API.
Operation | Method | Endpoint |
---|---|---|
Notifications | ||
List notifications | GET | /invoicing-api/ |
Create a notification | POST | /invoicing-api/ |
Get a notification | GET | /invoicing-api/ |
Modify a notification | PUT | /invoicing-api/ |
Remove a notification | DELETE | /invoicing-api/ |
Invoices | ||
List account’s invoices | GET | /invoicing-api/ |
List contract’s invoices | GET | /invoicing-api/ |
List contract’s invoice files | GET | /invoicing-api/ |
Download an invoice file | GET | /invoicing-api/ |
Geobilling | ||
Download geobilling files | GET | /invoicing-api/ |
List notifications
Notifications inform a set of users whenever there are changes to an invoice. This operation lists all available notifications.
GET /invoicing-api/
Sample: /invoicing-api/
Parameter | Type | Sample | Description |
---|---|---|---|
URL path parameters | |||
accountId |
String | 1-XYZ |
Identifies the account under which data is aggregated. |
Status 200
application/json
Object type: Notification
Download schema: notification-list-schema.json
Response body:
[
{
"id": 2584,
"title": "Billing Center Invoice Notification",
"creationDate": "2015-01-01T00:00:00Z",
"modificationDate": "2015-01-01T00:00:00Z",
"status": "ACTIVE",
"emails": [
"user@example.com"
],
"contractIds": [
"1-3CV382"
]
}
]
Store the
accountId
as described in Get started.Make a GET request to
/invoicing-api/v2/accounts/{accountId}/notifications
.
Create a notification
This operation creates a new notification
informing a set of users about invoices for a set of contracts.
Each notification needs to specify a unique set of contracts. The
request yields an error if the set of contractIds
matches that
of another notification.
POST /invoicing-api/
Sample: /invoicing-api/
Content-Type: application/json
Object type: Notification
Download schema: notification-schema.json
Request body:
{
"title": "Billing Center Invoice Notification",
"status": "ACTIVE",
"emails": [
"user@example.com"
],
"contractIds": [
"1-3CV382"
]
}
Parameter | Type | Sample | Description |
---|---|---|---|
URL path parameters | |||
accountId |
String | 1-XYZ |
Identifies the account under which data is aggregated. |
Status 200
Headers:
Location: /invoicing-api/v2/accounts/ACC-1/notifications/2
Store the
accountId
as described in Get started.Build a Notification request object.
Make a POST request to
/invoicing-api/v2/accounts/{accountId}/notifications
.Optionally store the response’s
Location
to access the new notification.
Get a notification
This operation accesses a specific notification, for example when making modifications to a specific notification.
GET /invoicing-api/
Sample: /invoicing-api/
Parameter | Type | Sample | Description |
---|---|---|---|
URL path parameters | |||
accountId |
String | 1-XYZ |
Identifies the account under which data is aggregated. |
notificationId |
Integer | 2584 |
Identifies each notification. |
Status 200
application/json
Object type: Notification
Download schema: notification-schema.json
Response body:
{
"id": 2584,
"title": "Billing Center Invoice Notification",
"creationDate": "2015-01-01T00:00:00Z",
"modificationDate": "2015-01-01T00:00:00Z",
"status": "ACTIVE",
"emails": [
"user@example.com"
],
"contractIds": [
"1-3CV382"
]
}
Store the
accountId
as described in Get started.Run the List notifications operation, and store the appropriate item’s
id
as thenotificationId
.Make a GET request to
/invoicing-api/v2/accounts/{accountId}/notifications/{notificationId}
.
Modify a notification
This operation updates a notification. Any read-only members retained from a GET operation are ignored on subsequent PUTs.
PUT /invoicing-api/
Sample: /invoicing-api/
Content-Type: application/json
Object type: Notification
Download schema: notification-schema.json
Request body:
{
"title": "Billing Center Invoice Notification",
"status": "ACTIVE",
"emails": [
"user@example.com"
],
"contractIds": [
"1-3CV382"
]
}
Parameter | Type | Sample | Description |
---|---|---|---|
URL path parameters | |||
accountId |
String | 1-XYZ |
Identifies the account under which data is aggregated. |
notificationId |
Integer | 2584 |
Identifies each notification. |
Status 200
Run the Get a notification operation and store the response object.
Optionally remove read-only Notification members:
id
,creationDate
, andmodificationDate
.Modify any remaining Notification values.
Make a PUT request to the same URL as for Get a notification:
/invoicing-api/v2/accounts/{accountId}/notifications/{notificationId}
.
Remove a notification
This operation deletes a notification.
DELETE /invoicing-api/
Sample: /invoicing-api/
Parameter | Type | Sample | Description |
---|---|---|---|
URL path parameters | |||
accountId |
String | 1-XYZ |
Identifies the account under which data is aggregated. |
notificationId |
Integer | 2584 |
Identifies each notification. |
Status 200
Store the
accountId
as described in Get started.Run the List notifications operation, and store the appropriate item’s
id
as thenotificationId
.Make a DELETE request to
/invoicing-api/v2/accounts/{accountId}/notifications/{notificationId}
.
List invoices for an account
For a given account, this operation
lists available invoices for a specific month. A separate
invoice, keyed by invoiceNumber
, is available for each
contract under the account.
GET /invoicing-api/
Sample: /invoicing-api/
Parameter | Type | Sample | Description |
---|---|---|---|
URL path parameters | |||
accountId |
String | 1-XYZ |
Identifies the account under which data is aggregated. |
Optional query parameters | |||
month |
Integer | 7 |
The month for which data is aggregated. You need to specify a corresponding year value. |
year |
Integer | 2015 |
The year for which data is aggregated. You need specify a corresponding month value. |
Status 200
application/json
Object type: Invoice
Download schema: invoice-list-schema.json
Response body:
[
{
"invoiceNumber": "1234567890",
"invoiceDate": "2015-01-01",
"invoiceDueDate": "2015-01-20",
"invoiceTotal": 50000.42,
"contractId": "1-ABCD",
"accountId": "1-XYZ",
"fileVersion": "1",
"files": [
"1234567890_FINAL.pdf",
"1234567890_FINAL.csv",
"Akamai_1234567890.json"
]
}
]
Store the
accountId
as described in Get started.Determine the desired invoice’s
year
andmonth
.Make a GET request to
/invoicing-api/v2/accounts/{accountId}/invoices{?year,month}
.
List invoices for a contract
For a given contract, this
operation lists available invoices for a specific month.
Separate invoices are keyed by invoiceNumber
. Downloadable
files are available either in the files
array, or by
running a separate
List contract’s invoice files
operation.
GET /invoicing-api/
Sample: /invoicing-api/
Parameter | Type | Sample | Description |
---|---|---|---|
URL path parameters | |||
contractId |
String | 1-ABCD |
Identifies the contract under which data is aggregated. |
Optional query parameters | |||
month |
Integer | 7 |
The month for which data is aggregated. You need to specify a corresponding year value. |
year |
Integer | 2015 |
The year for which data is aggregated. You need to specify a corresponding month value. |
Status 200
application/json
Object type: Invoice
Download schema: invoice-list-schema.json
Response body:
[
{
"invoiceNumber": "1234567890",
"invoiceDate": "2015-01-01",
"invoiceDueDate": "2015-01-20",
"invoiceTotal": 50000.42,
"contractId": "1-ABCD",
"accountId": "1-XYZ",
"fileVersion": "1",
"files": [
"1234567890_FINAL.pdf",
"1234567890_FINAL.csv",
"Akamai_1234567890.json"
]
}
]
Determine the appropriate
contractId
as described in Get started.Set the desired invoice’s
year
andmonth
.Make a GET request to
/invoicing-api/v2/contracts/{contractId}/invoices{?year,month}
.
List invoice files for a contract
For a given contract’s invoice, this lists available files, which often represent the same invoice data in different formats.
GET /invoicing-api/
Sample: /invoicing-api/
Parameter | Type | Sample | Description |
---|---|---|---|
URL path parameters | |||
contractId |
String | 1-ABCD |
Identifies the contract under which data is aggregated. |
invoiceNumber |
Integer | 1234567890 |
Identifies each unique invoice. |
Status 200
application/json
Object type: InvoiceFile
Download schema: invoice-file-list-schema.json
Response body:
[
"1234567890_FINAL.csv",
"1234567890_FINAL.pdf",
"Akamai_1234567890.json"
]
Run the List contract’s invoices operation and select the relevant invoice.
Store the invoice’s
contractId
andinvoiceNumber
.Make a GET request to
/invoicing-api/v2/contracts/{contractId}/invoices/{invoiceNumber}/files
.
Download an invoice file
For a given contract’s
invoice file, this operation accesses the content of
the file. The downloadable file is available in the
response body. The Content-Type
depends on the
format of the file you’re downloading.
GET /invoicing-api/
Sample: /invoicing-api/
Parameter | Type | Sample | Description |
---|---|---|---|
URL path parameters | |||
contractId |
String | 1-ABCD |
Identifies the contract under which data is aggregated. |
invoiceNumber |
Integer | 1234567890 |
Identifies each unique invoice. |
filename |
String | Akamai_1234567890.json |
Identifies each invoice file. |
Status 200
application/json
Object type: InvoiceFile
Download schema: invoice-file-schema.json
Response body:
{
"INVOICE": {
"INVOICE_ID": 17331001020,
"ACCOUNT_ID": "1-ABCDE",
"ACCOUNT_NAME": "Stream&Store, Inc.",
"INVOICE_ORDER_ID": "3-1ABCD12",
"INVOICE_CURRENCY": "GBP",
"INVOICE_TYPE": "Standard Invoice",
"INVOICE_VERSION": 1,
"FINALIZED_DATE": "2017-02-28",
"INVOICE_DATE": "2017-03-01",
"PO_NUMBER": null,
"END_CUSTOMER": [
{
"END_CUSTOMER_ACCOUNT_ID": "1-ABCDE",
"END_CUSTOMER_ACCOUNT_NAME": "Stream&Store, Inc.",
"END_CUSTOMER_ORDER_ID": "3-1ABCD12",
"END_CUSTOMER_EXTERNAL_REFERENCE": null,
"INVOICE_LINE": [
{
"ITEM_START_DATE": "2017-03-01",
"ITEM_END_DATE": "2017-03-31",
"UNIT_MEASURE": "Unit",
"PRODUCT": "Dynamic Site Delivery::HTTPS Option::SSL Network Access - 3rd Party Certificate",
"PRODUCT_ID": "M-LC-159850",
"ITEM_TYPE": "P",
"ITEM_DESC": "Dynamic Site Delivery::HTTPS Option::SSL Network Access - 3rd Party Certificate Committed ",
"ITEM_UNITS": 30,
"ITEM_UNIT_PRICE": 250,
"ITEM_TOTAL_SERVICES": 7500,
"ITEM_TOTAL_TAXES": 1500,
"ITEM_TOTAL": 9000,
"EFFECTIVE_END_DATE": "2018-07-31",
"CREDITED_INVOICE_NUMBER": null,
"CREDITED_INVOICE_LINE_NUMBER": null
},
{
"ITEM_START_DATE": "2017-03-01",
"ITEM_END_DATE": "2017-03-31",
"UNIT_MEASURE": "Per Month",
"PRODUCT": "Professional Services - Enterprise::Professional Services - Enterprise",
"PRODUCT_ID": "M-LC-135915",
"ITEM_TYPE": "P",
"ITEM_DESC": "Professional Services - Enterprise::Professional Services - Enterprise",
"ITEM_UNITS": 1,
"ITEM_UNIT_PRICE": 1400,
"ITEM_TOTAL_SERVICES": 1400,
"ITEM_TOTAL_TAXES": 280,
"ITEM_TOTAL": 1680,
"EFFECTIVE_END_DATE": "2018-07-31",
"CREDITED_INVOICE_NUMBER": null,
"CREDITED_INVOICE_LINE_NUMBER": null
},
{
"ITEM_START_DATE": "2017-03-01",
"ITEM_END_DATE": "2017-03-31",
"UNIT_MEASURE": "Each",
"PRODUCT": "Akamai University Customer Training - Classroom",
"PRODUCT_ID": "M-LC-133443",
"ITEM_TYPE": "P",
"ITEM_DESC": "Akamai University Customer Training - Classroom Committed ",
"ITEM_UNITS": 1,
"ITEM_UNIT_PRICE": 110,
"ITEM_TOTAL_SERVICES": 110,
"ITEM_TOTAL_TAXES": 22,
"ITEM_TOTAL": 132,
"EFFECTIVE_END_DATE": "2018-07-31",
"CREDITED_INVOICE_NUMBER": null,
"CREDITED_INVOICE_LINE_NUMBER": null
},
{
"ITEM_START_DATE": "2017-03-01",
"ITEM_END_DATE": "2017-03-31",
"UNIT_MEASURE": "Base Fee",
"PRODUCT": "Dynamic Site Delivery::HTTPS Option",
"PRODUCT_ID": "M-LC-121907",
"ITEM_TYPE": "P",
"ITEM_DESC": "HTTPS \u2013 Custom Certificate \u2013 Dynamic Site Delivery",
"ITEM_UNITS": 1,
"ITEM_UNIT_PRICE": 24672,
"ITEM_TOTAL_SERVICES": 24672,
"ITEM_TOTAL_TAXES": 4934.4,
"ITEM_TOTAL": 29606.4,
"EFFECTIVE_END_DATE": "2018-07-31",
"CREDITED_INVOICE_NUMBER": null,
"CREDITED_INVOICE_LINE_NUMBER": null
}
]
},
{
"END_CUSTOMER_ACCOUNT_ID": "1-ABCDE",
"END_CUSTOMER_ACCOUNT_NAME": "Stream&Store, Inc.",
"END_CUSTOMER_ORDER_ID": "M-1ABCD13",
"END_CUSTOMER_EXTERNAL_REFERENCE": null,
"INVOICE_LINE": [
{
"ITEM_START_DATE": "2017-03-01",
"ITEM_END_DATE": "2017-03-31",
"UNIT_MEASURE": "Per Month",
"PRODUCT": "Dynamic Site Delivery::China CDN",
"PRODUCT_ID": "M-LC-122113",
"ITEM_TYPE": "P",
"ITEM_DESC": "Dynamic Site Delivery::China CDN",
"ITEM_UNITS": 1,
"ITEM_UNIT_PRICE": 1413,
"ITEM_TOTAL_SERVICES": 1413,
"ITEM_TOTAL_TAXES": 282.6,
"ITEM_TOTAL": 1695.6,
"EFFECTIVE_END_DATE": "2018-07-31",
"CREDITED_INVOICE_NUMBER": null,
"CREDITED_INVOICE_LINE_NUMBER": null
}
]
}
]
}
}
Status 200
text/csv
Response body:
ACCOUNT_ID,ACCOUNT_NAME,INVOICE_START_DATE,INVOICE_ID,ITEM_START_DATE,ITEM_END_DATE,UNIT_MEASURE,PRODUCT_LINE,PRODUCT,PRODUCT_ID,ITEM_DESC,ITEM_SPEC,CUST_CURRENCY,ITEM_CURRENCY,ITEM_UNITS,CUST_UNIT_PRICE,ITEM_UNIT_PRICE,CUST_TOTAL_SERVICES,ITEM_TOTAL_SERVICES,CUST_TAXES,CUST_TOTAL,ITEM_TOTAL
1-ABCDE,"Stream&Store, Inc.",11/01/2016,1611344369,10/01/2016,10/31/2016,GB,Content Delivery Services,EdgeSuite with Flash,00322519,Adjustment to prior month based on tier achieved,Usage,GBP,GBP,3100,0,-.38,0,-1178,-176.7,0,-1354.7
1-ABCDE,"Stream&Store, Inc.",11/01/2016,1611344369,11/01/2016,11/30/2016,GB,Content Delivery Services,EdgeSuite Delivery Edition,00322519,EdgeSuite with Flash Committed ,Committed,GBP,GBP,3100,0,.38,0,1178,176.7,0,1354.7
1-ABCDE,"Stream&Store, Inc.",11/01/2016,1611344369,10/01/2016,10/31/2016,GB,Content Delivery Services,EdgeSuite with Flash,00322519,10536 GB of EdgeSuite with Flash Usage ,Usage,GBP,GBP,10536,0,.2959,0,3117.6,467.64,0,3585.24
1-ABCDE,"Stream&Store, Inc.",11/01/2016,1611344369,10/01/2016,10/31/2016,GB,Content Delivery Services,EdgeSuite with Flash,00322519,10536 GB of EdgeSuite with Flash Usage ,Usage,GBP,GBP,10536,0,.2959,0,3117.6,467.64,0,3585.24
Run the List contract’s invoices operation and select the relevant invoice.
Store the invoice’s
contractId
andinvoiceNumber
.Run the List contract’s invoice files operation and store one of the
filename
values from the response’s array.URL-encode the
filename
.Make a GET request to
/invoicing-api/v2/contracts/{contractId}/invoices/{invoiceNumber}/files/{filename}
.
Download geobilling files
This operation provides
details on invoicing for each geographic zone within the
Akamai network. The downloadable file is available in
the response body, formatted as a gzip-compressed CSV.
The Param-md5-uncompressed
response header provides an
md5 checksum for the uncompressed file.
See GEO_ID codes for details on each
geographic code.
For information on how to interpret SUB_CUST_ID
values, see the Cloud Embed - Implementation
Guide.
GET /invoicing-api/
Sample: /invoicing-api/
Parameter | Type | Sample | Description |
---|---|---|---|
URL path parameters | |||
contractId |
String | 1-ABCD |
Identifies the contract under which data is aggregated. |
productId |
String | 1-ABC012 |
Identifies the product under which data is aggregated. |
Required query parameters | |||
day |
Integer | 1 |
The day for which data is aggregated. You need to specify corresponding month and year values. |
month |
Integer | 7 |
The month for which data is aggregated. You need to specify corresponding year and day values. |
year |
Integer | 2015 |
The year for which data is aggregated. You need to specify corresponding month and day values. |
Status 200
application/gzip
Headers:
Param-md5-uncompressed: 52d160f07262f5928655096163d12b2e
Response body:
(Body specifies GZIP binary data.)
Determine the appropriate
contractId
as described in Get started.Determine the appropriate
productId
as described in Get started.Determine the billing period’s desired
year
,month
, andday
.Make a GET request to
/invoicing-api/v2/contracts/{contractId}/products/{productId}/geo-billing-files{?year,month,day}
.
GEO_ID codes
This operation’s CSV data uses this system of GEO_ID
codes:
Code | Location |
---|---|
0 |
Any location that can’t be mapped to any of the other regions below |
1 |
North America |
2 |
South America |
3 |
Europe, the Middle East, and Africa |
4 |
Australia and New Zealand |
5 |
Japan |
6 |
India |
7 |
China |
8 |
Remaining Asia and Pacific region |
Data
This section details the data structures the API exchanges.
Download the JSON schemas for this API.
This section’s data schema tables list membership requirements as follows:
✓ | Member is required in requests, or always present in responses, even if its value is empty or null . |
○ | Member is optional, and may be omitted in some cases. |
Notification
Specifies a set of people to notify whenever an invoice is available for a set of contracts.
Download schema:
notification-schema.json
Sample GET response:
{
"id": 2584,
"title": "Billing Center Invoice Notification",
"creationDate": "2015-01-01T00:00:00Z",
"modificationDate": "2015-01-01T00:00:00Z",
"status": "ACTIVE",
"emails": [
"user@example.com"
],
"contractIds": [
"1-3CV382"
]
}
Notification members
Member | Type | Required | Description |
---|---|---|---|
Notification : Specifies a set of people to notify whenever an invoice is available for a set of contracts. |
|||
contractIds |
Array | ✓ | Lists string identifiers representing the range of contracts for which the notification applies. Each notification reports on a unique set of contracts. |
creationDate |
String | ○ | Read-only. The time when the notification was created, ISO 8601-formatted. |
emails |
Array | ✓ | Lists recipients’ email address strings. |
id |
Integer | ○ | Read-only. Unique identifier for each notification. |
modificationDate |
String | ○ | Read-only. The time of the notification’s most recent change, ISO 8601-formatted. |
status |
Enumeration | ✓ | Either ACTIVE to notify recipients about changes to invoices, or SUSPENDED to disable a notification. |
title |
String | ✓ | Descriptive title to identify each notification. |
Invoice
Contains contract-specific invoice data. All members are read-only and always present in GET responses.
Download schema:
invoice-schema.json
Sample GET response:
[
{
"invoiceNumber": "1234567890",
"invoiceDate": "2015-01-01",
"invoiceDueDate": "2015-01-20",
"invoiceTotal": 50000.42,
"contractId": "1-ABCD",
"accountId": "1-XYZ",
"fileVersion": "1",
"files": [
"1234567890_FINAL.pdf",
"1234567890_FINAL.csv",
"Akamai_1234567890.json"
]
}
]
Invoice members
Member | Type | Description |
---|---|---|
Invoice : Contains contract-specific invoice data. All members are read-only and always present in GET responses. |
||
accountId |
String | Unique identifier for the account to which the invoice applies. Corresponds to the InvoiceFile object’s ACCOUNT_ID . |
contractId |
String | Unique identifier for the contract to which the invoice applies. |
files |
Array | Identifies each invoice filename. Separate files are typically available in JSON, PDF, and CSV formats. |
fileVersion |
String | An integer version string that identifies any changes to the set of files , incrementing when a file is added or modified. |
invoiceDate |
String | The invoice’s published date, formatted as ISO 8601 YYYY-MM-DD . Corresponds to the InvoiceFile object’s INVOICE_DATE . |
invoiceDueDate |
String | The invoice’s last permissible published date, formatted as ISO 8601 YYYY-MM-DD . |
invoiceNumber |
String | Unique identifier for the invoice. Corresponds to the InvoiceFile object’s INVOICE_ID . |
invoiceTotal |
Number | The amount billed, measured in U.S. dollars. Corresponds to the sum of all of the InvoiceFile object’s ITEM_TOTAL values after the currency is normalized. |
InvoiceFile
Encapsulates detailed invoice information available in a JSON file download.
Download schema:
invoice-file-schema.json
Sample GET response:
{
"INVOICE": {
"INVOICE_ID": 17331001020,
"ACCOUNT_ID": "1-ABCDE",
"ACCOUNT_NAME": "Stream&Store, Inc.",
"INVOICE_ORDER_ID": "3-1ABCD12",
"INVOICE_CURRENCY": "GBP",
"INVOICE_TYPE": "Standard Invoice",
"INVOICE_VERSION": 1,
"FINALIZED_DATE": "2017-02-28",
"INVOICE_DATE": "2017-03-01",
"PO_NUMBER": null,
"END_CUSTOMER": [
{
"END_CUSTOMER_ACCOUNT_ID": "1-ABCDE",
"END_CUSTOMER_ACCOUNT_NAME": "Stream&Store, Inc.",
"END_CUSTOMER_ORDER_ID": "3-1ABCD12",
"END_CUSTOMER_EXTERNAL_REFERENCE": null,
"INVOICE_LINE": [
{
"ITEM_START_DATE": "2017-03-01",
"ITEM_END_DATE": "2017-03-31",
"UNIT_MEASURE": "Unit",
"PRODUCT": "Dynamic Site Delivery::HTTPS Option::SSL Network Access - 3rd Party Certificate",
"PRODUCT_ID": "M-LC-159850",
"ITEM_TYPE": "P",
"ITEM_DESC": "Dynamic Site Delivery::HTTPS Option::SSL Network Access - 3rd Party Certificate Committed ",
"ITEM_UNITS": 30,
"ITEM_UNIT_PRICE": 250,
"ITEM_TOTAL_SERVICES": 7500,
"ITEM_TOTAL_TAXES": 1500,
"ITEM_TOTAL": 9000,
"EFFECTIVE_END_DATE": "2018-07-31",
"CREDITED_INVOICE_NUMBER": null,
"CREDITED_INVOICE_LINE_NUMBER": null
},
{
"ITEM_START_DATE": "2017-03-01",
"ITEM_END_DATE": "2017-03-31",
"UNIT_MEASURE": "Per Month",
"PRODUCT": "Professional Services - Enterprise::Professional Services - Enterprise",
"PRODUCT_ID": "M-LC-135915",
"ITEM_TYPE": "P",
"ITEM_DESC": "Professional Services - Enterprise::Professional Services - Enterprise",
"ITEM_UNITS": 1,
"ITEM_UNIT_PRICE": 1400,
"ITEM_TOTAL_SERVICES": 1400,
"ITEM_TOTAL_TAXES": 280,
"ITEM_TOTAL": 1680,
"EFFECTIVE_END_DATE": "2018-07-31",
"CREDITED_INVOICE_NUMBER": null,
"CREDITED_INVOICE_LINE_NUMBER": null
},
{
"ITEM_START_DATE": "2017-03-01",
"ITEM_END_DATE": "2017-03-31",
"UNIT_MEASURE": "Each",
"PRODUCT": "Akamai University Customer Training - Classroom",
"PRODUCT_ID": "M-LC-133443",
"ITEM_TYPE": "P",
"ITEM_DESC": "Akamai University Customer Training - Classroom Committed ",
"ITEM_UNITS": 1,
"ITEM_UNIT_PRICE": 110,
"ITEM_TOTAL_SERVICES": 110,
"ITEM_TOTAL_TAXES": 22,
"ITEM_TOTAL": 132,
"EFFECTIVE_END_DATE": "2018-07-31",
"CREDITED_INVOICE_NUMBER": null,
"CREDITED_INVOICE_LINE_NUMBER": null
},
{
"ITEM_START_DATE": "2017-03-01",
"ITEM_END_DATE": "2017-03-31",
"UNIT_MEASURE": "Base Fee",
"PRODUCT": "Dynamic Site Delivery::HTTPS Option",
"PRODUCT_ID": "M-LC-121907",
"ITEM_TYPE": "P",
"ITEM_DESC": "HTTPS \u2013 Custom Certificate \u2013 Dynamic Site Delivery",
"ITEM_UNITS": 1,
"ITEM_UNIT_PRICE": 24672,
"ITEM_TOTAL_SERVICES": 24672,
"ITEM_TOTAL_TAXES": 4934.4,
"ITEM_TOTAL": 29606.4,
"EFFECTIVE_END_DATE": "2018-07-31",
"CREDITED_INVOICE_NUMBER": null,
"CREDITED_INVOICE_LINE_NUMBER": null
}
]
},
{
"END_CUSTOMER_ACCOUNT_ID": "1-ABCDE",
"END_CUSTOMER_ACCOUNT_NAME": "Stream&Store, Inc.",
"END_CUSTOMER_ORDER_ID": "M-1ABCD13",
"END_CUSTOMER_EXTERNAL_REFERENCE": null,
"INVOICE_LINE": [
{
"ITEM_START_DATE": "2017-03-01",
"ITEM_END_DATE": "2017-03-31",
"UNIT_MEASURE": "Per Month",
"PRODUCT": "Dynamic Site Delivery::China CDN",
"PRODUCT_ID": "M-LC-122113",
"ITEM_TYPE": "P",
"ITEM_DESC": "Dynamic Site Delivery::China CDN",
"ITEM_UNITS": 1,
"ITEM_UNIT_PRICE": 1413,
"ITEM_TOTAL_SERVICES": 1413,
"ITEM_TOTAL_TAXES": 282.6,
"ITEM_TOTAL": 1695.6,
"EFFECTIVE_END_DATE": "2018-07-31",
"CREDITED_INVOICE_NUMBER": null,
"CREDITED_INVOICE_LINE_NUMBER": null
}
]
}
]
}
}
InvoiceFile members
Member | Type | Description | |
---|---|---|---|
InvoiceFile : Encapsulates detailed invoice information available in a JSON file download. |
|||
INVOICE |
Invoice |
All invoice file data is encapsulated within this top-level member. | |
InvoiceFile.INVOICE : All invoice file data is encapsulated within this top-level member. |
|||
ACCOUNT_ID |
String | Unique identifier for the account this invoice reflects. Corresponds to the Invoice object’s accountId . |
|
ACCOUNT_NAME |
String | The name for the account this invoice reflects. | |
END_CUSTOMER |
Invoice |
Collects products and services purchased as a bundle. | |
FINALIZED_DATE |
String | Date when final values have been calculated, formatted as ISO 8601 YYYY-MM-DD . |
|
INVOICE_CURRENCY |
String | Three-letter ISO 4217 code indicating the currency that measures all totals. | |
INVOICE_DATE |
String | Date when the invoice was issued, formatted as ISO 8601 YYYY-MM-DD . Corresponds to the Invoice object’s invoiceDate . |
|
INVOICE_ID |
Integer | Unique identifier for each invoice. Corresponds to the Invoice object’s invoiceNumber . |
|
INVOICE_ORDER_ID |
String | Unique identifier for the purchase order this invoice reflects. | |
INVOICE_TYPE |
String | The overall category for the invoice, such as Standard Invoice or Credit Memo for adjustments. |
|
INVOICE_VERSION |
Integer | Invoices are versioned in case they later need to be adjusted. | |
PO_NUMBER |
String | The purchase order number. Value may be null . |
|
InvoiceFile.INVOICE.END_CUSTOMER[] : Collects products and services purchased as a bundle. |
|||
END_CUSTOMER_ACCOUNT_ID |
String | The ACCOUNT_ID under which this bundle of services was purchased. |
|
END_CUSTOMER_ACCOUNT_NAME |
String | The ACCOUNT_NAME under which this bundle of services was purchased. |
|
END_CUSTOMER_EXTERNAL_REFERENCE |
String | An optional identifier for which the value may be null . |
|
END_CUSTOMER_ORDER_ID |
String | The INVOICE_ORDER_ID under which this bundle of services was purchased. |
|
INVOICE_LINE |
Invoice |
Encapsulates invoice items aggregated by product, corresponding to each row of CSV data. | |
InvoiceFile.INVOICE.END_CUSTOMER[].INVOICE_LINE[] : Encapsulates invoice items aggregated by product, corresponding to each row of CSV data. |
|||
CREDITED_INVOICE_LINE_NUMBER |
String | In case this total reflects an adjusted value, this indexes the earlier invoice’s INVOICE_LINE where the error occurred. This value is usually null . |
|
CREDITED_INVOICE_NUMBER |
String | In case this total reflects an adjusted value, this identifies the INVOICE_ID that contains the error. This value is usually null . |
|
EFFECTIVE_END_DATE |
String | Indicates when the measured service would expire under the contract, formatted as ISO 8601 YYYY-MM-DD . |
|
ITEM_DESC |
String | Describes the product. | |
ITEM_END_DATE |
String | The end of the measured term, formatted as ISO 8601 YYYY-MM-DD . |
|
ITEM_START_DATE |
String | The start of the measured term, formatted as ISO 8601 YYYY-MM-DD . |
|
ITEM_TOTAL |
Number | The sum of ITEM_TOTAL_SERVICES and ITEM_TOTAL_TAXES . The sum of all these values corresponds to the Invoice object’s invoiceTotal , where the latter value is normalized is U.S. dollar terms. |
|
ITEM_TOTAL_SERVICES |
Integer | The total for all provided services. | |
ITEM_TOTAL_TAXES |
Number | All additional taxes based on the ITEM_TOTAL_SERVICES . |
|
ITEM_TYPE |
Enumeration | The type of charge on an invoice. Possible values are B for bursting charges, C for true-up period unit commit charges, F for arrears commit charges, P for pre-bill commit charges, R where a previously prebilled commit is adjusted due to having reached re-pricing tiers, S for non-recurring commit charges, U for usage charges, X for super bursting charges, Z for true-up revenue commit charges, and AU for usage period commit adjustments. |
|
ITEM_UNIT_PRICE |
Integer | The price per ITEM_UNITS . |
|
ITEM_UNITS |
Integer | The number of priced units, typically 1 for individual items or the number of days for a term of service. |
|
PRODUCT |
String | Description of the invoiced product. | |
PRODUCT_ID |
String | Unique identifier for each invoiced product. | |
UNIT_MEASURE |
String | Characterizes the unit of sale or term of service. |
Errors
This section tells you what you need to know about the Invoicing API’s error response format, and details the range of HTTP status codes the API produces.
Error responses
The API produces JSON errors, as in this sample. See Error Members for details on the object’s contents.
{
"code": "validation.failure",
"title": "Validation failure",
"incidentId": "361cd072-e213-4c4e-984d-631be108a1fe",
"resolution": null,
"helpUrl": null,
"details": [
{
"field": "year",
"code": "year.date.year.missing",
"message": "Month parameter cannot be provided without year parameter.",
"data": {
"field": "year",
"value": "null"
}
}
]
}
Error members
Member | Type | Description |
---|---|---|
Required | ||
details |
Error.details[n] | Each array member object encodes context for the failed request, such as malformed query parameter field values. |
code |
String | A descriptive code that corresponds to overall HTTP status. |
incidentId |
String | A logging key useful when communicating about problems with Technical Support representatives. |
title |
String | A descriptive title that corresponds to overall HTTP status. |
Optional | ||
helpUrl |
String | Deprecated. |
resolution |
String | Deprecated. |
Error.details[n]
Member | Type | Description |
---|---|---|
Required | ||
code |
String | A descriptive identifier for each problem. |
message |
String | A description of the problem. |
Optional | ||
data |
Object | A loosely structured object that, when available, encapsulates the set of erroneous input values. |
field |
String | Indicates the request’s parameter field for which there is a problem. |
HTTP status codes
The API produces these HTTP status codes for both success and failure scenarios:
Code | Description |
---|---|
200 | Successful request. |
201 | Resource successfully created. |
204 | Request succeeded, but no data is available for the requested parameters. |
401 | Authorization error. |
403 | Access is forbidden. |
404 | Resource not found. |
500 | Server error. |