Trading API879

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.

Note: If payment for an order went through the new payment process, German and Austrian sellers can not use CompleteSale to mark an order as 'Paid'. However, they can still use CompleteSale to perform the following actions:
  • Marking an item as 'Shipped' by including and setting the Shipped flag to 'true'. This is the most important action since sellers can expedite the new payment process by marking an item as 'Shipped' as soon as a buyer pays for the order.
  • Providing a tracking number to the buyer by using the ShipmentTrackingDetails container.
  • Providing feedback to the buyer using the FeedbackInfo container.
Note: To use this call with Half.com orders, the ListingType field must be included in the request and set to Half.
Note: For orders on the India site, CompleteSale can not be used if the buyer uses PaisaPay as the payment method.

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.



Back to top

CompleteSale Input

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 Samples.

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>
  <ListingType> ListingTypeCodeType </ListingType>
  <OrderID> string </OrderID>
  <OrderLineItemID> string </OrderLineItemID>
  <Paid> boolean </Paid>
  <Shipment> ShipmentType
    <Notes> string </Notes>
    <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>
    <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.
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: 80.
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 item listing. An ItemID can be paired up with a corresponding TransactionID and used in the CompleteSale request to identify a single line item order.

Unless an OrderLineItemID is used to identify a single line item order, or the OrderID is used to identify a single or multiple line item order, the ItemID/TransactionID pair must be specified. For a multiple line item order, OrderID must be used. If OrderID or OrderLineItemID are specified, the ItemID/TransactionID pair is ignored if present in the same request.
Max length: 19 (Note: The eBay database specifies 38. ItemIDs are usually 9 to 12 digits).
ListingType ListingTypeCodeType Conditional This field is required if CompleteSale is being used for a Half.com order. The value should be set to Half, which is the only applicable ListingType value for this call.

Applicable values:

•   Half

(in/out) Half.com listing (item is listed on Half.com, not on eBay). You must be a registered Half.com seller to use this format.


(Not all values in ListingTypeCodeType apply to this field.)
OrderID string Optional A unique identifier that identifies a single line item or multiple line item order.

For a single line item order, the OrderID value is identical to the OrderLineItemID value that is generated upon creation of the order line item. For multiple line item orders, the OrderID value is created by eBay when the buyer is purchasing multiple order line items from the same seller at the same time. For multiple line item orders not going through the eBay Cart flow, a Combined Invoice order can be created by the seller through the AddOrder call. The OrderID can be used in the CompleteSale request to identify a single or multiple line item order.

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

See Combined Invoice.

OrderLineItemID string Optional OrderLineItemID is a unique identifier for an eBay order line item and is based upon the concatenation of ItemID and TransactionID, with a hyphen in between these two IDs. For a single line item order, the OrderLineItemID value can be passed into the OrderID field in the CompleteSale request.

Unless an ItemID/TransactionID pair is used to identify a single line item order, or the OrderID is used to identify a single or multiple line item order, the OrderLineItemID must be specified. For a multiple line item order, OrderID must be used. If OrderLineItemID is specified, the ItemID/TransactionID pair are ignored if present in the same request.
Max length: 50 (Note: ItemIDs and TransactionIDs usually consist of 9 to 12 digits.).
Paid boolean Optional The seller includes and sets this field to true if the buyer has paid for the order. If the call is successful, the order line item(s) are marked as Paid in My eBay.

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

If this field is not included, the paid status of the order line item(s) remain unchanged in My eBay.
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 item as shipped and the Shipped field is not required.

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

To modify the shipping tracking number and/or carrier, supply the new number in ShipmentTrackingNumber 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 90 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.Notes string Optional This string field allows a seller to provide notes to the buyer regarding shipment of a Half.com item. Only alphanumeric characters can be used in this field. This is an optional field that is only applicable to Half.com items.
Shipment.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 GlobalShipping_MultiCarrier.
Shipment.ShipmentLineItem
  .LineItem
LineItemType Optional,
repeatable: [1..*]
Contains information about one order line item in a Global Shipping Program package. The package can contain multiple units of a given order line item, and multiple order line items.
Shipment.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.ShipmentLineItem
  .LineItem.Description
string Optional The item description of the order line item, based on its ItemID.
Shipment.ShipmentLineItem
  .LineItem.ItemID
ItemIDType (string) Optional Unique identifier for the eBay item listing of the order line item. A listing can have multiple order line items (transactions), but only one ItemID. 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.ShipmentLineItem
  .LineItem.Quantity
int Optional 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.
Shipment.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.
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 GlobalShipping_MultiCarrier.
Shipment
  .ShipmentTrackingDetails
  .ShipmentLineItem.LineItem
LineItemType Optional,
repeatable: [1..*]
Contains information about one order line item in a Global Shipping Program 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 item listing of the order line item. A listing can have multiple order line items (transactions), but only one ItemID. 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 Optional 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.
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.
Shipment
  .ShipmentTrackingDetails
  .ShipmentTrackingNumber
string Conditional Required if ShippingCarrierUsed is supplied. The tracking number assigned by the shipping carrier to the item shipment. The format of the tracking number must be consistent with the format used by the specified shipping carrier (ShippingCarrierUsed). Typically, you should avoid spaces and hyphens. Returned only if set. Returned for Half.com as well.
Shipment
  .ShipmentTrackingDetails
  .ShippingCarrierUsed
