eBay Post-Order APIVersion 2.7.7
 

Check Cancellation Eligibility

POST /post-order/v2/cancellation/check_eligibility

This method is used to check if a specified order is eligible to be cancelled.

The response contains information on cancellation eligibility at the order and order line-item levels.

Note: Currently, only an entire order can be cancelled; the cancellation of individual line items in the order is not supported.

For an order to be eligible for cancellation, all of the line items in the order must be eligible for cancellation.

This method is not supported in the Sandbox environment.

Input

See also Samples.

Resource URI (production)

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

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.

{ /* OrderEligibilityCheckInfo */
"legacyOrderId": string
}

Request field descriptions



Input Container/Field Type Occurrence Meaning
legacyOrderId string Required The unique identifier of the order being cancelled or being considered for cancellation.

Note: The unique identifier of an order changes as the order goes from unpaid to paid, so the IDs for both unpaid and paid orders are supported in this field. For orders where payment has been made, the ID for the paid order should be used.


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

{ /* OrderEligibilityResult */
"eligible": boolean,
"eligibleCancelReason": [
    string
    /* More string nodes here */
  ],
"failureReason": [
    string
    /* More string nodes here */
  ],
"itemEligibilityResult": [
    { /* ItemEligibilityResult */
    "cancelQuantity": integer,
    "eligible": boolean,
    "failureReason": [
        string
        /* More string nodes here */
      ],
    "itemId": string,
    "transactionId": string
    }
    /* More ItemEligibilityResult nodes here */
  ],
"legacyOrderId": string
}

Response field descriptions



Output Container/Field Type Occurrence Meaning
eligible boolean Always If this value is returned as true, the specified order is eligible to be cancelled. If this value is returned as false, the order is not eligible to be cancelled. One or more reasons why an order may not be eligible for cancellation will be shown in the failureReason array.
eligibleCancelReason array of string Conditionally A list of one or more reasons that a buyer or seller can give for cancelling this order. This field is returned only if the value of the eligible field is true.

Supported enumeration values representing buyer and seller order cancellation reasons can be found in the CancelReasonEnum type definition.
failureReason array of string Conditionally A list of one or more reasons why this order has been found to be ineligible for cancellation. This field is returned only if the value of the eligible field is false.

The full list of reasons why an order may not be eligible for cancellation can be found in the EligibilityFailureReasonEnum type definition.
itemEligibilityResult array of ItemEligibilityResult Always A list of all line items in the order and whether or not each line item is eligible to be cancelled. Because only full-order cancellations are supported at this time, if the orderEligibilityResult.eligible value is returned as true, the itemEligibilityResult.eligible value for all line items within the order will also be returned as true.

Note it's possible for the orderEligibilityResult.eligible value to be returned as false while one or more itemEligibilityResult.eligible values may be returned as true.
itemEligibilityResult
  .cancelQuantity
integer Conditionally The quantity of the specified order line item that is being cancelled.

This value must be equal-to or less-than the quantity ordered for the specified order line item.
itemEligibilityResult.eligible boolean Always If the value of this field is returned as true, the corresponding line item is eligible for cancellation.

The value of this field should always be true for all line items in the order if the value of the corresponding orderEligibilityResult.eligible field is also true. However, if the value of the orderEligibilityResult.eligible field is false, it is possible that some line items in the order may be eligible for cancellation, but other line items may not be eligible.
itemEligibilityResult
  .failureReason
array of string Conditionally An array of one or more reasons why a line item has been found to be ineligible for cancellation. This array is only returned if the value of the itemEligibilityResult.eligible field is false.

The full list of reasons why an order may not be eligible for cancellation can be found in the EligibilityFailureReasonEnum type definition.
itemEligibilityResult.itemId string Always The unique identifier for 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.
itemEligibilityResult
  .transactionId
string Always The unique identifier for the purchase of the 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.
legacyOrderId string Always A unique eBay-assigned ID for the order being considered for cancellation.

Note: The unique identifier of an order changes as the order goes from unpaid to paid, so the IDs for both unpaid and paid orders may be returned in this field based on payment status.

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: Check the eligibility of a cancellation

This operation is used to see if an order is eligible for a cancellation.

Description

Users may check to see if an order is eligible to be cancelled before actually attempting to create a cancellation request.

Input

The user must supply the legacyOrderId for the order being checked for cancellation eligibility. The legacyOrderId value is actually the OrderID value that is returned in the Trading API's GetOrders call.

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

POST https://api.ebay.com/post-order/v2/cancellation/check_eligibility
{
  "legacyOrderId":"1**********6-8********7"
}

Output

A value of false in the eligible field indicates that the order is not eligible for cancellation. A value of CANCELLATION_EXIST in the failureReason array indicates that the order is not eligible for cancellation due to the fact that an order cancellation request already exists for the order. This particular order, 1**********6-8********7, has only one order line item, which is identified by the itemId and transactionId pair under the itemEligibilityResult container. Eligibility status (and reason for ineligibility, if applicable) is returned for each line item in the order, since some line items in the order may be eligible to be cancelled and other line items might not be eligible to be cancelled.

JSON format.
{
  "legacyOrderId": "1**********6-8********7",
  "eligible": false,
  "failureReason": [
    "CANCELLATION_EXIST"
  ],
  "itemEligibilityResult": [
    {
      "itemId": "1**********6",
      "transactionId": "8********7",
      "eligible": false,
      "failureReason": [
        "CANCELLATION_EXIST"
      ]
    }
  ]
}



Change History

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