Changes since
the last release

com.ebay.sdk.call
Class GetOrdersCall

java.lang.Object
  extended by com.ebay.sdk.ApiCall
      extended by com.ebay.sdk.call.GetOrdersCall

public class GetOrdersCall
extends ApiCall

Wrapper class of the GetOrders call of eBay SOAP API.

Title: SOAP API wrapper library.

Description: Contains wrapper classes for eBay SOAP APIs.

Copyright: Copyright (c) 2009

Company: eBay Inc.


Input property: OrderIDArray - This container is used if the user wants to retrieve one or more specific orders in which they are involved as either the seller or buyer. If one or more order IDs are specified in this container, any order role, order status, or date range filters are ignored if specified in the request.

Note: As of June 2019, eBay has changed the format of order identifier values. The new format is a non-parsable string, globally unique across all eBay marketplaces, and consistent for both single line item and multiple line item orders. Unlike in the past, instead of just being known and exposed to the seller, these unique order identifiers will also be known and used/referenced by the buyer and eBay customer support.

For developers and sellers who are already integrated with the Trading API's order management calls, this change shouldn't impact your integration unless you parse the existing order identifiers (e.g., OrderID or OrderLineItemID), or otherwise infer meaning from the format (e.g., differentiating between a single line item order versus a multiple line item order). Because we realize that some integrations may have logic that is dependent upon the old identifier format, eBay is rolling out this Trading API change with version control to support a transition period of approximately 9 months before applications must switch to the new format completely.

During the transition period, for developers/sellers using a Trading WSDL older than Version 1113, they can use the X-EBAY-API-COMPATIBILITY-LEVEL HTTP header in API calls to control whether the new or old OrderID format is returned in call response payloads. To get the new OrderID format, the value of the X-EBAY-API-COMPATIBILITY-LEVEL HTTP header must be set to 1113. During the transition period and even after, the new and old OrderID formats will still be supported/accepted in all Trading API call request payloads. After the transition period (which will be announced), only the new OrderID format will be returned in all Trading API call response payloads, regardless of the Trading WSDL version used or specified compatibility level.

Input property: CreateTimeFrom - The CreateTimeFrom and CreateTimeTo fields specify a date range for retrieving orders that were created during this time period. The CreateTimeFrom field is the starting date range. All eBay orders that were created within this date range are returned in the output. The maximum date range that may be specified with the CreateTimeFrom and CreateTimeTo fields is 90 days. CreateTimeFrom/CreateTimeTo date filters are ignored if the NumberOfDays date filter is used in the request, or if one or more order IDs are passed in the request. This value cannot be set back more than 90 days in the past, as this call cannot retrieve sales older than 90 days old.

Note: Unless one or more OrderID values are used, one of the three available date range filters must be used.
Input property: CreateTimeTo - The CreateTimeFrom and CreateTimeTo fields specify a date range for retrieving orders that were created during this time period. The CreateTimeTo field is the ending date range. All eBay orders that were created within this date range are returned in the output. The maximum date range that may be specified with the CreateTimeFrom and CreateTimeTo fields is 90 days. If the CreateTimeFrom field is used and the CreateTimeTo field is omitted, the "TimeTo" value defaults to the present time or to 90 days past the CreateTimeFrom value (if CreateTimeFrom value is more than 90 days in the past). CreateTimeFrom/CreateTimeTo date filters are ignored if the NumberOfDays date filter is used in the request, or if one or more order IDs are passed in the request.

Note: If a GetOrders call is made within a few seconds after the creation of a multiple line item order, the caller runs the risk of retrieving orders that are in an inconsistent state, since the order consolidation involved in a multiple line item order may not have been completed. For this reason, it is recommended that sellers include the CreateTimeTo field in the call, and set its value to: Current Time - 2 minutes.
Note: Unless one or more OrderID values are used, one of the three available date range filters must be used.
Input property: OrderRole - This filter is used to toggle between retrieving orders based on the role of the user (seller or buyer). The order role defaults to Seller if this field is not used. If this field is used with a date filter, returned orders must satisfy both the date range and the OrderRole value.

