To retrieve a list of all invoices, send a GET request to /v2/customers/my/invoices
.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
per_page |
integer | False | Number of items returned per page | 20 |
page |
integer | False | Which ‘page’ of paginated results to return. | 1 |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
balance = client.invoices.list()
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.
The response will be a JSON object contains that contains a list of invoices under the invoices
key, and the invoice preview under the invoice_preview
key.
Each element contains the invoice summary attributes.
Unauthorized
API Rate limit exceeded
Server error.
Unexpected error