> ## Documentation Index
> Fetch the complete documentation index at: https://docs.komerza.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Orders

> Search orders by ID or customer email in the specified store.
Requires the `stores.orders.view` permission.

<CardGroup cols={2}>
  <Card title="Order Statuses" icon="circle-info" href="/api-reference/payment-status">
    View all possible order status values and their meanings
  </Card>

  <Card title="Payment Methods" icon="credit-card" href="/api-reference/payment-methods">
    See supported payment gateways and cryptocurrencies
  </Card>
</CardGroup>

## Filterable Fields

This endpoint supports filtering and sorting. See the [Filtering & Sorting Guide](/api-reference/filtering) for syntax details.

| Field      | Type     | Description                                                                      |
| ---------- | -------- | -------------------------------------------------------------------------------- |
| `dateFrom` | datetime | Filter orders created on or after this date                                      |
| `dateTo`   | datetime | Filter orders created on or before this date                                     |
| `status`   | string   | Filter by order status. See [Order Statuses](/api-reference/payment-status)      |
| `gateway`  | string   | Filter by payment gateway. See [Payment Methods](/api-reference/payment-methods) |
| `email`    | string   | Filter by customer email address                                                 |

**Example:**

```bash theme={null}
# Orders from last 30 days with "pending" status
GET /stores/{storeId}/orders?filters=dateFrom>=2025-10-28,status==pending

# Orders paid via Stripe, sorted by newest first
GET /stores/{storeId}/orders?filters=gateway==stripe&sorts=-dateFrom
```


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.komerza.com/llms.txt).
