Find Order by Increment ID
find_order_by_increment_idRetrieve a sales order by its increment_id, returning order header and line items (up to 50) without manual SQL JOINs.
Instructions
Looks up a sales order by increment_id and returns order header plus line items (up to 50). Faster than writing JOINs manually. For payment details use execute_select_query on sales_order_payment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | Override the MAGENTO_SQL_PROFILE env var for this call only. Use list_connection_profiles to see available names. | |
| magentoRoot | No | Absolute path to the Magento root (must contain app/etc/env.php). Defaults to MAGENTO_ROOT env var or auto-discovery. | |
| increment_id | Yes | Sales order increment_id (e.g. '000000123'). Use find_order_by_increment_id instead of raw SQL. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| rows | Yes | ||
| sampled | No | ||
| rowCount | Yes | ||
| truncated | No |