> ## Documentation Index
> Fetch the complete documentation index at: https://integrations.docs.commenda.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> An itemized record of goods sold or services provided to a customer.

**The Invoices Data Model** is designed to standardise and simplify the handling of invoice-related information across different accounting platforms.

* Unified invoice properties: The model consolidates essential invoice details, such as document number, due date, currency, status, and total amounts, making it easier to manage invoice data from various platforms.
* Linked entities: Invoices can be associated with accounts, customers, line items, payments, and sales orders, providing a complete view of the invoicing process and related transactions.
* Flexible status tracking: The model supports a range of invoice statuses, such as draft, submitted, partially paid, and overdue, for better organisation and reporting.

## Properties Supported

| Property         | Type   | Description                                                                                                         |
| ---------------- | ------ | ------------------------------------------------------------------------------------------------------------------- |
| platform\_id     | string | The Platform's ID for this invoice                                                                                  |
| account\_id      | string | The platform's ID for the account to which this invoice belongs                                                     |
| contact\_id      | string | The Accounting Platform's unique ID for the contact who receives this invoice                                       |
| currency\_id     | string | The Platform's ID of the currency for the invoice                                                                   |
| document\_number | string | Reference document number for the invoice                                                                           |
| posted\_date     | date   | Date of the invoice as recorded by the accounting platform                                                          |
| due\_date        | date   | The due date for the invoice as an ISO 8601 timestamp                                                               |
| currency\_rate   | float  | Rate between the currency of the payment and the base currency                                                      |
| status           | enum   | The status of the invoice. Values are: `DRAFT`, `SUBMITTED`, `PARTIALLY_PAID`, `PAID`, `OVERDUE`, `VOID`, `UNKNOWN` |
| total\_discount  | float  | Total value of discounts applied to the invoice                                                                     |
| tax\_amount      | float  | Total tax amount levied on the invoice                                                                              |
| sub\_total       | float  | Total pre tax value of the invoice                                                                                  |
| total\_amount    | float  | Total value of the invoice                                                                                          |
| amount\_due      | float  | Total amount pending for the invoice                                                                                |
| memo             | string | Description of the invoice                                                                                          |
| sales\_orders    | object | Array of linked Sales Order Ids associated with this invoice                                                        |
| updated\_at      | date   | The date at which the information was updated on the accounting platform                                            |

### Expandable Attributes

You can expand the following attributes to get the related data

| Property          | Data Model                                                                 | Description                                    |
| ----------------- | -------------------------------------------------------------------------- | ---------------------------------------------- |
| contact           | [Contacts](/api-reference/v3/accounting/contacts/overview)                 | The contact that made the invoice              |
| currency          | [Currencies](/api-reference/v3/accounting/currencies/overview)             | The currency of the invoice                    |
| invoice\_payments | [invoice Payments](/api-reference/v3/accounting/invoice-payments/overview) | The invoice payments associated to the invoice |
| documents         | [Documents](/api-reference/v3/accounting/documents/overview)               | The documents attached to the invoice          |
| addresses         | [Addresses](/api-reference/v3/accounting/invoices/overview#addresses)      | The addresses associated with the invoice      |
| line\_items       | [Line Item](/api-reference/v3/accounting/invoices/overview#line-items)     | The line items associated with the invoice     |

<Snippet file="addresses_snippet.mdx" />

<Snippet file="line_items_snippet.mdx" />

<ResponseExample name="The Invoice Object">
  ```json The Invoice Response Object theme={null}
  {
    "platform_id": "1234567890123456789",
    "account_id": "1234567890123456789",
    "contact_id": "3770712000000080069",
    "currency_id": "3770712000000000099",
    "sales_order_ids": ["3770712000000080288"],
    "document_number": "INV-000001",
    "posted_date": "2022-09-28T00:00:00.000Z",
    "due_date": "2022-09-28T00:00:00.000Z",
    "currency_rate": 1,
    "status": "PAID",
    "total_discount": 10,
    "tax_amount": 0,
    "sub_total": 240,
    "total_amount": 230,
    "amount_due": 0,
    "memo": "Thanks for your business.",
    "updated_at": "2022-09-28T00:00:00.000Z"
  }
  ```
</ResponseExample>
