> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: searchOrders(options: SearchOrdersOptions) # Method package: wixEcomBackend # Method menu location: wixEcomBackend --> orders --> searchOrders # Method Link: https://dev.wix.com/docs/velo/apis/wix-ecom-backend/orders/search-orders.md # Method Description: Retrieves a list of orders, given the provided paging, filtering, and sorting. Search Orders runs with these defaults, which you can override: - `createdDate` is sorted in `DESC` order - `cursorPaging.limit` is `100` - `filter: {"status": {"$ne": "INITIALIZED"}}` - other order statuses can be queried, but orders with `status: "INITIALIZED"` are never returned For field support for filters and sorting, see [Orders: Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/orders/supported-filters-and-sorting.md). To learn about working with _Search_ endpoints, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md), and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md). # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## searchOrders example for dashboard page code ```javascript import { orders } from 'wix-ecom-backend'; async function searchOrders(options) { try { const result = await orders.searchOrders(options); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## searchOrders example for exporting from backend code ```javascript import { orders } from 'wix-ecom-backend'; import { webMethod, Permissions } from 'wix-web-module'; import { elevate } from 'wix-auth'; const elevatedSearchOrders = elevate(orders.searchOrders); export const searchOrders = webMethod( Permissions.Anyone, async (options) => { try { const result = await elevatedSearchOrders(options); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---