> ## 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 orders is a request to buy a product or service. The orders data model simplifies the handling and retrieval of orders from different ecommerce gateways. The model provides a unified representation of orders, enabling you to easily access and manage orders data from different platforms.

**The Orders Data Model** simplifies the handling and retrieval of orders from different ecommerce platforms. The model provides a unified representation of orders, enabling you to easily access and manage orders data from different platforms.

* Unified orders properties: The model provides a unified representation of orders from different ecommerce gateways, enabling you to easily access and manage orders data from different platforms.
* Comprehensive orders information: The model provides a comprehensive representation of orders.

## Attributes

### Order Attributes

| Property              | Type                  | Description                                                           |
| --------------------- | --------------------- | --------------------------------------------------------------------- |
| rootfi\_id            | integer               | The RootFi ID of the order                                            |
| rootfi\_created\_at   | string                | The ISO 8601 timestamp at which the record was created in RootFi      |
| rootfi\_updated\_at   | string                | The ISO 8601 timestamp at which the record was last updated in RootFi |
| rootfi\_company\_id   | integer               | The RootFi company ID associated with the order                       |
| platform\_id          | string                | The Platform's ID for the order                                       |
| platform\_unique\_id  | string                | The platform's unique identifier for the order                        |
| currency\_id          | string                | The currency ID of the order                                          |
| reference             | string                | The reference of the order                                            |
| created\_at           | string                | The date and time the order was created                               |
| updated\_at           | string                | The date and time the order was last updated                          |
| order\_name           | string                | The name of the order                                                 |
| order\_number         | string                | The order number                                                      |
| description           | string                | The description of the order                                          |
| total\_discount       | number                | The total discount amount of the order                                |
| sub\_total            | number                | The subtotal of the order before taxes and shipping                   |
| tax\_amount           | number                | The tax amount of the order                                           |
| total\_amount         | number                | The total amount of the order                                         |
| amount\_due           | number                | The amount due for the order                                          |
| order\_status         | string                | The status of the order                                               |
| payment\_status       | string                | The payment status of the order                                       |
| customer\_id          | string                | The customer ID associated with the order                             |
| shipping\_amount      | number                | The shipping amount for the order                                     |
| line\_items           | Line Item\[]          | The line items of the order                                           |
| addresses             | Address\[]            | The addresses associated with the order                               |
| shipping\_line\_items | Shipping Line Item\[] | The shipping line items of the order                                  |

### Line Item Attributes

| Property             | Type   | Description                                                      |
| -------------------- | ------ | ---------------------------------------------------------------- |
| platform\_id         | string | The Platform's ID for the line item                              |
| item\_id             | string | The ID of the item in the ecommerce platform                     |
| tax\_id              | string | The ID of the tax in the ecommerce platform                      |
| line\_item\_type\_id | string | The ID of the line item type in the ecommerce platform           |
| line\_item\_type     | enum   | The line item type (e.g., ECOMMERCE\_ORDERS, ECOMMERCE\_REFUNDS) |
| description          | string | The description of the line item                                 |
| unit\_amount         | number | The unit amount of the line item                                 |
| quantity             | number | The quantity of the line item                                    |
| total\_discount      | number | The total discount of the line item                              |
| tax\_amount          | number | The tax amount of the line item                                  |
| sub\_total           | number | The subtotal of the line item                                    |
| total\_amount        | number | The total amount of the line item                                |

### Address Attributes

| Property             | Type    | Description                                       |
| -------------------- | ------- | ------------------------------------------------- |
| rootfi\_id           | integer | The RootFi ID of the address                      |
| platform\_id         | string  | The Platform's ID for the address                 |
| platform\_unique\_id | string  | The platform's unique identifier for the address  |
| type                 | string  | The type of the address (e.g., SHIPPING, BILLING) |
| data\_model\_id      | string  | The ID of the data model this address belongs to  |
| street               | string  | The street address                                |
| locality             | string  | The locality of the address                       |
| city                 | string  | The city of the address                           |
| state                | string  | The state of the address                          |
| country              | string  | The country of the address                        |
| pincode              | string  | The postal code of the address                    |
| data\_model          | string  | The data model type this address belongs to       |
| updated\_at          | string  | The date and time the address was last updated    |

### Shipping Line Item Attributes

