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

> Payment made by a business at the time of purchase (ex. a credit card payment)

**The Expenses Data Model** is designed to streamline the management and retrieval of expense-related information across various accounting platforms.

* Unified expense properties: The model unifies essential expense information, including document numbers, posted dates, payment modes, and currency details, facilitating consistent and accurate expense tracking.
* Contact and account relationships: Expenses can be easily linked to specific contacts and accounts using their respective platform IDs, allowing for efficient organisation and reporting.
* Line item support: The inclusion of line items within the expense data model enables more granular and detailed expense management, as well as the ability to track individual components of an expense.
* Currency conversion: The `currency_rate` property supports multi-currency scenarios by providing the conversion rate between the expense currency and the base currency, ensuring accurate financial reporting across various currencies.

## Properties Supported

| Property         | Type   | Description                                                          |
| ---------------- | ------ | -------------------------------------------------------------------- |
| platform\_id     | string | The Platform's ID of the expenses                                    |
| contact\_id      | string | Platform ID of the contact to which this expense belongs             |
| account\_id      | string | Platform ID of the account to which this expense belongs             |
| currency\_id     | string | Platform ID of the currency for the expense                          |
| document\_number | string | Reference/Document number of the expense                             |
| posted\_date     | date   | Date of the expense as recorded by the accounting platform           |
| payment\_mode    | string | The payment mode from which the payment was made                     |
| currency\_rate   | float  | Rate between the currency of the payment and the base currency       |
| total\_amount    | float  | Total value of the expense                                           |
| sub\_total       | float  | Total pre tax value of the expense                                   |
| tax\_amount      | float  | Total tax amount levied on the expense                               |
| total\_discount  | float  | Total value of discounts applied to the expense                      |
| memo             | string | Description of the expense                                           |
| updated\_at      | date   | The date at which the expense 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 expense          |
| account     | [Accounts](/api-reference/v3/accounting/accounts/overview)              | The account associated to the expense      |
| currency    | [Currencies](/api-reference/v3/accounting/currencies/overview)          | The currency of the expense                |
| documents   | [Documents](/api-reference/v3/accounting/documents/overview)            | The documents attached to the expense      |
| addresses   | [Addresses](/api-reference/v3/accounting/expenses/overview#addresses)   | The addresses associated with the expense  |
| line\_items | [Line Items](/api-reference/v3/accounting/expenses/overview#line-items) | The line items associated with the expense |

<Snippet file="addresses_snippet.mdx" />

<Snippet file="line_items_snippet.mdx" />

<ResponseExample name="The Expense Object">
  ```json The Expense Response Object theme={null}
  {
    "platform_id": "1234567890123456789",
    "contact_id": "3770712000000000099",
    "account_id": "3770712000000000099",
    "currency_id": "3770712000000000099",
    "document_number": "AO-123",
    "posted_date": "2023-09-21T00:00:00.000Z",
    "payment_mode": "Cash",
    "currency_rate": 1,
    "total_amount": 20.0,
    "sub_total": 20.0,
    "tax_amount": 0,
    "total_discount": 0,
    "memo": "This is a test expense",
    "updated_at": "2023-09-21T00:00:00.000Z"
  }
  ```
</ResponseExample>
