eBay Trading APIVersion 1349
 

CompleteSale

Use this call to do various tasks after the creation of a single line item or multiple line item order.

Usage Details

Typically, this call is used after the order has been paid by the buyer, but it can be called by the seller beforehand. Typical post-payment tasks available in this call include marking the order as paid, marking the order as shipped, providing shipment tracking details, and leaving feedback for the buyer. Use GetOrders to retrieve a list of active and completed orders.

Testing CompleteSale

To test CompleteSale in the Sandbox, you must have at least two test users: one to act in the capacity of an item seller and the other as a buyer. To fully test leaving feedback from a seller's perspective, use a multi-item listing with a minimum of two winning bidders (this requires multiple buyers).

For auction listings, a buyer must have placed a bid on the item and the listing must have ended with a purchase. Use AddItem in the Sandbox to list an item, then use a separate user to place bids on the item. The seller can end the listing early using EndItem. If you set EndingReason to SellToHighBidder, the call does not cancel existing bids and the listing ends as a successfully concluded auction. One order line item is created for each winning bidder, and the seller can leave feedback for each.

For fixed-price listings, the order line item needed for feedback is created shortly after the buyer purchases the item(s) from the listing. One order line item is created for each purchase, even if purchases are made by the same buyer.

You can verify the feedback you left using GetFeedback to retrieve the feedback data for the targeted user. The feedback retrieved should contain the same scores and comments as those that you left with CompleteSale.



Input

See also Samples.

The box below lists all fields that could be included in the call request. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

See also the Deprecated Objects link above. Fields presented in this color are deprecated, and fields presented in this color are (or soon will be) non-operational.

The XML prototype does not include requester credentials. This is a documentation limitation only (see Standard Requester Credentials for Making Calls).

<?xml version="1.0" encoding="utf-8"?>
<CompleteSaleRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Input Fields -->
  <FeedbackInfo> FeedbackInfoType
    <CommentText> string </CommentText>
    <CommentType> CommentTypeCodeType </CommentType>
    <TargetUser> UserIDType (string) </TargetUser>
  </FeedbackInfo>
  <ItemID> ItemIDType (string) </ItemID>
  <OrderID> string </OrderID>
  <OrderLineItemID> string </OrderLineItemID>
  <Paid> boolean </Paid>
  <Shipment> ShipmentType
    <ShipmentTrackingDetails> ShipmentTrackingDetailsType
      <ShipmentLineItem> ShipmentLineItemType
        <LineItem> LineItemType
          <CountryOfOrigin> string </CountryOfOrigin>
          <Description> string </Description>
          <ItemID> ItemIDType (string) </ItemID>
          <Quantity> int </Quantity>
          <TransactionID> string </TransactionID>
        </LineItem>
        <!-- ... more LineItem nodes allowed here ... -->
      </ShipmentLineItem>
      <ShipmentTrackingNumber> string </ShipmentTrackingNumber>
      <ShippingCarrierUsed> string </ShippingCarrierUsed>
    </ShipmentTrackingDetails>
    <!-- ... more ShipmentTrackingDetails nodes allowed here ... -->
    <ShippedTime> dateTime </ShippedTime>
  </Shipment>
  <Shipped> boolean </Shipped>
  <TransactionID> string </TransactionID>
  <!-- Standard Input Fields -->
  <ErrorHandling> ErrorHandlingCodeType </ErrorHandling>
  <ErrorLanguage> string </ErrorLanguage>
  <MessageID> string </MessageID>
  <Version> string </Version>
  <WarningLevel> WarningLevelCodeType </WarningLevel>
</CompleteSaleRequest>
Argument Type Occurrence Meaning
Call-specific Input Fields [Jump to standard fields]
FeedbackInfo FeedbackInfoType Optional This container is used by the seller to leave feedback for the buyer for the order line item identified in the call request. The seller must include and specify all fields of this type, including the buyer's eBay User ID, the Feedback rating (a seller can only leave a buyer a 'Positive' rating), and a comment, which helps justify the Feedback rating. The eBay User ID must match the buyer who bought the order line item, or an error will occur. An error will also occur if Feedback has already been left for the buyer (either through API or the Web flow).

