# Retrieve an order

Use the **getOrder** method to retrieve details on a specific order placed with dynamic product information, or catalog products, using the unique, system-generated reference.

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

<table><thead><tr><th width="162.7999267578125">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><strong>Required (string)</strong><br>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 <strong>10 minutes</strong>.</td></tr><tr><td><code>orderReference</code></td><td><strong>Required (string)</strong><br>Order reference number of an older order, which is already approved/paid.</td></tr></tbody></table>

### Request sample

```php
<?php

require ('PATH_TO_AUTH');

$orderReference = 'YOUR_ORDER_REFERENCE';

$jsonRpcRequest = array (
'method' => 'getOrder',
'params' => array($sessionID, $orderReference),
'id' => $i++,
'jsonrpc' => '2.0'
);

var_dump (callRPC((Object)$jsonRpcRequest, $host, true));
```

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

<table><thead><tr><th width="189.4666748046875">Parameter</th><th>Type</th></tr></thead><tbody><tr><td><a href="/pages/296f77b2320970fcc8c6d6047e6ecabcaa996ffa"><code>Order information</code></a></td><td><p><strong>Object</strong></p><p>(orders with catalog products)</p></td></tr><tr><td><a href="/pages/d46ea4d44b83f08cca4e78473a2887867edc8ba3"><code>Order information</code></a></td><td><p><strong>Object</strong></p><p>(orders with dynamic product information)</p></td></tr><tr><td><a href="https://verifone.cloud/docs/2checkout/Documentation/07Commerce/Checkout-links-and-options/Manage-store-URLs-for-shopper-emails">WSOrder</a></td><td><strong>String</strong></td></tr></tbody></table>

{% hint style="warning" %}
Only orders with STATUS = COMPLETE are returned when placing a **getOrder** API call.
{% endhint %}


---

# 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/retrieve-an-order.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.
