This call retrieves metadata values relating to Returns. Pass in a supported ReturnMetadataKeyEnum value as a path parameter.
Output Samples Change History |
The following lists all fields that could be included in the request.
See also Samples.
GET https://api.ebay.com/post-order/v2/return/metadata/{metadataKey}
Parameter | Type | Required? | Meaning |
---|---|---|---|
metadataKey | string | Required | One of the values defined in the ReturnMetadataKeyEnum type should be passed in at the end of the call URI to retrieve that set of metadata in the response. |
Header | Description | Applicable Values |
---|---|---|
Accept |
The media type for the response. Defaults to JSON (the only supported media type). | application/json |
Authorization |
The Authentication Token that is used to validate the caller has permission to access the eBay servers. Prefix a valid eBay token with the word "TOKEN ".For more details, see Getting Tokens. Required |
TOKEN <authorization-token-value> |
Content-Type |
The MIME type of the body of the request. Must be JSON. Required |
application/json |
X-EBAY-C-MARKETPLACE-ID |
The global ID of the eBay site on which the transaction took place. Required |
Currently, the marketplaces are limited to: EBAY-US , EBAY-UK , and EBAY-DE |
This call uses standard authorization tokens. See Making a Call for details.
This call has no request payload.
Input Samples Change History |
A successful call contains an HTTP status code of 200. See the HTTP Status Code Registry for a complete overview of HTTP status codes.
Note: The response information on this page applies to successful requests only. For information about the error fields and how to work with them, see Error Handling.
See also Samples.
Supported response formats: application/json, application/xml
For more information:
- See GetMetadataResponse for a description of the response structure
- See the following table for descriptions of each of the data elements returned
- See the Samples for an example of the response format
{ /* GetMetadataResponse */ "metadata": [ { /* ReturnMetadataType */ "dataType": string, "isArray": boolean, "siteMetadataKey": ReturnMetadataKeyEnum, "values": [ string /* More string nodes here */ ] } /* More ReturnMetadataType nodes here */ ] }
Output Container/Field | Type | Occurrence | Meaning |
---|---|---|---|
metadata | array of ReturnMetadataType | Always | Contains an array of one or more sets of Returns-related metadata. For the initial release of the Post-Order API, the only metadata that can be retrieved is a list of return reasons that the buyer can use when creating a return request. |
metadata.dataType | string | Always | This value indicates the primitive data type of the metadata being returned under the values array. |
metadata.isArray | boolean | Always | This boolean value indicates whether or not an array of metadata values is returned under the values array. |
metadata.siteMetadataKey | ReturnMetadataKeyEnum | Always |
This enumeration value indicates the type of metadata being returned under the values array.
Applicable values: |
metadata.values | array of string | Always | This container is an array of one or more metadata values associated with the metadata category specified in the siteMetadataKey field of the request. Currently, the only supported siteMetadataKey value is 'RETURN_REASONS'. The values container would contain a list of valid return reasons that can be given by the buyer. |
Input Output Change History |
New to making API calls? Please see Making an API Call.
Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current eBay data in your requests.
Request a list of the acceptable reasons for a return.
Description
Applications can use this operation to discover the set of valid reasons for a buyer to request a return, present a list of these reasons to buyers or sellers, and use this information to validate a return request.
Input
The metadataKey parameter is set to RETURN_REASONS
, its only currently available value, which means that the caller is requesting a list of valid reasons that buyers can use for a return request. This call has no request payload.
URL format. See also the non-wrapped version of this URL. POST https://api.ebay.com/post-order/v2/return/metadata/RETURN_REASONS
Output
The isArray field's value of true
indicates that the values array is populated with values. The dataType field's value of RtnReason
indicates that they are valid reasons for a buyer to request a return.
JSON format. Also available is the .txt version of this JSON. { "metadata": [ { "siteMetadataKey": "RETURN_REASONS", "dataType": "RtnReason", "isArray": true, "values": [ "ARRIVED_DAMAGED", "DEFECTIVE_ITEM", "DIFFERENT_FROM_LISTING", "FAKE_OR_COUNTERFEIT", ..., "FOUND_BETTER_PRICE", "MISSING_PARTS", "NO_LONGER_NEED_ITEM", "WRONG_SIZE" ] } ] }
Input Output Samples |
Change Date | Description |
---|---|
1.0 2015-06-30 |
|
Copyright © 2015–2016 eBay Inc. All rights reserved. This documentation and the API may only be used in accordance with the eBay Developers Program and API License Agreement.