Sort Criteria

Use the sort criteria parameter to get the orders sorted by the submitted date in ascending or descending order.

The following example shows how to configure the get orders request to respond with 15 orders ascending by the submitted date.

<ord:GetOrdersRequest ExternalBusinessTransactionID="123">
         <!--Optional:-->
         <ord:sortCriteria>
            <!--Zero or more repetitions:-->
            <ord:sortField sortBy="ASC" sortSequence="1">  <!--SortBy can be "ASC" or "DESC" -->
               <ord:field>submittedDate</ord:field>
            </ord:sortField>
         </ord:sortCriteria>
         <ord:count>15</ord:count>   <!--to restrict the number of orders in result -->
      </ord:GetOrdersRequest>