Download an invoice or a credit memo file
GET https://{{host}}/invoicing-api/v4/contracts/:contractId/invoices/:invoiceId/download
Returns the content of the selected contract's invoice, credit memo file, or usage data for Cloud Computing services. The downloadable file is available in the response body. The format of the file depends on the value of the Accept
header. Available formats are CSV
, PDF
, and JSON
.
Body
PARAM
Key | Datatype | Required | Description |
sourceType
|
string | (Optional) __Enum__ Source type of the invoice, either `REGULAR` for Control Center services, or `COMPUTE` for the Cloud Computing usage data. For the `COMPUTE` source type, data is available in the CSV format only, for invoices from February 2024 onwards. | |
accountSwitchKey
|
string | (Optional) For customers who manage more than one account, this [runs the operation from another account](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). The Identity and Access Management API provides a [list of available account switch keys](https://techdocs.akamai.com/iam-api/reference/get-client-account-switch-keys). |
HEADERS
Key | Datatype | Required | Description |
Accept
|
string |
RESPONSES
status OK
{
"INVOICE": {
"ACCOUNT_ID": "A-CCT7890",
"ACCOUNT_NAME": "Main Street Corporation",
"END_CUSTOMER": [
{
"END_CUSTOMER_ACCOUNT_ID": "A-CCT7890",
"END_CUSTOMER_ACCOUNT_NAME": "Main Street Corporation",
"END_CUSTOMER_EXTERNAL_REFERENCE": "1234567890",
"END_CUSTOMER_ORDER_ID": "1-23ABC4",
"INVOICE_LINE": [
{
"CREDITED_INVOICE_LINE_NUMBER": null,
"CREDITED_INVOICE_NUMBER": null,
"EFFECTIVE_END_DATE": "2022-01-31",
"ITEM_DESC": "1 GB of Access Control Usage ",
"ITEM_END_DATE": "2021-01-31",
"ITEM_START_DATE": "2021-01-01",
"ITEM_TOTAL": 0.03,
"ITEM_TOTAL_SERVICES": 0.02,
"ITEM_TOTAL_TAXES": 0,
"ITEM_TYPE": "U",
"ITEM_UNITS": 1,
"ITEM_UNIT_PRICE": 0.01,
"PO_NUMBER": "1234567890",
"PRODUCT": "Access Control",
"PRODUCT_ID": "9-8ZYX76",
"UNIT_MEASURE": "GB"
}
]
}
],
"FINALIZED_DATE": "2021-02-01",
"INVOICE_CURRENCY": "USD",
"INVOICE_DATE": "2021-02-01&qu Curl curl -X GET 'https://host/invoicing-api/v4/contracts/:contractId/invoices/:invoiceId/download?sourceType=&accountSwitchKey=' -H 'Accept: application/json' ENDPOINTS |