cancel_pending_orders

Cancels orders with a status of pending or declined.

Request parameters for cancel_pending_orders

Standard parameters

  • action = cancel_pending_orders
  • object = order

Attributes

Parameters within the attributes associative array are described below.

Parameter nameObligationDefinition/Value
statusOptionalLists the status for which to cancel orders, either pending or declined. Valid values are declined or pending. The default is pending.
to_dateRequiredSpecify the date, in UNIX (epoch) time before which
to cancel orders. Orders put in pending or declined
state on this date and earlier are cancelled.

Response parameters for cancel_pending_orders

Standard parameters

  • action = reply
  • object = order
  • 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 nameObligationDefinition/Value
cancelledReturned if is_success = trueContains associative arrays identifying orders that were cancelled. Valid values are domain, reg_type, and id.

For more information, see the Cancelled table
below.
totalReturned if is_success = trueThe number of orders that were cancelled.

Cancelled

Parameters within the cancelled associative array are described below.

Parameter nameObligationDefinition/Value
domainAlways returnedThe domain name of the cancelled order.
idAlways returnedThe order ID of the cancelled order.
reg_typeAlways returnedThe type of order that was cancelled. Valid values are new, transfer, and renewal.

Examples for cancel_pending_orders

Request

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
    <header>
        <version>0.9</version>
    </header>
    <body>
        <data_block>
            <dt_assoc>
                <item key="protocol">XCP</item>
                <item key="action">cancel_pending_orders</item>
                <item key="object">order</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="to_date">1115228160</item>
                        <item key="status">
                            <dt_array>
                                <item key="0">declined</item>
                                <item key="1">pending</item>
                            </dt_array>
                        </item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>

Response

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<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">ORDER</item>
                <item key="is_success">1</item>
                <item key="response_code">200</item>
                <item key="response_text">Command successful</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="total">2</item>
                        <item key="cancelled">
                            <dt_array>
                                <item key="0">
                                    <dt_assoc>
                                        <item key="reg_type">new</item>
                                        <item key="id">5261</item>
                                        <item key="domain">example.de</item>
                                    </dt_assoc>
                                </item>
                                <item key="1">
                                    <dt_assoc>
                                        <item key="reg_type">transfer</item>
                                        <item key="id">5530</item>
                                        <item key="domain">example.com</item>
                                    </dt_assoc>
                                </item>
                            </dt_array>
                        </item>
                    </dt_assoc>
                </item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>