To determine if Feedback has already been left for an order line item, you can call GetFeedback, passing in the OrderLineItemID value in the call request.

Note: Feedback entries are submitted at the order line item level, so either an OrderLineItemID value or an ItemID/TransactionID pair should be specified to identify the order line item (and not an OrderLineItemID value). To leave Feedback for all line items in a multiple line item order, the seller would need a separate CompleteSale request for each order line item.
FeedbackInfo.CommentText string Conditional Textual comment that explains, clarifies, or justifies the Feedback rating specified in CommentType. This field is required in CompleteSale if the FeedbackInfo container is used.

This comment will still be displayed even if submitted Feedback is withdrawn.
Max length: 500.
FeedbackInfo.CommentType CommentTypeCodeType Conditional This value indicates the Feedback rating for the user specified in the TargetUser field. This field is required in CompleteSale if the FeedbackInfo container is used.

A Positive rating increases the user's Feedback score, a Negative rating decreases the user's Feedback score, and a Neutral rating does not affect the user's Feedback score. eBay users also have the right to withdraw feedback for whatever reason.

Sellers cannot leave Neutral or Negative ratings for buyers.

Applicable values:

Positive
(in/out) This value indicates that the submitting user's experience with the other user (receiving feedback) was rated as a "Positive" experience. If an eBay user receives a Positive rating for an order line item from a Verified User, their overall Feedback score increases by a value of 1.

(Not all values in CommentTypeCodeType apply to this field.)
FeedbackInfo.TargetUser UserIDType (string) Optional This eBay User ID identifies the recipient user for whom the feedback is being left. This field is required in CompleteSale if the FeedbackInfo container is used.
ItemID ItemIDType (string) Conditional Unique identifier for an eBay listing. An ItemID value can be paired up with a corresponding TransactionID value in a CompleteSale request to identify a single order line item. Alternatively, the OrderLineItemID value for the order line item can be used.

Unless an OrderLineItemID value is used to identify a single order line item, or the OrderID value is used to identify a single or multiple line item order, the ItemID/TransactionID pair must be specified. To perform an action on an entire multiple line item order, the OrderID field must be used. If an OrderID or OrderLineItemID value is specified, an ItemID/TransactionID pair will be ignored (if present in the same request).
OrderID string Optional A unique identifier for an eBay order. This field can be used to make an 'order-level' update. If an order has multiple line items, and the CompleteSale call is being used to update the status of, or provide feedback for a single line item within the order, the OrderLineItemID field or ItemID/TransactionID pair must be used to identify this order line item instead of the OrderID field. If the order only has one line item, it the OrderID field can be used to make any updates with the CompleteSale call.

OrderID overrides an OrderLineItemID or ItemID/TransactionID pair if these fields are also specified in the same request.

Note: In June 2019, eBay introduced a new order ID format, but allowed developers/sellers to decide whether to immediately adopt the new format, or to continue working with the old format. Users who wanted to adopt the new format, could either use a Trading WSDL Version 1113 (or newer), or they could even use an older Trading WSDL but set the X-EBAY-API-COMPATIBILITY-LEVEL HTTP header value to 1113 in API calls. Beginning in June 2020, only the new order ID format will be returned in response payloads for paid orders, regardless of the WSDL version number or compatibility level.

Note that the unique identifier of a 'non-immediate payment' order will change as it goes from an unpaid order to a paid order. Due to this scenario, all calls that accept Order ID values as filters in the request payload, including the CompleteSale call, will support the identifiers for both unpaid and paid orders. The new order ID format is a non-parsable string, globally unique across all eBay marketplaces, and consistent for both single line item and multiple line item orders. Unlike in the past, instead of just being known and exposed to the seller, these unique order identifiers will also be known and used/referenced by the buyer and eBay customer support.

Sellers can check to see if an order has been paid by looking for a value of 'Complete' in the CheckoutStatus.Status field in the response of GetOrders call, or in the Status.CompleteStatus field in the response of GetItemTransactions or GetSellerTransactions call. Sellers should not fulfill orders until buyer has made payment.