Input property: OrderStatus - The field is used to retrieve eBay orders that are in a specific state. If this field is used with a date filter, only orders that satisfy both the date range and the OrderStatus value are retrieved.

If one or more OrderID values are specified through the OrderIDArray container, the OrderStatus field should not be used, and it is ignored if it is used. If an OrderStatus value is not used and no OrderID values are specified, orders in all states are returned.

Input property: ListingType - Note: This field's purpose was to allow the seller to retrieve only Half.com listings. Since the Half.com site has been shut down, this field is no longer applicable.
Input property: Pagination - If many orders are available to retrieve, you may need to call GetOrders multiple times to retrieve all the data. Each result set is returned as a page of orders. Use the Pagination filters to control the maximum number of orders to retrieve per page (i.e., per call), and the page number to retrieve.
Input property: ModTimeFrom - The ModTimeFrom and ModTimeTo fields specify a date range for retrieving existing orders that have been modified within this time period (for example, Incomplete status to Pending status or Pending status to Complete status). The ModTimeFrom field is the starting date range. All eBay orders that were last modified within this date range are returned in the output. Unlike the CreateTimeFrom/CreateTimeTo filters, which may cover a maximum period of 90 days, the maximum date range that may be specified with the ModTimeFrom and ModTimeTo fields is only 30 days. This value cannot be set back more than 90 days in the past, as this call cannot retrieve sales older than 90 days old. ModTimeFrom/ModTimeTo date filters are ignored if the CreateTimeFrom/CreateTimeTo or NumberOfDays date filters are used in the request, or if one or more order IDs are passed in the request.

Note: Unless one or more OrderID values are used, one of the three available date range filters must be used.
Input property: ModTimeTo - The ModTimeFrom and ModTimeTo fields specify a date range for retrieving existing orders that have been modified within this time window (for example, Incomplete status to Pending status or Pending status to Complete status). The ModTimeTo field is the ending date range. All eBay orders that were last modified within this date range are returned in the output. Unlike the CreateTimeFrom/CreateTimeTo filters, which may cover a maximum period of 90 days, the maximum date range that may be specified with the ModTimeFrom and ModTimeTo fields is 30 days. If the ModTimeFrom field is used and the ModTimeTo field is omitted, the 'TimeTo' value defaults to the present time (if ModTimeFrom value is less than 30 days in the past) or to 30 days past the ModTimeFrom value. ModTimeFrom/ModTimeTo date filters are ignored if the CreateTimeFrom/CreateTimeTo or NumberOfDays date filters are used in the request, or if one or more order IDs are passed in the request.

Note: Unless one or more OrderID values are used, one of the three available date range filters must be used.
Input property: NumberOfDays - This filter specifies the number of days (24-hour periods) in the past to search for orders. All eBay orders that were either created or modified within this period are returned in the output. This field cannot be used in conjunction with the CreateTimeFrom/CreateTimeTo or ModTimeFrom/ModTimeTo date filters.

Note: Unless one or more OrderID values are used, one of the three available date range filters must be used.
Input property: IncludeFinalValueFee - This field is included and set to true if the user wants to view the Final Value Fee (FVF) for all orders in the response. The Final Value Fee is returned in the Transaction.FinalValueFee field. The Final Value Fee is assessed right after the creation of an order line item.

Input property: SortingOrder - This filter controls whether orders are retrieved in ascending order (oldest to newest according to modification date) or descending order (newest to oldest according to modification date). The default is Ascending, so the user will need to include this field and set it to Descending if the user wishes to view the most recent orders first in the retrieved output.

