action codat_get_invoice {
label: "Get invoice"
description: "Get invoice"
provider: codat
method: GET
path: "/companies/{companyId}/data/invoices/{invoiceId}"
encoding: json
input: {
type: "object"
properties: {
invoiceId: {
type: "string"
format: "uuid"
}
}
required: ["invoiceId"]
additionalProperties: false
}
output: {
type: "object"
description: "> View the coverage for invoices in the Data coverage explorer.\n\n## Overview\n\nAn invoice is an itemized record of goods sold or services provided to a [customer](https://docs.codat.io/accounting-api#/schemas/Customer).\n\nIn Codat, an invoice contains details of:\n\n- The timeline of the invoice—when it was raised, marked as paid, last edited, and so on.\n- How much the invoice is for, what portion of the invoice is tax or discounts, and what currency the amounts are represented in. \n- Who the invoice has been raised to; the _customer_.\n- The breakdown of what the invoice is for; the _line items_.\n- Any [payments](https://docs.codat.io/accounting-api#/schemas/Payment) assigned to the invoice; the _payment allocations_.\n\n> **Invoices or bills?** \n>\n> In Codat, invoices represent accounts receivable only. For accounts payable invoices, see [Bills](https://docs.codat.io/accounting-api#/schemas/Bill).\n\n> **Invoice PDF downloads** \n>\n> You can download a PDF version of an invoice for supported integrations.\n> \n> The filename will be invoice-{number}.pdf.\n\n> **Referencing an invoice in Sage 50 and ClearBooks**\n>\n> In Sage 50 and ClearBooks, you may prefer to use the **invoiceNumber** to identify an invoice rather than the invoice **id**. Each time a draft invoice is submitted or printed, the draft **id** becomes void and a submitted invoice with a new **id** exists in its place. In both platforms, the **invoiceNumber** should remain the same."
required: ["amountDue", "issueDate", "status", "totalAmount", "totalTaxAmount"]
}
}