Max length: 40.
OrderLineItemID string Optional A unique identifier for an eBay order line item. OrderLineItemID values are returned (at the order line item level) in Trading API's order management calls. This identifier is created once there is a commitment to buy (bidder wins the auction, buyer clicks buy button, or buyer purchases item through PlaceOffer call). An OrderLineItemID value can be used in a CompleteSale request to identify a line item within an order. Alternatively, an ItemID/TransactionID pair can also be used to identify a line item.

Unless an ItemID/TransactionID pair is used to identify an order line item, or an OrderID value is used to identify an order, the OrderLineItemID must be specified. If OrderLineItemID is specified, the ItemID/TransactionID pair are ignored if present in the same request.
Paid boolean Optional The seller includes and sets this field to true to mark an unpaid order as paid. If the call is successful, the order line item(s) are marked as 'Paid' in eBay's system.
Note: The seller is not allowed to set this field to false.
Shipment ShipmentType Optional Container consisting of shipment tracking information, shipped time, and an optional text field to provide additional details to the buyer. Setting the tracking number and shipping carrier automatically marks the order line item as shipped and the Shipped field is not necessary.

If you supply ShipmentTrackingNumber, you must also supply ShippingCarrierUsed; otherwise you will get an error.

To modify the shipping tracking number and/or shipping carrier, supply the new number in the ShipmentTrackingNumber field or supply the value for ShippingCarrierUsed, or both. The old number and carrier are deleted and the new ones are added.

To simply delete the current tracking details altogether, supply empty Shipment tags.

Note: Top-Rated sellers must have a record of uploading shipment tracking information (through site or through API) for at least 95 percent of their order line items (purchased by U.S. buyers) to keep their status as Top-Rated sellers. For more information on the requirements to becoming a Top-Rated Seller, see the Becoming a Top-Rated Seller and qualifying for Top-Rated Plus customer support page.
Shipment
  .ShipmentTrackingDetails
ShipmentTrackingDetailsType Optional,
repeatable: [0..*]
Container consisting of the tracking number and shipping carrier associated with the shipment of one item (package).

Because an order can have multiple line items and/or packages, there can be multiple ShipmentTrackingDetails containers under the Shipment container.
Shipment
  .ShipmentTrackingDetails
  .ShipmentLineItem
ShipmentLineItemType Optional Contains information about one or more order line items in a Global Shipping Program package. Required or returned if the value of ShippingCarrierUsed is PBI.
Shipment
  .ShipmentTrackingDetails
  .ShipmentLineItem.LineItem
LineItemType Optional,
repeatable: [1..*]
Contains information about one order line item in a package. The package can contain multiple units of a given order line item, and multiple order line items.
Shipment
  .ShipmentTrackingDetails
  .ShipmentLineItem.LineItem
  .CountryOfOrigin
string Optional The Country of Manufacture for the order line item; this is required for customs. This should identify the country in which more than 50% of the value of the item was created.

This value must conform to the ISO 3166 two-letter country code standard. To see the list of currently supported codes, and the English names associated with each code (e.g., KY="Cayman Islands"), call GeteBayDetails with DetailName set to CountryDetails.
Shipment
  .ShipmentTrackingDetails
  .ShipmentLineItem.LineItem
  .Description
string Optional The item description of the order line item, based on its ItemID.
Shipment
  .ShipmentTrackingDetails
  .ShipmentLineItem.LineItem
  .ItemID
ItemIDType (string) Optional Unique identifier for the eBay listing associated with the order line item. A multiple-quantity listing can have multiple order line items, but only one ItemID value. Unless an OrderLineItemID or SKU value is specified in the same node, this field is required for each ItemTransactionID node included in the request.
Shipment
  .ShipmentTrackingDetails
  .ShipmentLineItem.LineItem
  .Quantity
int Conditional The number of units of the order line item in this package; this is required for customs. The seller must ensure that this matches the quantity of the order line item enclosed in the package.

This value must be a positive integer, and it can't be greater than the quantity of this item specified in the original transaction. This field is a required field in CompleteSale if the order type is a Global Shipping Program (GSP) order.
Shipment
  .ShipmentTrackingDetails
  .ShipmentLineItem.LineItem
  .TransactionID
string Optional Unique identifier for an eBay order line item (transaction). The TransactionID should match the ItemID specified in each ItemTransactionID node included in the request. Optionally, an OrderLineItemID value can substitute for the ItemID/TransactionID pair.

