get-invoice
dci get-invoice id
Returns the full details of an invoice specified by the invoice number.
Output
OK - Invoice details 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 |
|---|---|---|
id | string | Invoice number, identifying the invoice. |
invoiceDate | integer (int64) | The time when this invoice was issued, in milliseconds since the epoch. |
platform | string | Platform identifier for invoice source. One of: "google-cloud", "amazon-web-services", "microsoft-azure", "g-suite", "office-365", "superquery", "looker", "navigator", "solve". |
dueDate | integer (int64) | The last day to pay the invoice, in milliseconds since the epoch |
status | string | Status of the invoice One of: "OPEN", "PAST DUE", "PAID". |
totalAmount | number (double) | Total invoiced amount |
balanceAmount | number (double) | Invoice balance to be paid |
currency | string | Currency code for monetary values. One of: "USD", "ILS", "EUR", "AUD", "CAD", "GBP", "DKK", "NOK", "SEK", "BRL", "SGD", "MXN", …. |
url | string | Link to invoice details page in the DoiT console. You can download the PDF invoice from the invoice details page. |
lineItems | array of object | Invoice line items. |
lineItems[].currency | string | |
lineItems[].description | string | |
lineItems[].details | string | |
lineItems[].price | number (double) | |
lineItems[].qty | number (double) | |
lineItems[].type | string |
Raw JSON schema
{
"type": "object",
"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."
},
"lineItems": {
"type": "array",
"description": "Invoice line items.",
"items": {
"type": "object",
"description": "Invoice line item.",
"properties": {
"currency": {
"type": "string"
},
"description": {
"type": "string"
},
"details": {
"type": "string"
},
"price": {
"type": "number",
"format": "double"
},
"qty": {
"type": "number",
"format": "double"
},
"type": {
"type": "string"
}
}
}
}
}
}
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: getinvoice