Output property: ReturnedPaginationResult - Contains information regarding the pagination of data, including the total number of pages and the total number of orders.
Output property: ReturnedHasMoreOrders - A true value indicates that there are more orders to be retrieved. Additional GetOrders calls with higher page numbers or more entries per page must be made to retrieve these orders. If false, no more orders are available or no orders match the request (based on the input filters).
Output property: ReturnedOrderArray - The set of orders that match the order IDs or filter criteria specified.
Output property: ReturnedOrdersPerPage - Indicates the number of orders that can be returned per page of data (i.e., per call). This is the same value specified in the Pagination.EntriesPerPage input (or the default value, if EntriesPerPage was not specified). This is not necessarily the actual number of orders returned per page (see ReturnedOrderCountActual).
Output property: ReturnedPageNumber - Indicates the page number of data returned in the response. This is the same value specified in the Pagination.PageNumber input. If orders are returned, the first page is 1.
Output property: ReturnedReturnedOrderCountActual - Indicates the total number of orders returned.

Version:
1.0
Author:
Ron Murphy

Field Summary
 
Fields inherited from class com.ebay.sdk.ApiCall
apiException, sendReqListeners
 
Constructor Summary
GetOrdersCall()
          Constructor.
GetOrdersCall(ApiContext apiContext)
          Constructor.
 
Method Summary
 java.util.Calendar getCreateTimeFrom()
          Gets the GetOrdersRequestType.createTimeFrom.
 java.util.Calendar getCreateTimeTo()
          Gets the GetOrdersRequestType.createTimeTo.
 java.lang.Boolean getIncludeFinalValueFee()
          Gets the GetOrdersRequestType.includeFinalValueFee.
 ListingTypeCodeType getListingType()
          Gets the GetOrdersRequestType.listingType.
 java.util.Calendar getModTimeFrom()
          Gets the GetOrdersRequestType.modTimeFrom.
 java.util.Calendar getModTimeTo()
          Gets the GetOrdersRequestType.modTimeTo.
 java.lang.Integer getNumberOfDays()
          Gets the GetOrdersRequestType.numberOfDays.
 OrderIDArrayType getOrderIDArray()
          Gets the GetOrdersRequestType.orderIDArray.
 TradingRoleCodeType getOrderRole()
          Gets the GetOrdersRequestType.orderRole.
 OrderType[] getOrders()
          Retrieves the orders for which the authenticated user is a participant, either as the buyer or the seller.
 OrderStatusCodeType getOrderStatus()
          Gets the GetOrdersRequestType.orderStatus.
 PaginationType getPagination()
          Gets the GetOrdersRequestType.pagination.
 java.lang.Boolean getReturnedHasMoreOrders()
          Valid after executing the API.
 OrderType[] getReturnedOrderArray()
          Valid after executing the API.
 java.lang.Integer getReturnedOrdersPerPage()
          Valid after executing the API.
 java.lang.Integer getReturnedPageNumber()
          Valid after executing the API.
 PaginationResultType getReturnedPaginationResult()
          Valid after executing the API.
 java.lang.Integer getReturnedReturnedOrderCountActual()
          Valid after executing the API.
 SortOrderCodeType getSortingOrder()
          Gets the GetOrdersRequestType.sortingOrder.
 void setCreateTimeFrom(java.util.Calendar createTimeFrom)
          Sets the GetOrdersRequestType.createTimeFrom.
 void setCreateTimeTo(java.util.Calendar createTimeTo)
          Sets the GetOrdersRequestType.createTimeTo.
 void setIncludeFinalValueFee(java.lang.Boolean includeFinalValueFee)
          Sets the GetOrdersRequestType.includeFinalValueFee.
 void setListingType(ListingTypeCodeType listingType)
          Sets the GetOrdersRequestType.listingType.
 void setModTimeFrom(java.util.Calendar modTimeFrom)
          Sets the GetOrdersRequestType.modTimeFrom.
 void setModTimeTo(java.util.Calendar modTimeTo)
          Sets the GetOrdersRequestType.modTimeTo.
 void setNumberOfDays(java.lang.Integer numberOfDays)
          Sets the GetOrdersRequestType.numberOfDays.
 void setOrderIDArray(OrderIDArrayType orderIDArray)
          Sets the GetOrdersRequestType.orderIDArray.
 void setOrderRole(TradingRoleCodeType orderRole)
          Sets the GetOrdersRequestType.orderRole.
 void setOrderStatus(OrderStatusCodeType orderStatus)
          Sets the GetOrdersRequestType.orderStatus.
 void setPagination(PaginationType pagination)
          Sets the GetOrdersRequestType.pagination.
 void setSortingOrder(SortOrderCodeType sortingOrder)
          Sets the GetOrdersRequestType.sortingOrder.
 