The TransactionID value for auction listings is always 0 since there can be only one winning bidder/one sale for an auction listing.
Shipment
  .ShipmentTrackingDetails
  .ShipmentTrackingNumber
string Conditional The tracking number assigned by the shipping carrier to the item shipment. This field and the ShippingCarrierUsed field are mutually dependent. When you submit ShipmentTrackingNumber, you must also supply a value for ShippingCarrierUsed. When you submit ShippingCarrierUsed, you must also supply a value for ShipmentTrackingNumber.

The seller is responsible for the accuracy of the shipment tracking number, as eBay only verifies that the tracking number is consistent with the numbering scheme used by the specified shipping carrier, but cannot verify the accuracy of the tracking number. For order management calls,

For GetOrders, GetSellerTransactions, and GetItemTransactions only: This field is only returned if a valid tracking number is set. With the exception of the GetSellerTransactions (where it is only returned to the seller and not buyer), the tracking number will only be returned to the seller or buyer. If a user is using a Trading WSDL Version 1019 or above, this field will only be returned to the buyer or seller, and no longer returned at all to third parties. If using a Trading WSDL older than Version 1019, this field is returned to third parties, but the string value returned in the field will be Unavailable.

Note: The Trading API only supports alphanumeric characters for shipment tracking numbers, and any other characters are not supported, including spaces, hyphens, and all other special characters. Users should not enter spaces even if spaces are shown for the tracking number on the shipping label.
Shipment
  .ShipmentTrackingDetails
  .ShippingCarrierUsed
string Conditional The name of the shipping carrier used to ship the item. This field and the ShipmentTrackingNumber field are mutually dependent. When you submit ShippingCarrierUsed, you must also supply a value for ShipmentTrackingNumber. When you submit ShipmentTrackingNumber, you must also supply a value for ShippingCarrierUsed.

When the site ID is Austria, Poland, or UK, ShippingCarrierUsed can be any value, because it is not checked by eBay. For all other sites, only the following characters are allowed: letters (a-z, A-Z), numbers (0-9), space, and dash (-). The site ID is specified in the CompleteSale request header.

Note: Commonly used shipping carriers can be found by calling GeteBayDetails with DetailName set to ShippingCarrierDetails and examining the returned ShippingCarrierDetails.ShippingCarrier field. ShippingCarrierCodeType also has a list of valid shipping carriers, but eBay cannot guarantee that this enumerated type contains a full, updated list of shipping carriers. For the CompleteSale call:
  • This field is not case sensitive in the CompleteSale request.
  • When using UPS Mail Innovations, supply the value UPS-MI. Buyers will subsequently be sent to the UPS Mail Innovations website for tracking status.
  • When using FedEx SmartPost, supply the value FedEx. Buyers will subsequently be sent to the FedEx web site for tracking status.
For the Get calls: When using the Global Shipping Program, this field returns a value of PBI.

Applicable values: See ShippingCarrierCodeType
Shipment.ShippedTime dateTime Optional The date and time that the seller handed off the package(s) to the shipping carrier. If this field is not included in the request, the timestamp of the call execution is used as the shipped time. Note that sellers have the ability to set this value up to 3 calendar days in the future.
Shipped boolean Optional The seller includes and sets this field to true if the order or order line item has been shipped. If the call is successful, the order line item(s) are marked as Shipped in My eBay.

If the seller includes and sets this field to false, the order or order line item are marked (or remain) as 'Not Shipped' in eBay's system.

If this field is not included, the shipped status of the order or order line item remain unchanged in My eBay.

If shipment tracking information is provided for an order or order line item through the Shipment container in the same request, the Shipped status is set to true automatically, and the Shipped field is not necessary.
TransactionID string Conditional Unique identifier for a sales transaction. A TransactionID identifier is created once there is a commitment to buy (bidder wins the auction, buyer clicks buy button, or buyer purchases item through PlaceOffer call). The TransactionID can be paired up with the corresponding ItemID value in a CompleteSale request to identify a single order line item. Alternatively, the OrderLineItemID value for the order line item can be used.

