> ## 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 Purchase Orders Data Model** simplifies the management and access of purchase order information across various accounting platforms.

* Unified purchase order properties: The model consolidates essential details, such as contact information, document number, dates, description, payment mode, and currency, to provide a complete view of each purchase order.
* Financial calculations: The model includes properties for tax amount, discounts, subtotals, and total amounts, enabling accurate financial calculations and reporting.
* Association with bills: The bills property links purchase orders to their associated bills, facilitating the tracking and management of related financial transactions.

## Properties Supported

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

<Snippet file="addresses_snippet.mdx" />

<Snippet file="line_items_snippet.mdx" />

<ResponseExample name="The Bank Transaction Object">
  ```json The Purchase Order Response Object theme={null}
  {
    "platform_id": "3770712000001722009",
    "contact_id": "3770712000000080863",
    "currency_id": "3770712000000000099",
    "bill_ids": ["3770712000001722013"],
    "document_number": "PO-00075",
    "posted_date": "2023-04-01T00:00:00.000Z",
    "delivery_date": "2023-05-01T00:00:00.000Z",
    "description": "Purchase Order for Products",
    "payment_mode": "Cash",
    "currency": {
      "data": {
        "platform_id": "3770712000000000099",
        "name": "Indian Rupee",
        "code": "INR",
        "symbol": "₹",
        "is_base_currency": true,
        "exchange_rate": 1.0,
        "updated_at": "2023-11-05T00:00:00.000Z"
      }
    },
    "currency_rate": 1.0,
    "status": "DRAFT",
    "total_discount": 1.0,
    "tax_amount": 2.28,
    "sub_total": 19.0,
    "total_amount": 21.28,
    "line_items": {
      "data": [
        {
          "platform_id": "3770712000001722011",
          "line_item_type": "PURCHASE_ORDERS",
          "line_item_type_id": "3770712000001722009",
          "tracking_category_ids": [],
          "item_id": "3770712000000085075",
          "tax_id": "3770712000000106071",
          "account_id": "3770712000000034003",
          "description": "Ted's Products (2 units)",
          "quantity": 2,
          "unit_amount": 10.0,
          "total_amount": 21.28,
          "sub_total": 19.0,
          "tax_amount": 2.28,
          "total_discount": 1.0,
          "updated_at": "2023-11-05T00:00:00.000Z"
        }
      ]
    },
    "addresses": {
      "data": [
        {
          "platform_id": "_PURCHASE_ORDERS_3770712000001722009_BILLING",
          "type": "BILLING",
          "data_model": "PURCHASE_ORDERS",
          "data_model_id": "3770712000001722009",
          "street": "123 Main Street",
          "locality": "Downtown",
          "city": "Metropolis",
          "state": "Stateville",
          "country": "Countryland",
          "pincode": "12345",
          "updated_at": "2023-11-05T00:00:00.000Z"
        }
      ]
    },
    "contact": null,
    "updated_at": "2023-11-05T00:00:00.000Z"
  }
  ```
</ResponseExample>