Methods inherited from class com.ebay.sdk.ApiCall
addDetailLevel, addSendRequestListener, execute, executeByApiName, getApiContext, getApiException, getBotBlock, getCallRetry, getDetailLevel, getEnableCompression, getEndUserIP, getErrorHandling, getInvocationID, getMessageID, getOutputSelector, getRequestXml, getResponseObject, getResponseXml, getSite, getWarningLevel, hasError, hasWarning, isEnableoAuthTokenHTTPHeader, removeSendRequestListener, setApiContext, setBotBlock, setCallRetry, setDetailLevel, setEnableCompression, setEnableoAuthTokenHTTPHeader, setEndUserIP, setErrorHandling, setInvocationID, setMessageID, setOutputSelector, setSite, setWarningLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetOrdersCall

public GetOrdersCall()
Constructor.


GetOrdersCall

public GetOrdersCall(ApiContext apiContext)
Constructor.

Parameters:
apiContext - The ApiContext object to be used to make the call.
Method Detail

getOrders

public OrderType[] getOrders()
                      throws ApiException,
                             SdkException,
                             java.lang.Exception
Retrieves the orders for which the authenticated user is a participant, either as the buyer or the seller. The call returns all the orders that meet the request criteria. Orders older than 90 days old will not be returned.

Returns:
The OrderType[] object.
Throws:
ApiException
SdkException
java.lang.Exception

getCreateTimeFrom

public java.util.Calendar getCreateTimeFrom()
Gets the GetOrdersRequestType.createTimeFrom.

Returns:
Calendar

setCreateTimeFrom

public void setCreateTimeFrom(java.util.Calendar createTimeFrom)
Sets the GetOrdersRequestType.createTimeFrom.

Parameters:
createTimeFrom - Calendar

getCreateTimeTo

public java.util.Calendar getCreateTimeTo()
Gets the GetOrdersRequestType.createTimeTo.

Returns:
Calendar

setCreateTimeTo

public void setCreateTimeTo(java.util.Calendar createTimeTo)
Sets the GetOrdersRequestType.createTimeTo.

Parameters:
createTimeTo - Calendar

getIncludeFinalValueFee

public java.lang.Boolean getIncludeFinalValueFee()
Gets the GetOrdersRequestType.includeFinalValueFee.

Returns:
Boolean

setIncludeFinalValueFee

public void setIncludeFinalValueFee(java.lang.Boolean includeFinalValueFee)
Sets the GetOrdersRequestType.includeFinalValueFee.

Parameters:
includeFinalValueFee - Boolean

getListingType

public ListingTypeCodeType getListingType()
Gets the GetOrdersRequestType.listingType.

Returns:
ListingTypeCodeType

setListingType

public void setListingType(ListingTypeCodeType listingType)
Sets the GetOrdersRequestType.listingType.

Parameters:
listingType - ListingTypeCodeType

getModTimeFrom

public java.util.Calendar getModTimeFrom()
Gets the GetOrdersRequestType.modTimeFrom.

Returns:
Calendar

setModTimeFrom

public void setModTimeFrom(java.util.Calendar modTimeFrom)
Sets the GetOrdersRequestType.modTimeFrom.

Parameters:
modTimeFrom - Calendar

getModTimeTo

public java.util.Calendar getModTimeTo()
Gets the GetOrdersRequestType.modTimeTo.

