> ## 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

> A record of goods or services purchased from a vendor

**The Bills Data Model** is designed to simplify the handling and retrieval of bill-related information across various accounting platforms.

* Unified bill properties: The model unifies essential bill information such as vendor, account, dates, currency, and amounts, enabling a unified view of bills from different platforms.
* Status tracking: The model supports tracking the status of a bill, including draft, submitted, partially paid, paid, overdue, void, or unknown, for better bill management and reporting.
* Relationship with other data models: The model allows for the inclusion of associated line items, bill payments, and purchase orders, providing a complete picture of each bill.
* Currency conversion: The `currency_rate` property allows for easy currency conversion between the payment currency and the base currency, ensuring accurate financial reporting and analysis.

## Properties Supported

| Property             | Type   | Description                                                                                                      |
| -------------------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
| platform\_id         | string | Platform's ID for the bill                                                                                       |
| account\_id          | string | The accounting platform's unique ID of the account associated with the bill                                      |
| contact\_id          | string | The accounting platform's unique ID of the contact associated with this bill                                     |
| document\_number     | string | Reference number for the bill                                                                                    |
| posted\_date         | date   | Date of creation of the bill                                                                                     |
| due\_date            | date   | The due date for the bill                                                                                        |
| currency\_id         | string | The Platform's ID of the currency for the bill                                                                   |
| currency\_rate       | float  | Rate between the currency of the payment and the base currency                                                   |
| status               | enum   | The status of the bill. Values are: `DRAFT`, `SUBMITTED`, `PARTIALLY_PAID`, `PAID`, `OVERDUE`, `VOID`, `UNKNOWN` |
| total\_amount        | float  | Total amount of the Bill                                                                                         |
| sub\_total           | float  | Total pre tax amount of the Bill                                                                                 |
| total\_discount      | float  | Total discount amount levied on the Bill                                                                         |
| tax\_amount          | float  | Total tax amount levied on the bill                                                                              |
| amount\_due          | float  | Outstanding amount to be paid for the Bill                                                                       |
| purchase\_order\_ids | object | Array of Purchase Order Ids associated with the bill                                                             |
| 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 bill           |
| currency       | [Currencies](/api-reference/v3/accounting/currencies/overview)       | The currency of the bill                 |
| bill\_payments | [Bill Payments](/api-reference/v3/accounting/bill-payments/overview) | The bill payments associated to the bill |
| documents      | [Documents](/api-reference/v3/accounting/documents/overview)         | The documents attached to the bill       |
| addresses      | [Addresses](/api-reference/v3/accounting/bills/overview#addresses)   | The addresses associated with the bill   |
| line\_items    | [Line Items](/api-reference/v3/accounting/bills/overview#line-items) | The line items associated with the bill  |

<Snippet file="addresses_snippet.mdx" />

<Snippet file="line_items_snippet.mdx" />

<ResponseExample name="The Account Object">
  ```json The Bills Response Object theme={null}
  {
    "platform_id": "1234567890123456789",
    "account_id": "1234567890123456789",
    "contact_id": "1234567890123456789",
    "currency_id": "3770712000000000099",
    "purchase_order_ids": ["3770712000000085084", "3770712000000085084"],
    "document_number": "AO-0001",
    "posted_date": "2023-01-24T00:00:00.000Z",
    "due_date": "2023-01-24T00:00:00.000Z",
    "currency_rate": 1,
    "memo": null,
    "status": "PAID",
    "total_amount": 150,
    "sub_total": 150,
    "total_discount": 0,
    "tax_amount": 0,
    "amount_due": 0,
    "updated_at": "2023-07-05T00:00:00.000Z"
  }
  ```
</ResponseExample>
