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:

ParameterObligationDefinition/Value
domainRequiredThe domain to query
limitOptionalMaximum number of orders to display on a page; the default is 40.
order_from
order_to
OptionalSpecify 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.

If not used with order_to, all orders from the order_from date onward are returned.

If not used with order_from, all orders from the order_to date and earlier are returned
pageOptionalDetermines which page to retrieve, using the page number. The default is 1 and the page index starts at 1.
statusOptionalStatus of the order, allowed values are:
completed
pending
declined
cancelled
deleted
waiting
pending_fax
ca_owner_approval
typeOptionalType of order query, allowed values are:
new
premium
renewal
sunrise
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

ParameterObligationDefinition/Value
ordersAlways returnedAn array of orders, each orders item contains an associative array with the following parameters:
id—The ID number of the order.
order_date—The date the order was created.
status—Current status of the order.
type—The type of order.

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


Example

<?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 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>