eBay Post-Order APIVersion 2.7.7
 

Create Return Draft

POST /post-order/v2/return/draft

This method is used to create a return request draft. This method is very similar to the POST /post-order/v2/return method except a live return request is not actually created. The PUT /post-order/v2/return/draft/{draftId} method is used to update a return request draft, and the POST /post-order/v2/return method is used to convert the draft into an actual return request, with the added requirement of passing in the draftId value in the request payload of that method.

This method is not supported in the Sandbox environment.

Input

See also Samples.

Resource URI (production)

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

This call has no path or query parameters.


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": string,
    "comments":
        { /* Text */
        "content": string,
        "language": string,
        "translatedFromContent": string,
        "translatedFromLanguage": string
        },
    "itemId": string,
    "reason": string,
    "requestType": string,
    "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} methods 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 request draft is being updated with the PUT /post-order/v2/return/draft/{draftId} method, all fields of the returnRequest must be included in the method, not just the fields whose values are changing.
returnRequest.carrier string Optional This enumeration value indicates the shipping carrier that will be used to ship the return item.

The supported enumeration values representing shipping carriers are defined in the ShippingCarrierEnum type definition.

Applicable values: See ShippingCarrierEnum
returnRequest.comments Text Optional This container is used if the buyer wants to add a note or explanation about why the return request was created.
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.

The full list of language enumeration values are defined in the LanguageEnum type definition.

Applicable values: See LanguageEnum
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.

The full list of language enumeration values are defined in the LanguageEnum type definition.

Applicable values: See LanguageEnum
returnRequest.itemId string Required The unique identifier of the eBay listing where the item was purchased. This field is used in conjunction with the transactionId field to identify a line item within an order.
returnRequest.reason string Optional This enumerated value indicates the buyer's reason for creating a return request or draft.

The supported enumeration values representing valid return reasons are defined in the ReturnReasonEnum type definition.

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

Applicable values are from RequestTypeEnum:

CREATE
Indicates the request is for a return request draft.
REQUEST
Indicates the request is for a return request.
UNKNOWN
Indicates that it's undetermined if the request is for a return request or a return request draft.
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 for the purchase of a item. This value is created right when the buyer is committed to buying the item, whether that buyer uses a 'Buy it Now' capability, is the winning bidder of an auction, or the buyer's Best Offer is accepted by the seller. This field is used in conjunction with the itemId field to identify a line item within an order.
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:

EXCHANGE
This enumeration value is no longer valid, as exchanges are no longer available on any marketplaces.
MONEY_BACK
This enumeration value indicates that the buyer is seeking a full refund after returning the item.
REPLACEMENT
This enumeration value indicates that the buyer is seeking a replacement item after returning the item. Sellers do not always have replacement items available, but a buyer may make this request.
UNKNOWN
This enumeration value indicates that it is unknown whether the buyer is seeking a full refund or a replacement item.

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 eBay-assigned ID of a new return request draft that was created with the POST /post-order/v2/return/draft method, or an existing draft that was updated with the PUT /post-order/v2/return/draft/{draftId} method.
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 creates a return draft.

Description

This buyer-facing call creates a return draft. Return drafts are converted to return requests using the POST /post-order/v2/return call.

Input

Use the itemId and transactionId fields to specify the order line item to be returned. Specify a reason as well as the action (the returnRequest.type) to inform the seller of the details of the return.

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

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

{ 
"returnRequest":
    { 
    "itemId": "3**********4",
    "transactionId": "8********4",
    "returnQuantity": "1",
    "reason": "NO_LONGER_NEED_ITEM",
    "type": "MONEY_BACK",
    "carrier": "USPS",
    "comments":
        { 
        "content": "I accidentally purchased the same product twice"
        }
    }
}

Output

The call returns a draftId that you use to reference the return draft in other calls.

JSON format.
{
  "draftId": "5*******0"
}



Change History

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