eBay Post-Order APIVersion 2

Update Return Draft

PUT /post-order/v2/return/draft/{draftId}

Use this call to update an existing return draft. All applicable data fields in the returnRequest container must be passed in, even if they are not being modified.

Input

See also Samples.

Resource URI (production)

PUT https://api.ebay.com/post-order/v2/return/draft/{draftId}

URI parameters

Parameter Type Required? Meaning
draftId string Required The unique identifier of the return draft. The draftId value is required to identify the return draft that is being updated.


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

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

{ /* SetReturnCreationSessionRequest */
"returnRequest":
    { /* ReturnRequestType */
    "carrier": token,
    "comments":
        { /* Text */
        "content": string,
        "language": string,
        "translatedFromContent": string,
        "translatedFromLanguage": string
        },
    "itemId": string,
    "reason": string,
    "requestType": token,
    "returnQuantity": integer,
    "transactionId": string,
    "type": string
    }
}

Request field descriptions



Input Container/Field Type Occurrence Meaning
returnRequest ReturnRequestType Required This container is used in the POST /post-order/v2/return/draft and PUT /post-order/v2/return/draft/{draftId} calls to provide details about the buyer's return request, including the order line item (and quantity) that is being returned, the reason for the return, and the buyer's preference to either get money back for item or to get a replacement item from the seller. If an existing return draft is being updated with the PUT /post-order/v2/return/draft/{draftId} call, all fields of the returnRequest must be included in the call, not just the fields whose values are changing.
returnRequest.carrier token Optional This value 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
returnRequest.comments Text Optional This optional container allows the buyer to provide more information to the seller about why the item is being returned.
returnRequest.comments.content string Conditional This field displays the actual textual content in the language specified in the language field. This field is always used for containers using the Text type.
returnRequest.comments
  .language
string Conditional This two-letter code indicates the language used to display the content in the content field. The language will default to the language used on the eBay site if a specific language is not specified through the Accept-Language HTTP header. This field is always used for containers using the Text type.

Applicable values are from LanguageEnum:See language.
returnRequest.comments
  .translatedFromContent
string Conditional If language translation/localization is required, this field displays the actual textual content in the language specified in the translatedFromLanguage field. If language translation was not required, this field is not applicable.
returnRequest.comments
  .translatedFromLanguage
string Conditional If language translation/localization is required, this two-letter code indicates the language used to display the content in the translatedFromContent field. If language translation was not required, this field is not applicable.

Applicable values are from LanguageEnum:See translatedFromLanguage.
returnRequest.itemId string Required The unique identifier of a listing. The itemID and transactionId fields are required to identify the order line item for which a return (or return draft) is being requested by the buyer.
returnRequest.reason string Optional This enumerated value indicates the buyer's reason for creating a return request or draft.

Applicable values are from ReturnReasonEnum:See reason.
returnRequest.requestType token Required This enumeration value indicates if the return request is an actual return request or a return draft.

Applicable values: See RequestTypeEnum
returnRequest.returnQuantity integer Optional This integer value indicates the quantity of the line item being returned. This number is generally '1', unless the buyer bought multiple quantity of the item in a multiple-quantity, fixed-price listing. This value defaults to '1' if this field is omitted when a return is created.
returnRequest.transactionId string Required The unique identifier of a transaction. The itemID and transactionId fields are required to identify the order line item for which a return (or return draft) is being requested by the buyer.
returnRequest.type string Optional This enumeration value indicates the buyer's desired outcome - money back for the order or a replacement item (in the case of a SNAD item). MONEY_BACK is the default value.

Applicable values are from ReturnTypeEnum:

CANCEL
This enumerated value is passed into the type field of the request when the buyer wants to cancel a return request (or draft).
MONEY_BACK
This enumerated value is passed into the type field of the request when the buyer is creating a return request (or draft), and wants a full refund after returning the item.
REPLACEMENT
This enumerated value is passed into the type field of the request when the buyer is creating a return request (or draft), but wants a replacement item instead of a refund.
UNKNOWN
This is the default value if the return type is unknown.

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 SetReturnCreationSessionResponse 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

{ /* SetReturnCreationSessionResponse */
"draftId": integer
}

Response field descriptions



Output Container/Field Type Occurrence Meaning
draftId integer Conditionally The unique identifier of a new return draft that was created with the POST /post-order/v2/return/draft call, or an existing draft that was updated with the PUT /post-order/v2/return/draft/{draftId} call.
null



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: Create a return

This operation updates a return draft.

Description

This buyer-facing call updates an existing return draft. When using this call, all applicable fields must be supplied in the request payload, even if the exiting values for the draft are not being modified.

Input

Identify the return draft you are updating by supplying the draft ID as a path parameter. Include and supply values for all applicable fields, not just those fields whose values are being updated from the existing draft. The itemId and transactionId values must match the order line item that is part of the existing return draft or an error will occur.

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

PUT https://api.ebay.com/post-order/v2/return/draft/500877800

{
"returnRequest":
    {
    "itemId": "140003980342",
    "transactionId": "8083470004",
    "returnQuantity": "1",
    "reason": "ORDERED_WRONG_ITEM",
    "type": "MONEY_BACK",
    "carrier": "USPS",
    "comments":
        {
        "content": "I ordered the wrong item."
        }
    }
}

Output

The call returns the draftId value.

JSON format.
{
"draftId": 500877800
}



Change History

Change Date Description
1.0
2015-06-30
  • Call (added): New call.