メインコンテンツへスキップ

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.

FieldTypeDescription
idstringInvoice number, identifying the invoice.
invoiceDateinteger (int64)The time when this invoice was issued, in milliseconds since the epoch.
platformstringPlatform identifier for invoice source. One of: "google-cloud", "amazon-web-services", "microsoft-azure", "g-suite", "office-365", "superquery", "looker", "navigator", "solve".
dueDateinteger (int64)The last day to pay the invoice, in milliseconds since the epoch
statusstringStatus of the invoice One of: "OPEN", "PAST DUE", "PAID".
totalAmountnumber (double)Total invoiced amount
balanceAmountnumber (double)Invoice balance to be paid
currencystringCurrency code for monetary values. One of: "USD", "ILS", "EUR", "AUD", "CAD", "GBP", "DKK", "NOK", "SEK", "BRL", "SGD", "MXN", ….
urlstringLink to invoice details page in the DoiT console. You can download the PDF invoice from the invoice details page.
lineItemsarray of objectInvoice line items.
lineItems[].currencystring
lineItems[].descriptionstring
lineItems[].detailsstring
lineItems[].pricenumber (double)
lineItems[].qtynumber (double)
lineItems[].typestring
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 statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
40420RESOURCE_NOT_FOUNDThe requested resource does not exist. Check the identifier argument.
50040API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: getinvoice