Unless an OrderLineItemID value is used to identify a single order line item, or the OrderID value is used to identify a single or multiple line item order, the ItemID/TransactionID pair must be specified. To perform an action on an entire multiple line item order, the OrderID field must be used. If an OrderID or OrderLineItemID value is specified, an ItemID/TransactionID pair will be ignored (if present in the same request).

The TransactionID value for auction listings is always 0 since there can be only one winning bidder/one sale for an auction listing.
Standard Input Fields  
ErrorHandling ErrorHandlingCodeType Optional Error tolerance level for the call. This is a preference that specifies how eBay should handle requests that contain invalid data or that could partially fail. This gives you some control over whether eBay returns warnings or blocking errors and how eBay processes the invalid data.

This field is only applicable to AddItem and related calls, and only when the listing includes ProductListingDetails.
Default: FailOnError.

Applicable values:

BestEffort
(in) Drop the invalid data, continue processing the request with the valid data. If dropping the invalid data leaves the request in a state where required data is missing, reject the request.

If BestEffort is specified for CompleteSale, the Ack field in the response could return PartialFailure if one change fails but another succeeds. For example, if the seller attempts to leave feedback twice for the same order line item, the feedback changes would fail but any paid or shipped status changes would succeed.
FailOnError
(in) If any data is invalid, reject the request.

(Not all values in ErrorHandlingCodeType apply to this field.)
ErrorLanguage string Optional Use ErrorLanguage to return error strings for the call in a different language from the language commonly associated with the site that the requesting user is registered with. Below are some examples from different countries.

ID Country
en_AU Australia
de_AT Austria
nl_BE Belgium (Dutch)
fr_BE Belgium (French)
en_CA Canada
fr_CA Canada (French)
zh_CN China
fr_FR France
de_DE Germany
zh_HK Hong Kong
en_IN India
en_IE Ireland
it_IT Italy
nl_NL Netherlands
en_SG Singapore
es_ES Spain
de_CH Switzerland
en_GB United Kingdom
en_US United States
MessageID string Optional Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned.

Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable.
Version string Conditional The version number of the API code that you are programming against (e.g., 1149). The version you specify for a call has these basic effects:
  • It indicates the version of the code lists and other data that eBay should use to process your request.
  • It indicates the schema version you are using.
You need to use a version that is greater than or equal to the lowest supported version.
For the SOAP API: If you are using the SOAP API, this field is required. Specify the version of the WSDL your application is using.

For the XML API: If you are using the XML API, this field has no effect. Instead, specify the version in the X-EBAY-API-COMPATIBILITY-LEVEL HTTP header. (If you specify Version in the body of an XML API request and it is different from the value in the HTTP header, eBay returns an informational warning that the value in the HTTP header was used instead.)

See:
    HTTP headers
    eBay Schema Versioning Strategy
    Lowest Supported Version

WarningLevel WarningLevelCodeType Optional Controls whether or not to return warnings when the application passes unrecognized or deprecated elements in a request.

An unrecognized element is one that is not defined in any supported version of the schema. Schema element names are case-sensitive, so using WarningLevel can also help you remove any potential hidden bugs within your application due to incorrect case or spelling in field names before you put your application into the Production environment.

WarningLevel only validates elements; it doesn't validate XML attributes. It also doesn't control warnings related to user-entered strings or numbers, or warnings for logical errors.

We recommend that you only use this during development and debugging. Do not use this in requests performed in the Production environment.

Applicable values:

High
(in) The WarningLevel value is set to High if the user wishes to receive warnings when the application passes unrecognized or deprecated elements in an API call request. Setting the WarningLevel value to High is not recommended in a production environment. Instead, it should only be used during the development/debugging stage.
Low
(in) The WarningLevel value is set to Low if the user does not wish to receive warnings when the application passes unrecognized or deprecated elements in an API call request. This is the default value if WarningLevel is not specified in the call request.

See Warning Level.



Output

See also Samples.

The box below lists all fields that might be returned in the response. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

See also the Deprecated Objects link above. Fields presented in this color are deprecated, and fields presented in this color are not returned (or soon will not be returned) or are not operational (or soon will be non-operational).

