---
updatedAt: 2025-11-11T21:42:07.000Z
agentTools:
  projectIndex: https://domains.opensrs.guide/llms.txt
---

# get_orders_by_domain

Retrieves information about orders placed for a specific domain.

## Request parameters

#### Standard request parameters

* **action** = get\_orders\_by\_domain
* **object** = domain

### Request attributes

Parameters within the **attributes** associative array are described below:

| Parameter                 | Obligation | Definition/Value                                                                                                                                                                                                                                                                                                                                                   |
| :------------------------ | :--------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| domain                    | Required   | The domain to query                                                                                                                                                                                                                                                                                                                                                |
| limit                     | Optional   | Maximum number of orders to display on a page; the default is 40.                                                                                                                                                                                                                                                                                                  |
| order\_from<br/>order\_to | Optional   | Specify a start/end date from which to return orders, in the format YYYY-MM-DD. Use both order\_from and order\_to to specify a range to search.<br/><br/>If not used with **order\_to**, all orders from the **order\_from** date onward are returned.<br/><br/>If not used with **order\_from**, all orders from the **order\_to** date and earlier are returned |
| page                      | Optional   | Determines which page to retrieve, using the page number. The default is 1 and the page index starts at 1.                                                                                                                                                                                                                                                         |
| status                    | Optional   | Status of the order, allowed values are:<br/>**completed**<br/>**pending**<br/>**declined**<br/>**cancelled**<br/>**deleted**<br/>**waiting**<br/>**pending\_fax**<br/>**ca\_owner\_approval**                                                                                                                                                                     |
| type                      | Optional   | Type of order query, allowed values are:<br/>**new**<br/>**premium**<br/>**renewal**<br/>**sunrise**<br/>**transfer**                                                                                                                                                                                                                                              |

***

## Response parameters

#### Standard response parameters

* **action** = reply
* **object** = domain
* is\_success = Boolean indicating success or failure of the request.
* response\_code = Response code indicating outcome of the request.
* response\_text = Message describing the outcome of the request.

### Response attributes

| Parameter | Obligation      | Definition/Value                                                                                                                                                                                                                                                         |
| :-------- | :-------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| orders    | Always returned | An array of orders, each orders item contains an associative array with the following parameters:<br/>**id**—The ID number of the order.<br/>**order\_date**—The date the order was created.<br/>**status**—Current status of the order.<br/>**type**—The type of order. |

If the request is successful, the **attributes** associative array may include the following:

***

## Example

```xml Request
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">get_orders_by_domain</item>
                <item key="object">domain</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="domain">example.com</item>
                        <item key="page">1</item>
                        <item key="order_from">2007-10-01</item>
                        <item key="status">pending</item>
                        <item key="type">new</item>
                        <item key="limit">100</item>
                        <item key="order_to">2007-10-16</item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>
```
```xml Response
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">REPLY</item>
                <item key="object">DOMAIN</item>
                <item key="is_success">1</item>
                <item key="response_text">Command successful</item>
                <item key="response_code">200</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="page_size">100</item>
                        <item key="orders">
                            <dt_array>
                                <item key="0">
                                    <dt_assoc>
                                        <item key="order_date">16-OCT-2007 15:21:26</item>
                                        <item key="status">pending</item>
                                        <item key="type">new</item>
                                        <item key="id">103789</item>
                                    </dt_assoc>
                                </item>
                                <item key="1">
                                    <dt_assoc>
                                        <item key="order_date">16-OCT-2007 15:21:23</item>
                                        <item key="status">pending</item>
                                        <item key="type">new</item>
                                        <item key="id">103788</item>
                                    </dt_assoc>
                                </item>
                            </dt_array>
                        </item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>
```