| Property                | Type   | Description                                                              |
| ----------------------- | ------ | ------------------------------------------------------------------------ |
| platform\_id            | string | The Platform's ID for the shipping line item                             |
| parent\_data\_model     | string | The parent data model type (e.g., ECOMMERCE\_ORDERS, ECOMMERCE\_REFUNDS) |
| parent\_data\_model\_id | string | The ID of the parent data model in the ecommerce platform                |
| title                   | string | The title of the shipping line item                                      |
| description             | string | The description of the shipping line item                                |
| sub\_total              | number | The subtotal of the shipping line item                                   |
| tax\_amount             | number | The tax amount on the shipping subtotal                                  |
| total\_amount           | number | The total amount including shipping and taxes                            |

## Properties Supported

| Property              | Type      | Description                                         |
| --------------------- | --------- | --------------------------------------------------- |
| platform\_id          | string    | The Platform's ID for the order                     |
| currency\_id          | string    | The currency ID of the order                        |
| reference             | string    | The reference of the order                          |
| created\_at           | string    | The date and time the order was created             |
| updated\_at           | string    | The date and time the order was last updated        |
| order\_name           | string    | The name of the order                               |
| order\_number         | string    | The order number                                    |
| description           | string    | The description of the order                        |
| total\_discount       | number    | The total discount amount of the order              |
| sub\_total            | number    | The subtotal of the order before taxes and shipping |
| tax\_amount           | number    | The tax amount of the order                         |
| total\_amount         | number    | The total amount of the order                       |
| amount\_due           | number    | The amount due for the order                        |
| order\_status         | string    | The status of the order                             |
| payment\_status       | string    | The payment status of the order                     |
| customer\_id          | string    | The customer ID associated with the order           |
| shipping\_amount      | number    | The shipping amount for the order                   |
| line\_items           | object\[] | The line items of the order                         |
| addresses             | object\[] | The addresses associated with the order             |
| shipping\_line\_items | object\[] | The shipping line items of the order                |

<ResponseExample name="The Orders Object">
  ```json The Orders Response Object theme={null}
  {
    "rootfi_id": 157,
    "rootfi_created_at": "2024-01-22T05:07:31.465Z",
    "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
    "rootfi_company_id": 1089,
    "platform_id": "ord_123456",
    "platform_unique_id": "ORD-2024-001",
    "currency_id": "USD",
    "reference": "REF-2024-001",
    "created_at": "2024-01-22T05:07:31.465Z",
    "updated_at": "2024-01-22T05:07:31.000Z",
    "order_name": "Order #ORD-2024-001",
    "order_number": "ORD-2024-001",
    "description": "Summer Sale Order - Wireless Headphones",
    "total_discount": 10.00,
    "sub_total": 89.99,
    "tax_amount": 7.20,
    "total_amount": 97.19,
    "amount_due": 0.00,
    "order_status": "FULFILLED",
    "payment_status": "PAID",
    "customer_id": "cus_123456",
    "shipping_amount": 5.99,
    "line_items": [
      {
        "platform_id": "li_123456",
        "item_id": "prod_789",
        "tax_id": "tax_001",
        "line_item_type_id": "ord_123456",
        "line_item_type": "ECOMMERCE_ORDERS",
        "description": "Wireless Headphones - Black",
        "unit_amount": 99.99,
        "quantity": 1,
        "total_discount": 10.00,
        "tax_amount": 7.20,
        "sub_total": 89.99,
        "total_amount": 97.19
      }
    ],
    "addresses": [
      {
        "rootfi_id": 278264,
        "platform_id": "addr_123456",
        "platform_unique_id": "ADDR-2024-001",
        "type": "SHIPPING",
        "data_model_id": "ord_123456",
        "street": "123 Main Street",
        "locality": "Downtown",
        "city": "New York",
        "state": "NY",
        "country": "USA",
        "pincode": "10001",
        "data_model": "ECOMMERCE_ORDERS",
        "updated_at": "2024-01-22T05:07:31.000Z"
      }
    ],
    "shipping_line_items": [
      {
        "platform_id": "sli_123456",
        "parent_data_model": "ECOMMERCE_ORDERS",
        "parent_data_model_id": "ord_123456",
        "title": "Standard Shipping",
        "description": "Standard shipping via USPS",
        "sub_total": 5.99,
        "tax_amount": 0.48,
        "total_amount": 6.47
      }
    ]
  }
  ```
</ResponseExample>
