Return Management API
 

Making a Call



Note: The Return Management API is no longer recommended. Instead, current users of the Return Management API should make plans to migrate to, and use the Return operations of the Post-Order API. New users interested is programmatically managing return requests, should also make plans to integrate with the Post-Order API. The Return Management API was developed to be used by sellers who had opted in to "Hassle-free Returns". Hassle-free Returns have been replaced by a new Returns Platform, where sellers fully or partially automate the processing of return requests through Return Automation Rules. The Return Management API does not support all features and logic of the new Returns Platform, and this API will be deprecated in the near future.

This document explains how to make Return Management API calls. It provides an overview of the formats and parameters you can use with the Return Management API.

Introduction to the Return Management API

Return Management API is a SOA service that provides US and UK sellers a programmatic way to retrieve and manage buyer returns initiated through the eBay Return Center. High-level information for the service are covered below, including service endpoints, HTTP headers and URL parameters, naming conventions, and versioning scheme.

getActivityOptions Call

This call is used by the seller to retrieve one or more actions that can be performed based on the status of the return. For more information on the getActivityOptions call, see the Users Guide.

getReturnDetail Call

This call is used by the seller to retrieve detailed information about a specific return. For more information on the getReturnDetail call, see the Users Guide.

getReturnMetadata Call

This call is used by the seller to retrieve all applicable return reasons, the maximum number of business days a seller has to issue a refund to the buyer after the seller receives the returned item, and the maximum number of business days a seller has to provide a Return Merchandise Authorization number (if an RMA is requested) to the buyer once a return is opened. For more information on the getReturnMetadata call, see the Users Guide.

getUserReturns Call

This call is used by the seller to retrieve returns in which the eBay member is involved as a buyer or seller. For more information on the getUserReturns call, see the Users Guide.

getVersion Call

This call returns the current version of the Return Management service. This call has no input parameters.

issueRefund Call

This call is used by the seller to issue a refund to the buyer. For more information on the issueRefund call, see the Users Guide.

provideSellerInfo Call

This call is used by a seller to provide a Return Merchandise Authorization number and/or update the return shipping address. For more information on the provideSellerInfo call, see the Users Guide.

provideTrackingInfo Call

This call is used by a seller to provide shipment tracking information to the buyer regarding a replacement item. For more information on the provideTrackingInfo call, see the Users Guide.

setItemAsReceived Call

This call is used by a seller to mark a replacement item as received. For more information on the setItemAsReceived call, see the Users Guide.

Supported Request and Response Formats

The Return Management API supports XML and SOAP request and response formats.

XML

The HTTP POST call method supports the use of XML format requests.

<getUserReturns xmlns="https://www.ebay.com/marketplace/search/v1/services">
</getUserReturns>

SOAP

The HTTP POST call method also supports the use of SOAP format requests. SOAP versions 1.1 and 1.2 are both supported.

<soap:Envelope xmlns:soap="https://schemas.xmlsoap.org/soap/envelope" xmlns="https://www.ebay.com/marketplace/returns/v1/services">
   <soap:Header/>
   <soap:Body>
      <getUserReturns>
      </getUserReturns>
   </soap:Body>
</soap:Envelope>

The call response for SOAP requests is in SOAP format only.

Call Structure

Each Return Management API call consists of the following elements:

Service Endpoints

Return Management API requests may be sent to either the eBay Production API Gateway URI (endpoint) or the eBay Sandbox endpoint. You specify the endpoint in the request.

Production Endpoint:

https://svcs.ebay.com/services/returns/v1/ReturnManagementService

Sandbox Endpoint:

https://svcs.sandbox.ebay.com/services/returns/v1/ReturnManagementService

Note: The service endpoint contains the major version for the service (e.g., v1). When updating to subsequent major releases, you must update the version in the service endpoint, as well.

Standard URL Parameter or HTTP Header Values

When you make a Return Management API call, you choose whether to specify the standard values in URL parameters or in the HTTP header. URL parameters are provided as name-value pairs in the query part of the URI.

Note: If you specify both a URL parameter and an HTTP header for the same value in the same call, the URL parameter takes precedence. The values you provide in your call are case-sensitive.

