eBay Post-Order APIVersion 2

Get Return Rule Templates

GET /post-order/v2/rules/get_templates

This call is used by the seller to retrieve a list of return rule templates and associated metadata. The response payload assists the seller in create return rules through the createReturnRule.

Input

See also Samples.

Resource URI (production)

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

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

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

{ /* GetDispositionRuleTemplatesResponse */
"ruleTemplates": [
    { /* RuleTemplateDetailType */
    "actionDetail":
        { /* RuleActionDetailType */
        "actionData": [
            { /* RuleActionDataDetailType */
            "id": string
            }
            /* More RuleActionDataDetailType nodes here */
          ],
        "dataType": string,
        "isInvalid": boolean
        },
    "condition": [
        { /* RuleConditionDetailType */
        "dataList":
            { /* ConditionListDetailType */
            "all": [
                { /* ListDataType */
                "id": string,
                "name": string
                }
                /* More ListDataType nodes here */
              ],
            "isMultiple": boolean,
            "selected": [
                { /* ListDataType */
                "id": string,
                "name": string
                }
                /* More ListDataType nodes here */
              ]
            },
        "isChecked": boolean,
        "isEbayPlus": boolean,
        "isInvalid": boolean,
        "storeCategory": boolean,
        "storeId": integer
        }
        /* More RuleConditionDetailType nodes here */
      ]
    }
    /* More RuleTemplateDetailType nodes here */
  ]
}

Response field descriptions



Output Container/Field Type Occurrence Meaning
ruleTemplates array of RuleTemplateDetailType Always An array of return rule templates. These templates can be used to assist the seller in creating return rules through the createReturnRules call.
ruleTemplates.actionDetail RuleActionDetailType Always Specifies the action that is being taken with the return rule.
ruleTemplates.actionDetail
  .actionData
array of RuleActionDataDetailType Conditionally This field provides more information about the type of action taken against the return rule.
ruleTemplates.actionDetail
  .actionData.id
string Conditionally A container consisting of details about the rule action data.
ruleTemplates.actionDetail
  .dataType
string Conditionally This enumeration value indicates the type of action taken against the return rule.

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.

Code so that your app gracefully handles any future changes to this list.
ruleTemplates.actionDetail
  .isInvalid
boolean Conditionally This boolean field is returned as true if the return rule is invalid. This field is not returned if the return rule is valid.
ruleTemplates.condition array of RuleConditionDetailType Always An array of one or more return rule conditions, with detailed information on each rule condition.
ruleTemplates.condition
  .dataList
ConditionListDetailType Conditionally An array of one or more rule conditions.
ruleTemplates.condition
  .dataList.all
array of ListDataType Always The id/name pairs in this field identify all the seller's items that the rule condition will apply towards.
ruleTemplates.condition
  .dataList.all.id
string Conditionally 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.
ruleTemplates.condition
  .dataList.all.name
string Conditionally 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.
ruleTemplates.condition
  .dataList.isMultiple
boolean Always This boolean field indicates if multiple items are affected by the rule condition.
ruleTemplates.condition
  .dataList.selected
array of ListDataType Always The id/name pair in this field identifies the current item that the rule condition applies towards.
ruleTemplates.condition
  .dataList.selected.id
string Conditionally 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.
ruleTemplates.condition
  .dataList.selected.name
string Conditionally 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.
ruleTemplates.condition
  .isChecked
boolean Conditionally This boolean field is returned as true if the rule condition has been checked.
ruleTemplates.condition
  .isEbayPlus
boolean Conditionally This boolean field is returned as true if the listing is enabled with the eBay Plus feature. eBay Plus is only available on the Germany site. This field is only returned if True.
ruleTemplates.condition
  .isInvalid
boolean Conditionally This boolean field is returned as true if the rule condition is invalid. This field is not returned if the rule condition is valid.
ruleTemplates.condition
  .storeCategory
boolean Conditionally This boolean field is returned as true if the rule condition applies to an eBay Store category. This field is only returned if True.
ruleTemplates.condition
  .storeId
integer Conditionally The unique identifier of the eBay store.



Samples

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



Change History

Change Date Description