<?xml version="1.0" encoding="utf-8"?>
<CompleteSaleResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- (No call-specific Output fields) -->

  <!-- Standard Output Fields -->
  <Ack> AckCodeType </Ack>
  <Build> string </Build>
  <CorrelationID> string </CorrelationID>
  <Errors> ErrorType
    <ErrorClassification> ErrorClassificationCodeType </ErrorClassification>
    <ErrorCode> token </ErrorCode>
    <ErrorParameters ParamID="string"> ErrorParameterType
      <Value> string </Value>
    </ErrorParameters>
    <!-- ... more ErrorParameters nodes allowed here ... -->
    <LongMessage> string </LongMessage>
    <SeverityCode> SeverityCodeType </SeverityCode>
    <ShortMessage> string </ShortMessage>
  </Errors>
  <!-- ... more Errors nodes allowed here ... -->
  <HardExpirationWarning> string </HardExpirationWarning>
  <Timestamp> dateTime </Timestamp>
  <Version> string </Version>
</CompleteSaleResponse>
Return Value Type Occurrence Meaning
(No call-specific fields)
Standard Output Fields  
Ack AckCodeType Always A token representing the application-level acknowledgement code that indicates the response status (e.g., success). The AckCodeType list specifies the possible values for the Ack field.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
Failure
(out) This value indicates that the call request processing failed.
PartialFailure
(out) This value indicates that the call request partially failed. One or more issues that may be responsible for this partial failure can be checked in the Errors container, that will also be returned when one or more known issues occur with the call request.
Success
(out) This value indicates that the call request was processed successfully without any issues.
Warning
(out) This value indicates that the call request was successful, but processing was not without any issues. These issues can be checked in the Errors container, that will also be returned when one or more known issues occur with the call request.

Code so that your app gracefully handles any future changes to this list.
Build string Always This refers to the specific software build that eBay used when processing the request and generating the response. This includes the version number plus additional information. eBay Developer Support may request the build information when helping you resolve technical issues.
CorrelationID string Conditionally Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned.

Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable.
Errors ErrorType Conditionally,
repeatable: [0..*]
A list of application-level errors (if any) that occurred when eBay processed the request.
Errors.ErrorClassification ErrorClassificationCodeType Conditionally API errors are divided between two classes: system errors and request errors.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
RequestError
(out) An error has occurred either as a result of a problem in the sending application or because the application's end-user has attempted to submit invalid data (or missing data). In these cases, do not retry the request. The problem must be corrected before the request can be made again. If the problem is due to something in the application (such as a missing required field), the application must be changed. If the problem is a result of end-user data, the application must alert the end-user to the problem and provide the means for the end-user to correct the data. Once the problem in the application or data is resolved, resend the request to eBay with the corrected data.
SystemError
(out) Indicates that an error has occurred on the eBay system side, such as a database or server down. An application can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.

Code so that your app gracefully handles any future changes to this list.
Errors.ErrorCode token Conditionally A unique code that identifies the particular error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.

See Errors By Number.

Errors.ErrorParameters ErrorParameterType Conditionally,
repeatable: [0..*]
This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned.
Errors.ErrorParameters
  [ attribute ParamID ]
string Conditionally This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned.
Errors.ErrorParameters.Value string Conditionally This is the value of the request parameter noted in the ParamID attribute. So, if the ParamID value was ItemID, the value in this field would be the actual value of that ItemID.
Errors.LongMessage string Conditionally A more detailed description of the condition that raised the error.
Errors.SeverityCode SeverityCodeType Conditionally Indicates whether the error is a severe error (causing the request to fail) or an informational error (a warning) that should be communicated to the user.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
Error
(out) The request that triggered the error was not processed successfully. When a serious application-level error occurs, the error is returned instead of the business data.

If the source of the problem is within the application (such as a missing required element), change the application before you retry the request.
  • If the problem is due to end-user input data, please alert the end-user to the problem and provide the means for them to correct the data. Once the problem in the application or data is resolved, you can attempt to re-send the request to eBay.
  • If the source of the problem is on eBay's side, An application can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.


See the Error handling section of the Making a Trading API call guide for more information.
Warning
(out) The request was processed successfully, but something occurred that may affect your application or the user. For example, eBay may have changed a value the user sent in. In this case, eBay returns a normal, successful response and also returns the warning.