The following table contains descriptions of the standard Return Management API parameters and the corresponding header values:

URL Parameter Header Value Required? Description
N/A CONTENT-TYPE Conditionally This header is required for XML requests and optional for SOAP requests. You must specify the content format exactly as shown, or your call may fail. The allowable values are:

XML text/xml
SOAP12 application/soap+xml
SOAP11 text/xml (together with SOAPAction header being sent - value can be anything)
GLOBAL-ID X-EBAY-SOA-GLOBAL-ID No The unique identifier for a combination of site, language, and territory. For example, EBAY-US (the default) is the global ID that corresponds to the eBay US site. The global ID you specify must correspond to an eBay site with a valid site ID. Refer to eBay Site ID to Global ID Mapping. In addition, Global ID Values contains a complete list of the eBay global IDs.
MESSAGE-ENCODING X-EBAY-SOA-MESSAGE-ENCODING Conditionally Specifies the message encoding (e.g., ISO-8859-1). The default encoding is UTF-8. When submitting requests in any format other than UTF-8, you must specify the message encoding.
N/A X-EBAY-SOA-MESSAGE-PROTOCOL Conditionally If you make a SOAP request, you must use this header to specify the protocol you are using. Allowable values are "SOAP11" for SOAP Version 1.1 and "SOAP12" for SOAP Version 1.2.
SERVICE-NAME X-EBAY-SOA-SERVICE-NAME No The name of the service you are using. Specify "ReturnManagementService" for all Return Management API calls.
OPERATION-NAME X-EBAY-SOA-OPERATION-NAME Yes The name of the call you are using (for example, getUserReturns or getReturnDetail).
REQUEST-DATA-FORMAT X-EBAY-SOA-REQUEST-DATA-FORMAT No The Return Management API supports XML and SOAP request formats with the HTTP POST method. Input can be in XML or SOAP formats. The default value for HTTP POST requests is XML.
For SOAP requests, you must specify the protocol version in the X-EBAY-SOA-MESSAGE-PROTOCOL header. If you use a URL for an HTTP GET request, REQUEST-DATA-FORMAT is unnecessary because the only valid value is NV (Name-Value Pair).
RESPONSE-DATA-FORMAT X-EBAY-SOA-RESPONSE-DATA-FORMAT No If you use a URL (HTTP GET) request, use this parameter to specify the output format as XML. URL requests do not support SOAP responses. If you use a URL, and you do not specify RESPONSE- DATA-FORMAT, the output format will be XML. If you use the HTTP POST method, the output data (response data) will be in the same format as the input data.
REST-PAYLOAD N/A No If you use a URL, use this parameter to separate the payload part of the URL from the standard headers. Requires no value; anything appearing after this header will be considered part of the call payload. This parameter is ignored in HTTP POST requests.
SECURITY-TOKEN X-EBAY-SOA-SECURITY-TOKEN Yes This header is used to pass in the eBay authorization token, unique to the user's application. You obtain an eBay authorization token by joining the eBay Developer Network.
SERVICE-VERSION X-EBAY-SOA-SERVICE-VERSION No The API version your application supports (e.g., 1.1.0).

URL Parameter Examples

If you are using a URL (and the HTTP GET method), input must be in the NV (Name-Value Pair) format. Use the RESPONSE-DATA-FORMAT header to specify that data is returned in one of the following formats: NV or XML. The following example (wrapped for readability) shows standard Return Management API parameters. RESPONSE-DATA-FORMAT specifies XML for XML output.

https://svcs.ebay.com/services/returns/v1/ReturnManagementService?OPERATION-NAME=getUserReturns
  &SERVICE-NAME=ReturnManagementService
  &SERVICE-VERSION=1.0.0
  &SECURITY-TOKEN=<eBayAuthToken>
  &RESPONSE-DATA-FORMAT=XML
  &REST-PAYLOAD
  &Standard input fields
  &Call-specific input fields

HTTP Header Examples

The following example shows standard Return Management API headers for an HTTP POST call using XML:

