Search Orders
Last updated: 23-Aug-2021
Rate this article:
Overview
Use the searchOrders method via JSON-RPC API 6.0 to retrieve multiple orders depending on the filter parameters.
Request Parameters
Parameter name | Type | Required/Optional | Description |
---|---|---|---|
sessionID | String | Required | Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes. |
orderSearchOptions | Object | Optional | Use this object to configure your search order options. |
Request Example
<?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
A successful searchOrders call via JSON-RPC API 6.0 returns:
Parameter name | Type | Description |
---|---|---|
Items | Array of Objects | An array of Order Information objects, with catalog products or with dynamic products. |
Pagination | Object | Pagination object with the following parameters: Page, Limit, Count. |
Rate this article: