# Search Order

> Perform Search Order through Brightree.

Source: [https://genhealth.ai/docs/workflows/integrations/brightree/brightree_search_order](https://genhealth.ai/docs/workflows/integrations/brightree/brightree_search_order)

Integration: [Brightree](https://genhealth.ai/docs/workflows/integrations/brightree.md)

- Handler: `brightree_search_order`

- Connection type: `brightree`

## Use in a workflow

Copy this discovered node config, fill params from the input contract, and validate the complete graph. Integration results are available as {{node_id.default.field}}. Check business success before dependent writes; completion alone does not prove business success.

```json

{
  "_group": "Brightree",
  "params": {
    "page": 1,
    "fetch_all": false,
    "page_size": 50
  },
  "handler": "brightree_search_order"
}

```

[Action contracts](https://genhealth.ai/docs/workflows/action-contracts.md) · [Run recovery](https://genhealth.ai/docs/workflows/operations.md)

## Inputs

- `patient_key` — Patient Key (number)
  Optional numeric value.
- `order_status` — Order Status (select)
  Optional selected identifier or value.
  Options: New ("New"), Active ("Active"), On-Hold ("On-Hold"), Delivered ("Delivered"), Closed ("Closed"), Stopped ("Stopped")
- `classification` — Classification (select, dynamic options)
  Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.
- `order_branches` — Order Branches (multi_select)
  Optional list of selected values.
- `fetch_all` — Fetch All (boolean)
  Optional true-or-false value.
  Default: `false`
- `page` — Page (number)
  Optional numeric value.
  Default: `1`
- `page_size` — Page Size (select)
  Optional selected identifier or value.
  Default: `50`
  Options: 10 (10), 25 (25), 50 (50)

## Outputs

- `success` — Success
- `complete` — Complete
- `orders` — Orders
- `sales_order_keys` — Sales Order Keys
- `count` — Count
- `total_items` — Total Items
- `total_pages` — Total Pages
- `current_page` — Current Page
- `page` — Page
- `page_size` — Page Size
- `fetch_all` — Fetch All
- `order_status` — Order Status
- `patient_key` — Patient Key
- `message` — Message
- `error` — Error
- `error_message` — Error Message

Output schema completeness: `best_effort_declared`

## Safety

- External effect: `read`
- Confirmation recommended: no
- Retry safe: yes
- Dry run supported: no

## Schemas

These schemas are first-pass authoring guidance. Runtime validation remains authoritative.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "page": {
      "type": "number",
      "default": 1,
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "fetch_all": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "page_size": {
      "enum": [
        10,
        25,
        50
      ],
      "type": "number",
      "default": 50,
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "patient_key": {
      "type": "number",
      "description": "Optional numeric value.",
      "x-workflow-field-type": "number"
    },
    "order_status": {
      "enum": [
        "New",
        "Active",
        "On-Hold",
        "Delivered",
        "Closed",
        "Stopped"
      ],
      "type": "string",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "classification": {
      "type": "string",
      "description": "Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.",
      "x-dynamic-options": true,
      "x-workflow-field-type": "select"
    },
    "order_branches": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional list of selected values.",
      "x-workflow-field-type": "multi_select"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "page": {},
    "count": {},
    "error": {},
    "orders": {},
    "message": {},
    "success": {},
    "complete": {},
    "fetch_all": {},
    "page_size": {},
    "patient_key": {},
    "total_items": {},
    "total_pages": {},
    "current_page": {},
    "order_status": {},
    "error_message": {},
    "sales_order_keys": {}
  },
  "additionalProperties": true
}
```
