list-invoices
dci list-invoices [flags]
Returns a list of all the current and historical invoices for your organization. Invoices are returned in reverse chronological order by default.
dci list-invoices presents a curated table by default:
- Columns:
invoice(fromid; a clickable link to the invoice in the DoiT console in interactive terminals),platform,issued(frominvoiceDate),due(fromdueDate; blank when the invoice carries no due date, e.g. credit memos),totalandbalance(with the invoice's currency symbol), andstatus. --output jsonand explicit-C/--fieldsselections return the raw fields documented below.
Flags
--max-results: (integer format:int64 default:50)
--page-token: (string)
--filter: (string) An expression for filtering the results. The syntax is key:[<value>]. Multiple filters can be connected using a pipe |. See Filters.
--min-creation-time: (integer format:int64)
--max-creation-time: (integer format:int64)
Output
OK - All available invoices returned.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
invoices | array of object | Array of Invoices |
invoices[].id | string | Invoice number, identifying the invoice. |
invoices[].invoiceDate | integer (int64) | The time when this invoice was issued, in milliseconds since the epoch. |
invoices[].platform | string | Platform identifier for invoice source. One of: "google-cloud", "amazon-web-services", "microsoft-azure", "g-suite", "office-365", "superquery", "looker", "navigator", "solve". |
invoices[].dueDate | integer (int64) | The last day to pay the invoice, in milliseconds since the epoch |
invoices[].status | string | Status of the invoice One of: "OPEN", "PAST DUE", "PAID". |
invoices[].totalAmount | number (double) | Total invoiced amount |
invoices[].balanceAmount | number (double) | Invoice balance to be paid |
invoices[].currency | string | Currency code for monetary values. One of: "USD", "ILS", "EUR", "AUD", "CAD", "GBP", "DKK", "NOK", "SEK", "BRL", "SGD", "MXN", …. |
invoices[].url | string | Link to invoice details page in the DoiT console. You can download the PDF invoice from the invoice details page. |
pageToken | string | Page token. Can be used to request the next page of results. |
rowCount | integer (int64) | Invoice rows count |
Raw JSON schema
{
"type": "object",
"properties": {
"invoices": {
"type": "array",
"description": "Array of Invoices",
"items": {
"type": "object",
"description": "Summary information about an invoice.",
"properties": {
"id": {
"type": "string",
"description": "Invoice number, identifying the invoice."
},
"invoiceDate": {
"type": "integer",
"description": "The time when this invoice was issued, in milliseconds since the epoch.",
"format": "int64"
},
"platform": {
"type": "string",
"description": "Platform identifier for invoice source.",
"enum": [
"google-cloud",
"amazon-web-services",
"microsoft-azure",
"g-suite",
"office-365",
"superquery",
"looker",
"navigator",
"solve"
]
},
"dueDate": {
"type": "integer",
"description": "The last day to pay the invoice, in milliseconds since the epoch",
"format": "int64"
},
"status": {
"type": "string",
"description": "Status of the invoice",
"enum": [
"OPEN",
"PAST DUE",
"PAID"
]
},
"totalAmount": {
"type": "number",
"description": "Total invoiced amount",
"format": "double"
},
"balanceAmount": {
"type": "number",
"description": "Invoice balance to be paid",
"format": "double"
},
"currency": {
"description": "Currency code for monetary values.",
"type": "string",
"enum": [
"USD",
"ILS",
"EUR",
"AUD",
"CAD",
"GBP",
"DKK",
"NOK",
"SEK",
"BRL",
"SGD",
"MXN",
"CHF",
"MYR",
"TWD",
"EGP",
"ZAR",
"JPY",
"IDR",
"AED",
"THB",
"COP"
]
},
"url": {
"type": "string",
"description": "Link to [invoice details page](https://help.doit.com/docs/billing/invoices-and-payments/managing-invoices) in the DoiT console. You can download the PDF invoice from the invoice details page."
}
}
}
},
"pageToken": {
"type": "string",
"description": "Page token. Can be used to request the next page of results."
},
"rowCount": {
"type": "integer",
"description": "Invoice rows count",
"format": "int64"
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
| 500 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Aliases: listinvoices