When a warning occurs, the error is returned in addition to the business data. In this case, you do not need to retry the request (as the original request was successful). However, depending on the cause or nature of the warning, you might need to contact either the end user or eBay to effect a long term solution to the problem to prevent it from reoccurring in the future.

Code so that your app gracefully handles any future changes to this list.
Errors.ShortMessage string Conditionally A brief description of the condition that raised the error.
HardExpirationWarning string Conditionally Expiration date of the user's authentication token. Only returned within the 7-day period prior to a token's expiration. To ensure that user authentication tokens are secure and to help avoid a user's token being compromised, tokens have a limited life span. A token is only valid for a period of time (set by eBay). After this amount of time has passed, the token expires and must be replaced with a new token.
Timestamp dateTime Always This value represents the date and time when eBay processed the request. The time zone of this value is GMT and the format is the ISO 8601 date and time format (YYYY-MM-DDTHH:MM:SS.SSSZ). See the Time Values section in the eBay Features Guide for information about this time format and converting to and from the GMT time zone.

Note: GetCategories and other Trading API calls are designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, this time value reflects the time the cached response was created. Thus, this value is not necessarily when the request was processed. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, this time value does reflect when the request was processed.
Version string Always The version of the response payload schema. Indicates the version of the schema that eBay used to process the request. See the Standard Data for All Calls section in the eBay Features Guide for information on using the response version when troubleshooting CustomCode values that appear in the response.



Detail Controls


DetailLevel

This call does not support varying Detail Levels. You do not need to pass DetailLevel in the request.



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: Basic Call

Leaves feedback for a buyer.

Description

Seller m***************r has sold a Harry Potter book and b***********r quickly paid for the book. Seller m***************r wants to provide positive feedback to b***********r.

Input

Because of the smooth order, m***************r gives feedback for b***********r. In addition, the CompleteSale call requires ItemID and TransactionID values. Optionally, M*****l B********r could have replaced the ItemID and TransactionID pair with the OrderLineItemID

XML format.

<?xml version="1.0" encoding="utf-8"?>
<CompleteSaleRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <RequesterCredentials>
    <eBayAuthToken>A*******3</eBayAuthToken>
  </RequesterCredentials>
  <WarningLevel>High</WarningLevel>
  <FeedbackInfo>
    <CommentText>Wonderful buyer!</CommentText>
    <CommentType>Positive</CommentType>
    <TargetUser>b***********r</TargetUser>
  </FeedbackInfo>
  <ItemID>1**********0</ItemID>
  <TransactionID>0</TransactionID>
</CompleteSaleRequest>

Output

The call returns a simple Success.

XML format.
<CompleteSaleResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2018-10-29T20:19:15.502Z</Timestamp>
  <Ack>Success</Ack>
  <Version>1083</Version>
  <Build>E1083_CORE_APIXO_18856776_R1</Build>
</CompleteSaleResponse>



Change History

Change Date Description
1145
2020-03-13
  • OrderID (doc change): Updated OrderID field description to state that beginning in April 2020, users will no longer be able to control whether returned order ID values for paid orders are in the old or new format, regardless of the WSDL version number and/or compatibility level. Previously, when the new order ID format was introduced in June 2019, the user could control whether they wanted to see the new or old order ID format in response payloads. In the case of the CompleteSale call, the seller should use the new order ID format in the OrderID field if the order has been paid for (checkout is complete).
1113
2019-06-21
  • OrderID (modified): The new format of order identifier values was rolled out. Both the new and old order ID format will be accepted in request payloads to identify an eBay order. The format (old or new) that is returned in response payloads is dependent on the WSDL version and/or compatibility level. See the 1113 Release Notes for more details.
1107
2019-05-10
  • OrderID (modified): Starting in June 2019, eBay will start changing the format of order identifier values. The new format will be a non-parsable string, globally unique across all eBay marketplaces, and consistent for both single line item and multiple line item orders. To enable and use the new format, the user will need to use the 1107 WSDL (or newer as versions roll out) and set the compatibility level to 1113. There will be a nine-month transition period where the old format will still be supported.
1027
2017-08-04
  • CompleteSaleRequestType.ListingType (doc change): The ListingType field marked as no longer applicable since this field was only used to perform an action on Half.com orders, and API support for Half.com listings is being deprecated.
  • ShipmentType.Notes (deprecated): The Notes field is being deprecated since this field is only applicable for Half.com orders, and API support for Half.com orders is being deprecated.
