# Search orders

Use the **searchOrders** method via JSON-RPC API 6.0 to retrieve multiple orders depending on the filter parameters.&#x20;

## Request parameters <a href="#request-parameters" id="request-parameters"></a>

<table><thead><tr><th width="189.4666748046875">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><p><strong>Required (string)</strong></p><p>Session identifier, the output of the <strong>Login</strong> method. Include <code>sessionID</code> into all your requests. 2Checkout throws an exception if the values are incorrect.  The <code>sessionID</code> expires in 10 minutes.</p></td></tr><tr><td><a href="/pages/tTt9Fn8yrr4sirZ2k970"><code>orderSearchOptions</code></a></td><td><p><strong>Optional (object)</strong></p><p>Use this object to configure your search order options.</p></td></tr></tbody></table>

### Request sample <a href="#request-example" id="request-example"></a>

```php
<?php

require ('PATH_TO_AUTH');

$orderSearchOptions = new stdClass();
$orderSearchOptions->StartDate = “2020-01-23”;
$orderSearchOptions->PartnerOrders = true;
$orderSearchOptions->Pagination = new stdClass();$orderSearchOptions->Pagination->Page = 2;
$orderSearchOptions->Pagination->Limit = 25;

try {
    $orders = $client->searchOrders($sessionID, $orderSearchOptions);
}
catch (SoapFault $e) {
    echo "orders: " . $e->getMessage();
    exit;
}

var_dump("orders", $orders);
               
?>
```

## Response parameters <a href="#response" id="response"></a>

A successful **searchOrders** call via JSON-RPC API 6.0 returns:

<table><thead><tr><th width="137.2000732421875">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>Items</code></td><td><p><strong>Array of objects</strong></p><p>An array of Order Information objects, with <a href="/pages/296f77b2320970fcc8c6d6047e6ecabcaa996ffa">catalog products</a> or with <a href="/pages/d46ea4d44b83f08cca4e78473a2887867edc8ba3">dynamic products</a>.</p></td></tr><tr><td><code>Pagination</code></td><td><p><strong>Object</strong></p><p>Pagination object with the following parameters: <code>Page</code>, <code>Limit</code>, <code>Count</code>.</p></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/order-search-options/search-orders.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
