The Order Data Model represents a purchase order, typically linked to an invoice. Orders track the commercial transaction details and can generate invoices. In V4, orders embed complete transaction history for comprehensive financial tracking.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.
- Invoice generation: Orders can generate one or more invoices
- Embedded transactions: Complete payment history embedded in the order object
- Status tracking: Track both order fulfillment status and payment status
- Line item details: Detailed breakdown of items in the order
Attributes
Order Attributes
| Property | Type | Description |
|---|---|---|
| rootfi_id | integer | Unique identifier for this order |
| rootfi_created_at | string | When this order was created in Commenda’s system (ISO 8601) |
| rootfi_updated_at | string | When this order was last updated (ISO 8601) |
| rootfi_company_id | integer | Company identifier this order belongs to |
| platform_id | string | Platform-specific order identifier |
| contact_id | string | Reference to the Contact |
| currency_id | string | ISO 4217 currency code |
| status | enum | Current order status |
| payment_status | enum | Payment state of the order |
| total_amount | number | Total order amount |
| total_discount | number | Total discount amount |
| total_tax | number | Total tax amount |
| created_at | string | Original creation timestamp from platform (ISO 8601) |
| updated_at | string | Last update timestamp from platform (ISO 8601) |
| invoice_id | string | Reference to the primary Invoice |
| invoice_ids | array | References to all related invoices |
| line_items | array | Items included in this order |
| transactions | array | All payment transactions for this order |
Status Enum Values
| Value | Description |
|---|---|
PENDING | Order created but not yet processed |
PROCESSING | Order is being processed |
COMPLETED | Order has been fulfilled |
CANCELED | Order was canceled |
ON_HOLD | Order is temporarily on hold |
UNKNOWN | Status cannot be determined |
Payment Status Enum Values
| Value | Description |
|---|---|
DRAFT | Payment created but not yet initiated |
PENDING | Payment initiated but not confirmed |
PAID | Payment completed successfully |
PARTIALLY_PAID | Partial payment received |
FAILED | Payment failed to process |
REFUNDED | Payment refunded |
PARTIALLY_REFUNDED | Partial refund issued |
VOIDED | Payment voided before capture |
UNKNOWN | Payment status cannot be determined |
LineItem Attributes
| Property | Type | Description |
|---|---|---|
| rootfi_id | integer | Unique identifier for this line item |
| item_id | string | Reference to the Item/Product |
| description | string | Text description of the product or service |
| quantity | integer | Number of units |
| unit_amount | number | Price per unit |
| tax_amount | number | Total tax for this line item |
| discount_amount | number | Total discount applied |
| total_amount | number | Final amount |
Expandable Attributes
Use theexpand query parameter to include related objects:
expand=contact- Includes full Contact objectexpand=invoice- Includes the primary Invoice objectexpand=invoices- Includes all related Invoice objectsexpand=line_items- Includes detailed LineItem objectsexpand=transactions- Includes all Transaction objects