For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with index.html.md in place of the HTML page (for example, append index.html.md to the directory path instead of opening the HTML document).
Usage
client.invoices.get_by_uuid(
invoice_uuid="22737513-0ea7-4206-8ceb-98a575af7681",
per_page=20,
page=1,
)
Returns JSONRaises HttpResponseError
Description
To retrieve the invoice items for an invoice, send a GET request to /v2/customers/my/invoices/{invoice_uuid}.
Parameters
invoice_uuid string required
UUID of the invoice
per_page integer optional
Number of items returned per page
Min: 1
Max: 200
Default: 20
page integer optional
Which 'page' of paginated results to return.
Min: 1
Default: 1
Request Sample
Show Request Sample
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
invoices = client.invoices.get_by_uuid(invoice_uuid=1)
Response Example
Show Response Example
{
"invoice_items": [
{
"product": "Kubernetes Clusters",
"resource_uuid": "711157cb-37c8-4817-b371-44fa3504a39c",
"group_description": "my-doks-cluster",
"description": "a56e086a317d8410c8b4cfd1f4dc9f82",
"amount": "12.34",
"duration": "744",
"duration_unit": "Hours",
"start_time": "2020-01-01T00:00:00Z",
"end_time": "2020-02-01T00:00:00Z"
},
{
"product": "Spaces Subscription",
"description": "Spaces ($5/mo 250GB storage & 1TB bandwidth)",
"amount": "34.45",
"duration": "744",
"duration_unit": "Hours",
"start_time": "2020-01-01T00:00:00Z",
"end_time": "2020-02-01T00:00:00Z"
}
],
"links": {
"pages": {
"next": "https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681?page=2&per_page=2",
"last": "https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681?page=3&per_page=2"
}
},
"meta": {
"total": 6
}
}
See /v2/customers/my/invoices/{invoice_uuid} in the API reference for additional detail on responses, headers, parameters, and more.