get_orders_by_domain

Retrieves information about orders placed for a specific domain.

Request parameters for get_orders_by_domain

Standard parameters

  • action = get_orders_by_domain
  • object = domain

Attributes

Parameters within the attributes associative array are described below.

Parameter name

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

Optional

Specify a starting date, in the format YYYY-MM-DD
from which to return orders. Can be used with the
order_to parameter to specify a range within which
to search. If not used with order_to, all orders from
the order_from date onward are returned.

order_to

Optional

Specify an end date, in the format YYYY-MM-DD,
before which to return orders. Can be used with the
attribute order_from parameter to specify a range
within which to search. 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 page index starts at 1.

status

Optional

Status of the order. Allowed values are declined,
pending, pending_fax, deleted, completed, cancelled, ca_owner_approval, or waiting.

type

Optional

Type of order query, for example, new, premium,
renewal, sunrise, or transfer.

Response parameters for get_orders_by_domain

Standard parameters

  • action = reply
  • object = domain
  • is_success = a Boolean is returned, 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

Attributes

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

Parameter name

Obligation

Definition/Value

orders

Returned if is_success = true

Contains arrays that list details about each order.

For more information, see the Orders table below.

page_size

Returned if is_success = true

The maximum number of orders returned per
page.

Orders

Parameters within the orders associative array are described below.

Parameter name

Obligation

Definition/Value

id

Always returned

The ID number of the order.

order_date

Always returned

Date the order was created.

status

Always returned

Current status of the order. Values may be declined,
pending, pending_fax, deleted, completed,
cancelled, declined, ca_owner_approval
, or
waiting.

type

Always returned

Type of order, for example, new, premium, renewal, sunrise, transfer, or whois_privacy.

Examples for get_orders_by_domain

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>

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>