0959
2016-03-11
  • ShipmentLineItem (doc change): Previously, the documentation for this call erroneously implied that both Shipment.ShipmentLineItem and Shipment.ShipmentTrackingDetails.ShipmentLineItem could be included in the request. In fact, the ShipmentLineItem container was and is only part of ShipmentTrackingDetails, and the documentation now displays only Shipment.ShipmentTrackingDetails.ShipmentLineItem in the request prototype.
0925
2015-05-29
  • ShipmentTrackingDetails.ShippingCarrierUsed, ShipmentTrackingDetails.ShipmentTrackingNumber (doc change): The documentation was updated to clarify that these two fields are mutually dependent. When you submit ShippingCarrierUsed, you must also supply a value for ShipmentTrackingNumber. When you submit ShipmentTrackingNumber, you must also supply a value for ShippingCarrierUsed.
0911
2015-02-20
  • ShipmentTrackingDetails.ShippingCarrierUsed (doc change): In previous Trading API documentation, the shipping carrier name required when you provide tracking for the international leg of a Global Shipping Program shipment, GlobalShipping_MultiCarrier, was wrong. Instead, the correct value of the ShippingCarrierUsed field for Global Shipping is PBI.
0777
2012-06-06
  • ShipmentLineItem (added): ShipmentLineItem is optional in Shipment or Shipment.ShipmentTrackingDetails, and contains information about one or more order line items in a Global Exchange package. Include ShipmentLineItem in Shipment.ShipmentTrackingDetails if you're providing tracking information for the domestic leg of the shipment.
  • ShipmentLineItem.LineItem (added): Contains information about one order line item in a Global Exchange package, including the Country of Manufacture and the number of units of the order line item in the package, both of which are required for customs. The package can contain multiple order line items.
0705
2011-01-19
  • OrderLineItemID (modified): The OrderLineItemID value can now be used in Production to identify a single line item order (instead of ItemID/TransactionID pair). The OrderLineItemID value can also be passed into the OrderID field (for single line item orders only).
  • Shipment (doc change): Added information on how to update or delete the shipment tracking details
0691
2010-10-14
  • OrderLineItemID (added): A unique identifier for an eBay transaction, which is based upon the concatenation of ItemID and TransactionID with a hyphen in between these two IDs. If you set your request version to 705, OrderLineItemID can be used instead of ItemID and TransactionID in the request.
0635
2009-09-16
  • Shipment (modified): The ShippingCarrierUsed and ShipmentTrackingNumber elements have been grouped into the new ShipmentTrackingDetails container, which is returned as a node within the Shipment container. ShipmentTrackingDetails is a repeatable container, allowing you to list details for multiple packages shipped for a single item purchased by a buyer. With this refinement, ShippingCarrierUsed and ShipmentTrackingNumber are no longer returned as individual child elements of Shipment.

    If ShippingCarrierUsed and ShipmentTrackingNumber are passed in the request as individual child elements of Shipment (e.g., Shipment.ShipmentTrackingNumber), they are ignored.
0627
2009-07-22
  • ShipmentType.ShippingCarrierUsed (modified): Changed type to string to allow seller to specify any shipping carrier, not just the ones in ShippingCarrierCodeType.
0615
2009-04-29
  • ShipmentType.Notes (added): Using this field, a Half.com seller can include shipment-related notes to the buyer.
0583
2008-09-17
  • Shipment.ShippedTime (added): The time that a seller hands off a package to the shipping carrier.
0577
2008-08-06
  • OrderID (added): You can now use the CompleteSale call to designate that a multiple-item order is complete. The CompleteSale status applies to the order as well as to all of the child transactions of that order.
0543
2007-12-14
  • Shipment (added): A seller can now add a tracking number to a transaction via Shipment.ShipmentTrackingNumber.
0491
2006-12-13
  • ListingType (added): Indicates whether the given ItemID and TransactionID values are for eBay or Half.com. Use ListingType = Half to indicate Half.com. This new tag gives Half.com sellers the ability to mark items Paid or Shipped, and to leave feedback.