> ## 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 sold to a customer

**The Sales Orders Data Model** standardises information related to sales orders across various accounting platforms, making it simpler to manage and access relevant data.

* Unified sales order properties: The model consolidates essential sales order information, such as contact ID, document number, dates, description, payment mode, and currency-related data.
* Financial calculations: The model includes properties for total discount, tax amount, sub-total, and total amount, facilitating accurate financial reporting and analysis.
* Invoice associations: The `invoices` property links sales orders to their corresponding invoices, enabling seamless navigation and cross-referencing between the two data models.

## Properties Supported

| Property         | Type   | Description                                                                                                             |
| ---------------- | ------ | ----------------------------------------------------------------------------------------------------------------------- |
| platform\_id     | string | Platform's ID for the sales order                                                                                       |
| contact\_id      | string | The accounting platform's unique ID of the contact associated with this sales order                                     |
| document\_number | string | Reference number for the sales order                                                                                    |
| posted\_date     | string | Date of creation of the sales order                                                                                     |
| delivery\_date   | string | The delivery date for the sales order                                                                                   |
| description      | string | Description of the sales order                                                                                          |
| payment\_mode    | string | The payment mode from which the payment was made                                                                        |
| currency         | string | The ISO-4217 currency code                                                                                              |
| currency\_rate   | float  | Rate between the currency of the payment and the base currency                                                          |
| status           | enum   | The status of the sales order. Values are: `DRAFT`, `SUBMITTED`, `PARTIALLY_PAID`, `PAID`, `OVERDUE`, `VOID`, `UNKNOWN` |
| total\_discount  | float  | Total value of discounts applied to the sales order                                                                     |
| tax\_amount      | float  | Total tax amount levied on the sales order                                                                              |
| sub\_total       | float  | Total pre tax value of the sales order                                                                                  |
| total\_amount    | float  | Total value of the sales order                                                                                          |
| 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 sales order          |
| currency    | [Currencies](/api-reference/v3/accounting/currencies/overview)              | The currency of the sales order                |
| documents   | [Documents](/api-reference/v3/accounting/documents/overview)                | The documents attached to the sales order      |
| addresses   | [Addresses](/api-reference/v3/accounting/sales-orders/overview#addresses)   | The addresses associated with the sales order  |
| line\_items | [Line Items](/api-reference/v3/accounting/sales-orders/overview#line-items) | The line items associated with the sales order |

<Snippet file="addresses_snippet.mdx" />

<Snippet file="line_items_snippet.mdx" />

<ResponseExample name="The Sales Order Object">
  ```json The Sales Order Response Object theme={null}
  {
    "platform_id": "3770712000001720008",
    "contact_id": "3770712000000417001",
    "currency_id": "3770712000000000099",
    "invoice_ids": ["3770712000001720009"],
    "document_number": "SO-00035",
    "posted_date": "2023-04-01T00:00:00.000Z",
    "delivery_date": "2023-05-01T00:00:00.000Z",
    "description": "Sales Order for Yoyo Products",
    "payment_mode": null,
    "currency_rate": 1.0,
    "status": "DRAFT",
    "total_discount": 1.0,
    "tax_amount": 0.0,
    "sub_total": 19.0,
    "total_amount": 19.0,
    "updated_at": "2023-11-05T00:00:00.000Z"
  }
  ```
</ResponseExample>