CONTENT-TYPE: text/xml
X-EBAY-SOA-SERVICE-NAME: ReturnManagementService
X-EBAY-SOA-OPERATION-NAME: getUserReturns
X-EBAY-SOA-SERVICE-VERSION: 1.0.0
X-EBAY-SOA-SECURITY-TOKEN: <eBayAuthToken>
X-EBAY-SOA-REQUEST-DATA-FORMAT: XML

The following example shows standard Return Management API headers for an HTTP POST call. In the example, the X-EBAY-SOA-REQUEST-DATA-FORMAT header specifies XML. The example also includes X-EBAY-SOA-MESSAGE-PROTOCOL: SOAP12, specifying that you are using SOAP Version 1.2. Without the X-EBAY-SOA-MESSAGE-PROTOCOL header, the service would expect XML input.

X-EBAY-SOA-SERVICE-NAME: ReturnManagementService
X-EBAY-SOA-OPERATION-NAME: getUserReturns
X-EBAY-SOA-SERVICE-VERSION: 1.0.0
X-EBAY-SOA-GLOBAL-ID: EBAY-US
X-EBAY-SOA-SECURITY-TOKEN: <eBayAuthToken>
X-EBAY-SOA-REQUEST-DATA-FORMAT: XML
X-EBAY-SOA-MESSAGE-PROTOCOL: SOAP12

Call-Specific Values

Refer to the Return Management API Reference for the input and output fields supported by the Return Management API calls.

Syntax

This section spells out the syntax requirements for the supported request and response formats. In most cases, the syntax for the various formats is standard and only the rules that aren't standard or are potentially tricky are explained.

UTF-8 Encoding for Special Characters

All parameter values should be encoded in UTF-8 format. UTF-8 is the default encoding for API requests.

Once the parameter value is UTF-8 encoded, it should be URL-encoded to take care of spaces and quotation marks (" ") and other characters in the string that are pertinent to the URL request.

When submitting requests in any format other than UTF-8, you must specify the message encoding with the MESSAGE-ENCODING URL parameter or the X-EBAY-SOA-MESSAGE-ENCODING HTTP header.

URL Encoding for String Values

Name-value requests must be constructed using the ASCII character-set only. Most ASCII characters (e.g., the numbers from 0-9 and the uppercase and lowercase English letters from A to Z) can be used as is. Some special characters, however, such as spaces, ampersands ("&") and quotation marks, must be encoded in URL requests when used in string values for fields.

Special characters that must be URL-encoded include (but are not limited to) characters used in URL request syntax, such as ampersands ("&"), the equals sign ("="), the pound sign ("#"), the "at" symbol ("@"), or the percent sign ("%").

URL-encoded characters are in the form %HH, where HH is a hexadecimal number. For example, the URL-encoded value for an ampersand is %26 and the URL-encoded value for a space is %20. The plus sign ("+") can also be used in place of spaces.

Many languages provide functions or methods to do the URL encoding for you. For example, PHP provides the rawurlencode function and Java provides URLEncoder class. For more information about URL encoding, see RFC 1738.

XML Syntax

The XML request/response format follows standard XML syntax conventions. Please see XML Syntax Rules on w3schools.com for more information.

SOAP Syntax

The SOAP request/response format follows standard SOAP syntax conventions. Please see SOAP Syntax on w3schools.com for more information.

Testing Overview

You can use the Sandbox environment (with the https://svcs.sandbox.ebay.com/services/returns/v1/ReturnManagementService endpoint) to test calls to the Return Management API.

Schema Location

You can download the latest version of the WSDL for the Return Management API with the following link:

    https://developer.ebay.com/webservices/return-management/latest/ReturnManagementService.wsdl

Alternatively, you can access a particular version of the Return Management schema using a URL with the following format (where VERSION is the version identifier of the release):

   https://developer.ebay.com/webservices/return-management/VERSION/ReturnManagementService.wsdl

The version identifier is the version number of a particular schema (a release number).

For example, you can access version 1.0.0 of the WSDL version of the schema at the following URL:

    https://developer.ebay.com/webservices/return-management/1.0.0/ReturnManagement.wsdl

Back to top