eBay Post-Order APIVersion 2

Get Return Files

GET /post-order/v2/return/{returnId}/files

Use this call to retrieve information about the files associated with a return request.

Input

See also Samples.

Resource URI (production)

GET https://api.ebay.com/post-order/v2/return/{returnId}/files

URI parameters

Parameter Type Required? Meaning
returnId string Required The unique identifier of the return. The returnId value is required to identify the return for which files are being retrieved.


HTTP request headers

All requests made to eBay REST operations require you to provide the authorization HTTP header for authentication.
See HTTP request headers for details.



Authorization

This call uses standard authorization tokens. See Making a Call for details.

Payload model

This call has no request payload.


Output

See also Samples.

Payload model

Note: For information about the error fields and how to work with them, see Error Handling.

The following lists all fields that could be included in the response.

Supported response formats: application/json, application/xml

For more information:
- See GetFileResponse 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

{ /* GetFileResponse */
"files": [
    { /* ReturnFileType */
    "creationDate":
        { /* DateTime */
        "formattedValue": string,
        "value": datetime
        },
    "fileData": string,
    "fileFormat": token,
    "fileId": string,
    "filePurpose": token,
    "fileStatus": token,
    "resizedFileData": string,
    "submitter": token
    }
    /* More ReturnFileType nodes here */
  ]
}

Response field descriptions



Output Container/Field Type Occurrence Meaning
files array of ReturnFileType Conditionally This container holds an array of one or more files associated with the return request or return draft specified in the request. If there are no files associated with the specified return request or return draft, this container will not be returned.
files.creationDate DateTime Conditionally This timestamp indicates when the file was attached to the return request or draft.
files.creationDate
  .formattedValue
string Conditionally This field is for internal or future use.
files.creationDate.value datetime Conditionally This field is a timestamp for when an event or action occurred or is going to occur in the near future. It is intended for consumption by a caller's code for further computation, transformation, or comparison, and not for the end user. It uses the ISO 8601 date and time format with the 24-hour clock and Universal Coordinated Time (UTC). Following is the format template, and an example of a timestamp in this format:

Format: YYYY-MM-DDTHH:MM:SS.SSSZ

Example: 2004-08-04T19:09:02.768Z

This field is always used for containers using the DateTime type.
files.fileData string Conditionally This field is the base64-encoded binary representation of the file associated with the return request. This field is always returned for each file that is attached to a return request or draft.
files.fileFormat token Conditionally Indicates the file type (like .GIF or .JPG). This field is always returned for each file that is attached to a return request or draft.

Applicable values: See FileFormatEnum
files.fileId string Conditionally This is the unique identifier of a file that is associated with the return request. This field is always returned for each file that is attached to a return request or draft.
files.filePurpose token Conditionally Indicates whether the file's purpose is to provide more information about the condition of the item, or about shipment tracking or the shipping label. This field is always returned for each file that is attached to a return request or draft.

Applicable values: See FilePurposeEnum
files.fileStatus token Conditionally Indicates the current status of the file. This field is always returned for each file that is attached to a return request or draft.

Applicable values: See FileStatusEnum
files.resizedFileData string Conditionally This field is the base64-encoded binary representation of the file associated with the return request. This field is always returned for each file that is attached to a return request or draft. This field is only returned if the file has been resized.
files.submitter token Conditionally Indicates which party (like buyer or seller) submitted the file. This field is always returned for each file that is attached to a return request or draft.

Applicable values: See ReturnUserRoleEnum



Samples

New to making API calls? Please see Making a 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.

Sample: Retrieve Files

Retrieve the files that were uploaded to support a return.

Description

This operation requests the data and supporting information for all files that are associated with the specified return.

Input

The returnId parameter is required to identify the return for which files are being retrieved. This call has no request payload.

URL format. See also the non-wrapped version of this URL.

GET https://api.sandbox.ebay.com/post-order/v2/return/5000126221/files

Output

The response contains the identifier and the data for one JPEG file that was uploaded by the buyer to illustrate the condition of the item for which the return request was submitted. The file data is truncated for readability in this sample.

JSON format.
{
  files : [ 
  {
    fileId : "5000013632",
    fileData : "/9j/4AAQSkZJRgABAgEAYABgAAD/7gAOQ ... GBtPT2oqjDGhU5X+I0Vi+a+jOpRP/2Q==",
    filePurpose : "ITEM_RELATED",
    fileStatus : "CREATED",
    submitter : "BUYER",
    fileFormat : "JPEG",
    creationDate : 
    {
      value : "2015/08/13 15:49:28.000.-0700"
    }
  } 
  ]
}



Change History

Change Date Description