Skip to main content

invoices

Creates, updates, deletes, gets or lists a invoices resource.

Overview

Nameinvoices
TypeResource
Iddigitalocean.billing.invoices

Fields

NameDatatypeDescription
descriptionstringDescription of the invoice item.
amountstringBilled amount of this invoice item. Billed in USD.
durationstringDuration of time this invoice item was used and subsequently billed.
duration_unitstringUnit of time for duration.
end_timestringTime the invoice item stopped being billed for usage.
group_descriptionstringDescription of the invoice item when it is a grouped set of usage, such as DOKS or databases.
productstringName of the product being billed in the invoice item.
project_namestringName of the DigitalOcean Project this resource belongs to.
resource_idstringID of the resource billing in the invoice item if available.
resource_uuidstringUUID of the resource billing in the invoice item if available.
start_timestringTime the invoice item began to be billed for usage.

Methods

NameAccessible byRequired ParamsDescription
invoices_get_by_uuidSELECTinvoice_uuidTo retrieve the invoice items for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID.
invoices_listSELECTTo retrieve a list of all invoices, send a GET request to /v2/customers/my/invoices.
invoices_get_csv_by_uuidEXECinvoice_uuidTo retrieve a CSV for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/csv.
invoices_get_pdf_by_uuidEXECinvoice_uuidTo retrieve a PDF for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/pdf.

SELECT examples

To retrieve a list of all invoices, send a GET request to /v2/customers/my/invoices.

SELECT
description,
amount,
duration,
duration_unit,
end_time,
group_description,
product,
project_name,
resource_id,
resource_uuid,
start_time
FROM digitalocean.billing.invoices
;