Skip to main content
The Orders Data Model represents contact purchase transactions in your e-commerce platform. V4 introduces a comprehensive order structure that embeds fulfillments, transactions, and addresses directly within the order object.
  • Unified order properties: Access order details including status, amounts, contact information, and line items from a single endpoint.
  • Embedded fulfillments: Complete shipment tracking and delivery status included directly in the order response.
  • Consolidated transactions: All payment and refund transactions for an order accessible without additional API calls.
  • Expandable relationships: Use the expand parameter to customize the level of detail returned.

Attributes

FieldTypeDescriptionRequiredExpandable
rootfi_idintegerUnique identifier for this orderYesNo
rootfi_created_atdatetimeWhen this order was created in Commenda’s systemYesNo
rootfi_updated_atdatetimeWhen this order was last updated in Commenda’s systemYesNo
rootfi_company_idintegerCompany identifier this order belongs toYesNo
platform_idstringPlatform-specific order identifierYesNo
customer_idstringReference to the Contact who placed this orderYesYes
currency_idstringISO 4217 currency code for all monetary amountsYesNo
order_numberstringHuman-readable order number (e.g., “ORD-2024-001”)YesNo
statusenumOverall status of the orderYesNo
payment_statusenumPayment state of the orderYesNo
fulfillment_statusenumShipping/delivery state of the orderYesNo
total_amountdecimalFinal total amount including tax and shippingYesNo
total_discountdecimalTotal discount amount applied to this orderNoNo
total_taxdecimalTotal tax amount chargedNoNo
shipping_amountdecimalShipping and handling chargesNoNo
created_atdatetimeOriginal creation timestamp from platformYesNo
updated_atdatetimeLast update timestamp from platformYesNo
line_itemsarrayIndividual items included in this orderYesYes
addressesarrayShipping and billing addresses for this orderNoYes
fulfillmentsarrayComplete fulfillment records including tracking informationNoYes
transactionsarrayAll payment and refund transactions associated with this orderNoYes

Status Enum Values

ValueDescription
pendingOrder has been created but not yet processed
processingOrder is being prepared for fulfillment
completedOrder has been fully fulfilled
cancelledOrder has been cancelled
on_holdOrder is temporarily on hold
unknownStatus cannot be determined

Payment Status Enum Values

ValueDescription
pendingPayment initiated but not confirmed
paidPayment completed successfully
partially_paidPartial payment received
failedPayment failed to process
refundedPayment refunded
partially_refundedPartial refund issued
voidedPayment voided before capture
unknownPayment status cannot be determined

Fulfillment Status Enum Values

ValueDescription
unfulfilledOrder has not been shipped
partially_fulfilledSome items have been shipped
fulfilledAll items have been shipped
in_transitPackage is being delivered
deliveredSuccessfully delivered to contact
returnedOrder has been returned to sender
cancelledFulfillment cancelled
unknownFulfillment status cannot be determined

Expandable Attributes

  • expand=customer - Includes full Contact object details
  • expand=line_items - Includes detailed LineItem objects with product information
  • expand=addresses - Includes full Address objects
  • expand=fulfillments - Includes complete Fulfillment objects with tracking
  • expand=transactions - Includes all Transaction objects (payments, refunds)

LineItem Object

Each line item in the line_items array contains:
FieldTypeDescriptionRequiredExpandable
rootfi_idintegerUnique identifier for this line itemYesNo
item_idstringReference to the Item (product) being purchasedYesYes
variant_idstringReference to the specific Variant being purchasedNoYes
namestringDisplay name of the productYesNo
descriptionstringDetailed description or notes for this line itemNoNo
quantityintegerNumber of units orderedYesNo
unit_amountdecimalPrice per unit before taxes and discountsYesNo
tax_amountdecimalTotal tax amount for this line itemNoNo
discount_amountdecimalTotal discount applied to this line itemNoNo
total_amountdecimalFinal amount (quantity × unit_amount + tax - discount)YesNo
{
  "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",
  "customer_id": "cus_123456",
  "currency_id": "USD",
  "order_number": "ORD-2024-001",
  "status": "completed",
  "payment_status": "paid",
  "fulfillment_status": "fulfilled",
  "total_amount": 97.19,
  "total_discount": 10.00,
  "total_tax": 7.20,
  "shipping_amount": 5.99,
  "created_at": "2024-01-22T05:07:31.465Z",
  "updated_at": "2024-01-22T05:07:31.000Z",
  "line_items": [
    {
      "rootfi_id": 5001,
      "item_id": "prod_789",
      "variant_id": "var_001",
      "name": "Wireless Headphones - Black",
      "description": "Premium wireless headphones",
      "quantity": 1,
      "unit_amount": 99.99,
      "tax_amount": 7.20,
      "discount_amount": 10.00,
      "total_amount": 97.19
    }
  ],
  "addresses": [
    {
      "rootfi_id": 278264,
      "platform_id": "addr_123456",
      "type": "shipping",
      "street": "123 Main St",
      "city": "New York",
      "state": "NY",
      "postal_code": "10001",
      "country": "US"
    },
    {
      "rootfi_id": 278265,
      "platform_id": "addr_123457",
      "type": "billing",
      "street": "123 Main St",
      "city": "New York",
      "state": "NY",
      "postal_code": "10001",
      "country": "US"
    }
  ],
  "fulfillments": [
    {
      "rootfi_id": 10001,
      "platform_id": "ful_001",
      "status": "delivered",
      "shipment_status": "delivered",
      "tracking_info": {
        "number": "1Z999AA10123456784",
        "company": "UPS",
        "url": "https://www.ups.com/track?tracknum=1Z999AA10123456784"
      }
    }
  ],
  "transactions": [
    {
      "rootfi_id": 8001,
      "platform_id": "pay_001",
      "type": "payment",
      "amount": 97.19,
      "status": "completed",
      "payment_method_type": "card"
    }
  ]
}