Returns:
Calendar

setModTimeTo

public void setModTimeTo(java.util.Calendar modTimeTo)
Sets the GetOrdersRequestType.modTimeTo.

Parameters:
modTimeTo - Calendar

getNumberOfDays

public java.lang.Integer getNumberOfDays()
Gets the GetOrdersRequestType.numberOfDays.

Returns:
Integer

setNumberOfDays

public void setNumberOfDays(java.lang.Integer numberOfDays)
Sets the GetOrdersRequestType.numberOfDays.

Parameters:
numberOfDays - Integer

getOrderIDArray

public OrderIDArrayType getOrderIDArray()
Gets the GetOrdersRequestType.orderIDArray.

Returns:
OrderIDArrayType

setOrderIDArray

public void setOrderIDArray(OrderIDArrayType orderIDArray)
Sets the GetOrdersRequestType.orderIDArray.

Parameters:
orderIDArray - OrderIDArrayType

getOrderRole

public TradingRoleCodeType getOrderRole()
Gets the GetOrdersRequestType.orderRole.

Returns:
TradingRoleCodeType

setOrderRole

public void setOrderRole(TradingRoleCodeType orderRole)
Sets the GetOrdersRequestType.orderRole.

Parameters:
orderRole - TradingRoleCodeType

getOrderStatus

public OrderStatusCodeType getOrderStatus()
Gets the GetOrdersRequestType.orderStatus.

Returns:
OrderStatusCodeType

setOrderStatus

public void setOrderStatus(OrderStatusCodeType orderStatus)
Sets the GetOrdersRequestType.orderStatus.

Parameters:
orderStatus - OrderStatusCodeType

getPagination

public PaginationType getPagination()
Gets the GetOrdersRequestType.pagination.

Returns:
PaginationType

setPagination

public void setPagination(PaginationType pagination)
Sets the GetOrdersRequestType.pagination.

Parameters:
pagination - PaginationType

getSortingOrder

public SortOrderCodeType getSortingOrder()
Gets the GetOrdersRequestType.sortingOrder.

Returns:
SortOrderCodeType

setSortingOrder

public void setSortingOrder(SortOrderCodeType sortingOrder)
Sets the GetOrdersRequestType.sortingOrder.

Parameters:
sortingOrder - SortOrderCodeType

getReturnedHasMoreOrders

public java.lang.Boolean getReturnedHasMoreOrders()
Valid after executing the API. Gets the returned GetOrdersResponseType.returnedHasMoreOrders.

Returns:
Boolean

getReturnedOrderArray

public OrderType[] getReturnedOrderArray()
Valid after executing the API. Gets the returned GetOrdersResponseType.returnedOrderArray.

Returns:
OrderType[]

getReturnedOrdersPerPage

public java.lang.Integer getReturnedOrdersPerPage()
Valid after executing the API. Gets the returned GetOrdersResponseType.returnedOrdersPerPage.

Returns:
Integer

getReturnedPageNumber

public java.lang.Integer getReturnedPageNumber()
Valid after executing the API. Gets the returned GetOrdersResponseType.returnedPageNumber.

Returns:
Integer

getReturnedPaginationResult

public PaginationResultType getReturnedPaginationResult()
Valid after executing the API. Gets the returned GetOrdersResponseType.returnedPaginationResult.

Returns:
PaginationResultType

getReturnedReturnedOrderCountActual

public java.lang.Integer getReturnedReturnedOrderCountActual()
Valid after executing the API. Gets the returned GetOrdersResponseType.returnedReturnedOrderCountActual.

Returns:
Integer

Changes since
the last release

The information contained in this document is proprietary and confidential. Use of this information and the eBay API requires a Non-Disclosure Agreement (NDA) between the user and eBay Inc. For information regarding a qualifying NDA, contact Developer Relations: developer-relations@ebay.com
© 2004-2009 eBay Inc. All rights reserved.