string Conditional Required if ShipmentTrackingNumber is supplied. Name of the shipping carrier used to ship the item. Although this value can be any value, since it is not checked by eBay, commonly used shipping carriers can be found by calling GeteBayDetails with DetailName set to ShippingCarrierDetails and examining the returned ShippingCarrierCodeTypes.

For those using UPS Mail Innovations, supply the value UPS-MI for UPS Mail Innnovations. Buyers will subsequently be sent to the UPS Mail Innovations website for tracking.

For those using FedEx SmartPost in a CompleteSale callsupply the value FedEx. Buyers will subsequently be sent to the appropriate web site for tracking status. (The buyer is sent to the UPS Mail Innovations website if UPS-MI is specified, or to the FedEx website if FedEx is specified.) Returned only if set. Returned for Half.com as well.

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 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 line item(s) are marked (or remain) as Not Shipped in My eBay.

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

If shipment tracking information is provided for an order line item through the Shipment container in the same request, the order line item is marked as shipped automatically and the Shipped field is not required.
TransactionID string Conditional Unique identifier for an eBay order line item (transaction). The TransactionID can be paired up with the corresponding ItemID and used in the CompleteSale request to identify a single line item order.

Unless an OrderLineItemID is used to identify a single line item order, or the OrderID is used to identify a single or multiple line item order, the ItemID/TransactionID pair must be specified. For a multiple line item order, OrderID must be used. If OrderID or OrderLineItemID are specified, the ItemID/TransactionID pair is ignored if present in the same request.
Max length: 19 (Note: The eBay database specifies 38. TransactionIDs are usually 9 to 12 digits.).
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. Specify the standard RFC 3066 language identification tag (e.g., en_US).

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

See Tags for the Identification of Languages.

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., 859). 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:
    Routing the Request (Gateway URLs)
    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) Return warnings when the application passes unrecognized or deprecated elements in a request.

•   Low

(in) Do not return warnings when the application passes unrecognized or deprecated elements in a request. This is the default value if WarningLevel is not specified.


See Warning Level.



Back to top

CompleteSale Output

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 Samples.

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) Request processing failed

•   PartialFailure

(out) Request processing completed with some failures. See the Errors data to determine which portions of the request failed.

•   Success

(out) Request processing succeeded

•   Warning

(out) Request processing completed with warning information being included in the response message


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.

See Error Handling.

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.


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 the "Errors by Number" document.
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 The value of the variable (e.g., the attribute set ID)
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 Compatible Application Check section of the eBay Features 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.


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.



Back to top

CompleteSale Detail Controls


DetailLevel

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



Back to top

CompleteSale Samples

New to making API calls? Please see Routing the Request.

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

Changes the paid status in My eBay.

Description

Magical Bookseller has sold a Harry Potter book and Bountiful Buyer quickly paid for the book. Magical Bookseller wants to change the status of the order line item to "Paid."

Input

Because of the smooth order, Magical Bookseller gives feedback indicating the fast payment by Bountiful Buyer. In addition, the CompleteSale call requires ItemID and TransactionID values. To update the Paid status, set Paid to true. Optionally, Magical Bookseller could have replaced the ItemID and TransactionID pair with the OrderLineItemID

XML format (HTTP POST). Also available are the .txt version of this XML.

<?xml version="1.0" encoding="utf-8"?>
<CompleteSaleRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <RequesterCredentials>
    <eBayAuthToken>ABC...123</eBayAuthToken>
  </RequesterCredentials>
  <WarningLevel>High</WarningLevel>
  <FeedbackInfo>
    <CommentText>Wonderful buyer, very fast payment.</CommentText>
    <CommentType>Positive</CommentType>
    <TargetUser>bountifulbuyer</TargetUser>
  </FeedbackInfo>
  <ItemID>110043671232</ItemID>
  <Paid>true</Paid>
  <Shipment>
    <Notes>Shipped USPS Media</Notes>
  </Shipment>
  <Shipped>true</Shipped>
  <TransactionID>0</TransactionID>
</CompleteSaleRequest>

Output

The call returns a simple Success.

XML format.
<CompleteSaleResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2010-02-17T18:24:03.182Z</Timestamp>
  <Ack>Success</Ack>
  <Version>655</Version>
  <Build>E655_CORE_BUNDLED_10639415_R1</Build>
</CompleteSaleResponse>



Back to top

CompleteSale Change History

Version Description
777
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.
705
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
691
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.
635
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.
627
2009-07-22
  • ShipmentType.ShippingCarrierUsed (modified): Changed type to string to allow seller to specify any shipping carrier, not just the ones in ShippingCarrierCodeType.
615
2009-04-29
  • ShipmentType.Notes (added): Using this field, a Half.com seller can include shipment-related notes to the buyer.
583
2008-09-17
  • Shipment.ShippedTime (added): The time that a seller hands off a package to the shipping carrier.
577
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.
543
2007-12-14
  • Shipment (added): A seller can now add a tracking number to a transaction via Shipment.ShipmentTrackingNumber.
491
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.



Back to top

User-Contributed Notes

 

Copyright © 2005–2014 eBay, Inc. All rights reserved. This documentation and the API may only be used in accordance with the eBay Developers Program and API License Agreement.