eBay Post-Order APIVersion 2

Create Return Rules

POST /post-order/v2/rules

This call allows the seller to create one or more return rules. Return rules help save sellers time and possibly money by enabling the eBay system to process and manage return requests on the seller's behalf.

Input

See also Samples.

Resource URI (production)

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

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.

{ /* CreateDispositionRuleRequest */
"ruleDetail":
    { /* RuleDetailInputType */
    "actionDetail":
        { /* RuleActionInputType */
        "actionData": [
            { /* RuleActionDataDetailType */
            "id": string
            }
            /* More RuleActionDataDetailType nodes here */
          ],
        "actionDataType": string
        },
    "condition": [
        { /* RuleConditionInputType */
        "dataList": [
            { /* ListDataType */
            "id": string,
            "name": string
            }
            /* More ListDataType nodes here */
          ],
        "dataRange":
            { /* ConditionDataRangeType */
            "amount": rul-mrk:Amount
            },
        "isEbayPlus": boolean,
        "storeCategory": boolean,
        "storeId": integer
        }
        /* More RuleConditionInputType nodes here */
      ],
    "priority": integer
    }
}

Request field descriptions



Input Container/Field Type Occurrence Meaning
ruleDetail RuleDetailInputType Required Details of the return rule are input into this container.
ruleDetail.actionDetail RuleActionInputType Optional This container is used to specify the action that is being taken with the return rule.
ruleDetail.actionDetail
  .actionData
array of RuleActionDataDetailType Optional This container holds the details of the rule action.
ruleDetail.actionDetail
  .actionData.id
string Conditional A container consisting of details about the rule action data.
ruleDetail.actionDetail
  .actionDataType
string Optional This value is used to indicate whether the data type of the rule action is a return address or if its data type is unknown.

Applicable values are from RuleActionDataType:

RETURN_ADDRESS
Indicates the action taken on the return rule concerns a return address.
UNKNOWN
Indicates the action taken on the return rule is unknown.
ruleDetail.condition array of RuleConditionInputType Required This container is used to define one or more conditions of a return rule. A separate container must be used for each separate condition of a return rule.
ruleDetail.condition.dataList array of ListDataType Conditional This container consist of one or more id and name pairs. For an item list, these pairs identify the item ID and the item title. For a category list, these pairs identify the category ID and the category name. For return reasons, these pairs identify the return reason enumeration value and displayable text.
ruleDetail.condition.dataList
  .id
string Optional For an item list, this field identifies the item ID. For a category list, this field identifies the eBay category ID. For return reasons, this field identifies the return reason enumeration value.
ruleDetail.condition.dataList
  .name
string Optional For an item list, this field identifies the item title for the item identified in the id field. For a category list, this field identifies the category name for the eBay category identified in the id field. For return reasons, this field identifies the displayable text for the return reason identified in the id field.
ruleDetail.condition.dataRange ConditionDataRangeType Required This container holds two values which set the range of the order amount. If the order amount falls within this range, the corresponding condition applies to that order.
ruleDetail.condition.dataRange
  .amount
rul-mrk:Amount Conditional This container holds two values which set the range of the order amount. If the order amount falls within this range, the corresponding condition applies to that order.
ruleDetail.condition
  .isEbayPlus
boolean Optional This boolean field is included and set to true if the seller wants to apply the rule condition to listings enabled with the eBay Plus feature. eBay Plus is only available on the Germany site.
ruleDetail.condition
  .storeCategory
boolean Optional This boolean field is included and set to true if the seller wishes to apply the rule condition to eBay Store categories.
ruleDetail.condition.storeId integer Conditional The unique identifier of the seller's eBay store. This field is conditionally required if the seller will apply the rule condition to eBay Store categories (storeCategory field is included and set to true.
ruleDetail.priority integer Optional This field allows the seller to give priority to a return rule. For example, a value of 1 would be input here to make the corresponding return rule the highest priority. If no priority value is given, the return rules are prioritized according to when they were created, with the oldest return rule having the highest priority.

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

{ /* CreateDispositionRuleResponse */
"ruleId": integer
}

Response field descriptions



Output Container/Field Type Occurrence Meaning
ruleId integer Always This integer value specifies the unique identifier of the return rule. eBay automatically creates this identifier upon successful creation of the return rule.
null



Samples

Code samples not yet added for this call's documentation.



Change History

Change Date Description