eBay Post-Order APIVersion 2

Get Return Shipping Label

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

This call retrieves information on an existing return shipping label for the buyer. If the return shipping label doesn't exist, the buyer may have to run the initiate_shipping_label call first.

Input

See also Samples.

Resource URI (production)

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

URI parameters

Parameter Type Required? Meaning
return_id string Required The unique identifier of the return. The returnId value is required to identify the return for which a shipping label is 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 GetShippingLabelResponse 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

{ /* GetShippingLabelResponse */
"carrier": token,
"labelContent": string,
"labelCost":
    { /* Amount */
    "convertedFromCurrency": string,
    "convertedFromValue": number,
    "currency": string,
    "value": number
    },
"labelPrintStatus": token,
"labelURL": string,
"trackingNumber": string
}

Response field descriptions



Output Container/Field Type Occurrence Meaning
carrier token Conditionally Indicates the shipping carrier that will be used to ship the return item. ShippingCarrierEnum contains some popular shipping carriers for the US, UK, Germany, Canada, and Australia, but it is not a complete list.

Applicable values: See ShippingCarrierEnum
labelContent string Conditionally This field is the base64-encoded binary representation of the return shipping label.
labelCost Amount Conditionally This dollar value indicates the cost of the shipping label. This amount may not be available if the labelPrintStatus value is 'EXPIRED', 'FAILED', OR 'UNKNOWN'.
labelCost
  .convertedFromCurrency
string Conditionally This field indicates the currency involved in a monetary transaction before a price conversion was performed. Generally, this is the currency used by the buyer. This field is only applicable if a price conversion was necessary, and a price conversion is generally necessary if the buyer and seller are using different forms of currency.

Applicable values are from CurrencyCodeEnum:See convertedFromCurrency.
Code so that your app gracefully handles any future changes to this list.
labelCost.convertedFromValue number Conditionally This value is the dollar amount of the currency involved in a monetary transaction before a price conversion was performed. This field is only applicable if a price conversion was necessary, and a price conversion is generally necessary if the buyer and seller are using different forms of currency.
labelCost.currency string Conditionally This field indicates the currency involved in a monetary transaction. Generally, this is the currency used by the listing site's country.

Applicable values are from CurrencyCodeEnum:See currency.
Code so that your app gracefully handles any future changes to this list.
labelCost.value number Conditionally The dollar value of the currency specified in the currency field. The value of currency defaults to the standard currency used by the country of the listing site.
labelPrintStatus token Conditionally Indicates the current status of the print shipping label operation.

Applicable values: See LabelPrintStatusEnum
labelURL string Conditionally This string value is the URL of the page where the shipping label can be downloaded and printed. This field is returned if it exists for the shipping label.
trackingNumber string Conditionally This value is the tracking number of the return shipment. Most carriers provide shipment tracking, so this field will generally be returned if a shipping label is available for the order line item.



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: Get a Shipping Label

Retrieve a copy of all data for a return shipping label.

Description

This operation requests the information that comprises the return shipping label that is associated with the specified return.

Input

The returnId parameter is required to identify the return associated with the deired label. 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/5000129541/get_shipping_label

Output

The response returned by this operation indicates that the carrier is the U.S. Postal Service, and that the label has been printed. It also includes the binary data comprising the shipping label (truncated for readability in this sample).

JSON format.
{
    "labelPrintStatus": "PRINTED",
    "carrier": "USPS",
    "labelContent": "iVBORw0KGgoAAAANSUhEUgAABPsAAAM5AQAAAABZ ... QA3UQA38kgD/H0YB+OwnB3b7AAAAAElFTkSuQmCC"
}




Change History

Change Date Description