eBay Trading APIVersion 1085

AddOrder

Sellers can use this call to combine two or more (maximum of 40) order line items from the same buyer into one Combined Invoice order. This enables a buyer to pay for all order line items with a single payment (and, if so arranged and possible, ship all of the items together, possibly at a discount).

An order line item is created when there is a commitment from the buyer to purchase an item. On a successful call to AddOrder, multiple order line items are combined into a single order. The resulting order has a unique identifier (returned in the OrderID field) and the buyer may then make a single payment to purchase all order line items included in the order.

Usage Details

To use AddOrder, there must be at least two qualifying order line items between the same buyer and seller.

Supply information about the order in general, such as checkout details, payment terms, shipping costs, and the total price for the order. Specify two or more (maximum of 40) order line items that will make up the new order, where, for each order line item, you provide the (Transaction.Item.ItemID) and (Transaction.Item.TransactionID).

Working with the Response

A successful call to AddOrder returns the unique identifier (OrderID) for the newly created order, and the date and time the order was created (CreatedTime). To retrieve the multiple line item order data, input the new OrderID value into a GetOrders call.

The order that you create must specify a minimum amount of information:

Testing AddOrder

You can test this call in the Sandbox. In order to test AddOrder, create at least two order line items (e.g. list two Buy It Now items and purchase them via the same buyer). Call AddOrder with the TransactionArray containing the ItemID/TransactionID pairs. Call GetOrders with the resulting OrderID.

Related Information

See:
    Reviewing and Modifying an Order Line Item
    Combined Invoice



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"?>
<AddOrderRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Input Fields -->
  <Order> OrderType
    <CreatingUserRole> TradingRoleCodeType </CreatingUserRole>
    <PaymentMethods> BuyerPaymentMethodCodeType </PaymentMethods>
    <!-- ... more PaymentMethods values allowed here ... -->
    <SellerEmail> string </SellerEmail>
    <ShippingDetails> ShippingDetailsType
      <CODCost> AmountType (double) </CODCost>
      <InternationalShippingServiceOption> InternationalShippingServiceOptionsType
        <ShippingInsuranceCost> AmountType (double) </ShippingInsuranceCost>
        <ShippingService> token </ShippingService>
        <ShippingServiceAdditionalCost> AmountType (double) </ShippingServiceAdditionalCost>
        <ShippingServiceCost> AmountType (double) </ShippingServiceCost>
        <ShippingServicePriority> int </ShippingServicePriority>
        <ShipToLocation> string </ShipToLocation>
        <!-- ... more ShipToLocation values allowed here ... -->
      </InternationalShippingServiceOption>
      <!-- ... more InternationalShippingServiceOption nodes allowed here ... -->
      <SalesTax> SalesTaxType
        <SalesTaxPercent> float </SalesTaxPercent>
        <SalesTaxState> string </SalesTaxState>
        <ShippingIncludedInTax> boolean </ShippingIncludedInTax>
      </SalesTax>
      <ShippingServiceOptions> ShippingServiceOptionsType
        <ShippingInsuranceCost> AmountType (double) </ShippingInsuranceCost>
        <ShippingService> token </ShippingService>
        <ShippingServiceAdditionalCost> AmountType (double) </ShippingServiceAdditionalCost>
        <ShippingServiceCost> AmountType (double) </ShippingServiceCost>
        <ShippingServicePriority> int </ShippingServicePriority>
        <ShippingSurcharge> AmountType (double) </ShippingSurcharge>
      </ShippingServiceOptions>
      <!-- ... more ShippingServiceOptions nodes allowed here ... -->
    </ShippingDetails>
    <Total currencyID="CurrencyCodeType"> AmountType (double) </Total>
    <TransactionArray> TransactionArrayType
      <Transaction> TransactionType
        <Item> ItemType
          <ItemID> ItemIDType (string) </ItemID>
        </Item>
        <TransactionID> string </TransactionID>
      </Transaction>
      <!-- ... more Transaction nodes allowed here ... -->
    </TransactionArray>
  </Order>
  <!-- Standard Input Fields -->
  <ErrorLanguage> string </ErrorLanguage>
  <InvocationID> UUIDType (string) </InvocationID>
  <MessageID> string </MessageID>
  <Version> string </Version>
  <WarningLevel> WarningLevelCodeType </WarningLevel>
</AddOrderRequest>
Argument Type Occurrence Meaning
Call-specific Input Fields [Jump to standard fields]
Order OrderType Required The root container of the AddOrder request. In this call, the seller identifies two or more unpaid order line items from the same buyer through the TransactionArray container, specifies one or more accepted payment methods through the PaymentMethods field(s), and specifies available shipping services and other shipping details through the ShippingDetails container.
Order.CreatingUserRole TradingRoleCodeType Required This value indicates whether a Combined Invoice order was created by the buyer or by the seller. This field is only returned for Combined Invoice orders.

Applicable values:

Buyer
(in/out) The eBay user is acting as the buyer for the order(s). In GetOrders, this value should be passed into the OrderRole field in the request to retrieve orders in which the calling eBay user is the buyer in the order.
CustomCode
(in/out) This value is reserved for future or internal use.
Seller
(in/out) The eBay user is acting as the seller for the order(s). In GetOrders, this value should be passed into the OrderRole field in the request to retrieve orders in which the calling eBay user is the seller in the order.

See Combined Invoice.

Order.PaymentMethods BuyerPaymentMethodCodeType Conditional,
repeatable: [0..*]
Each payment method available to the buyer for the order's purchase is identified with a PaymentMethods field. At least one payment method must be specified, unless the seller is opted in to the new eBay Managed Payments program.

Note: The new eBay Managed Payments program is currently only available to a limited number of sellers on the US site. For sellers in the eBay Managed Payments program, a payment method does not need to be specified at listing/checkout time. Any payment method that is specified at listing time (or defined in a payment business policy) will be ignored and dropped from the listing, and the seller will get a warning message in the response.


Applicable values: See PaymentMethods.
Order.SellerEmail string Optional The email address of the seller involved in the order. The email address of the seller is only returned if it is the same seller making the call.
Order.ShippingDetails ShippingDetailsType Optional Container consisting of all shipping-related details for an order, including domestic and international shipping service options, shipment tracking information, and shipping insurance information.
Order.ShippingDetails.CODCost AmountType (double) Conditional This dollar value indicates the money due from the buyer upon delivery of the item.

This field should only be specified in the request if 'COD' (cash-on-delivery) is a valid payment method for the site and it is included as a PaymentMethods value in the same request.

This field is only returned if set for the listing.

To see if 'COD' is a supported payment method for a site, call GetCategoryFeatures, specifying the listing category ID, and including the FeatureID field set to PaymentMethods. Look for a value of 'CashOnPickup' in one of the Category.PaymentMethod fields in the response.

See Other Shipping Features.

Order.ShippingDetails
  .InternationalShippingServiceOption
InternationalShippingServiceOptionsType Optional,
repeatable: [0..*]
Shipping costs and options related to an international shipping service. If used, at least one domestic shipping service must also be provided in ShippingServiceOptions.

If you specify multiple InternationalShippingServiceOption nodes, the repeating nodes must be contiguous. That is, you cannot insert other nodes between InternationalShippingServiceOption nodes.

All specified domestic and international shipping services must be the same shipping type (for example, Flat versus Calculated).

A seller can offer up to four domestic shipping services and up to five international shipping services. However, if the seller is opted in to the Global Shipping Program, only four other international shipping services may be offered (regardless of whether or not Global Shipping is offered for the listing).

If you specify ShippingDetails when you revise or relist an item but you omit InternationalShippingServiceOption, eBay will drop the international shipping services (except the Global Shipping Program) from the listing. This may also have unintended side effects, as other fields that depend on this data may be dropped as well. To retain the shipping services and dependent fields when you modify other shipping details, it may be simplest to specify all ShippingDetails that you still want to include in the listing.

For GetItemShipping, results are filtered: if any service is not available in the buyer's region, it is removed. If no services remain after this filtering, a warning is returned.

See Overview of the API Schema for rules regarding repeating instances of a nodes (nodes for which maxOccurs is "unbounded" or is greater than 1).

Order.ShippingDetails
  .InternationalShippingServiceOption
  .ShippingInsuranceCost
AmountType (double) Optional The insurance cost associated with shipping a single item with this shipping service. Exception: for GetItemShipping, this is proportional to QuantitySold. If the item has not yet been sold, insurance information cannot be calculated and the value is 0.00. For calculated shipping only.

Valid only on the following sites: AU, FR, and IT

See Shipping.

Order.ShippingDetails
  .InternationalShippingServiceOption
  .ShippingService
token Conditional An international shipping service being offered by the seller to ship an item to a buyer. For a list of valid values, call GeteBayDetails with DetailName set to ShippingServiceDetails.

To view the full list of International shipping service options in the response, look for the ShippingService fields in the ShippingServiceDetails containers that contain a InternationalService = true field, as this indicates that the ShippingService value is an International shipping service option.

The ShippingServiceDetails.ValidForSellingFlow flag must also be present. Otherwise, that particular shipping service option is no longer valid and cannot be offered to buyers through a listing.

For flat and calculated shipping.

See GeteBayDetails.



Applicable values: See ShippingServiceCodeType
Order.ShippingDetails
  .InternationalShippingServiceOption
  .ShippingServiceAdditionalCost
AmountType (double) Conditional The cost of shipping each additional item if the same buyer purchases multiple quantity of the same line item. This field is required when creating a multiple-quantity, fixed-price listing. Generally, the seller will give the buyer a shipping discount if that buyer purchases multiple quantity of the item, so this value should usually be less than the value set for ShippingServiceCost.

The value of this field can even be set to 0 if the seller wants to encourage buyers to buy multiple quantity of the item, or it could be that the seller can fit multiple quantities of the line item in a single shipping package, so the seller is just passing this shipping savings onto the buyer. This field is not applicable for single-quantity listings.
Order.ShippingDetails
  .InternationalShippingServiceOption
  .ShippingServiceCost
AmountType (double) Conditional The base cost of shipping the item using the shipping service specified in the ShippingService field. In the case of a multiple-quantity, fixed-price listing, the ShippingServiceAdditionalCost field shows the cost to ship each additional item if the buyer purchases multiple quantity of the same line item.

When returned by GetItemShipping, it includes the packaging and handling cost. For flat and calculated shipping.

If a shipping service has been specified (even LocalPickup), GetItem returns the shipping service cost, even if the cost is zero. Otherwise, cost is not returned.

If this is for calculated shipping for a listing that has not yet ended, note that the cost cannot be determined until the listing has ended and the buyer has specified a postal code.

For GetItemShipping, promotional shipping savings is reflected in the cost, if applicable. If the promotional shipping option is lower than other shipping services being offered, the savings is reflected in the returned shipping cost. The shipping service named Promotional Shipping Service (or whatever is the localized name for it) is included among the shipping services. If the promotional shipping cost is lower than the cost of other shipping services being offered, it is presented first in the list. (The LOWEST shipping service cost is always presented first, regardless of whether there is promotional shipping.)

See Shipping.

Order.ShippingDetails
  .InternationalShippingServiceOption
  .ShippingServicePriority
int Conditional This integer value controls the order (relative to other shipping services) in which the corresponding ShippingService will appear in the View Item and Checkout page. Sellers can specify up to five international shipping services (with five InternationalShippingServiceOption containers), so valid values are 1, 2, 3, 4, and 5. A shipping service with a ShippingServicePriority value of 1 appears at the top. Conversely, a shipping service with a ShippingServicePriority value of 5 appears at the bottom of a list of five shipping service options. If the Global Shipping Program is enabled on the listing for international shipping, only four additional shipping services may be specified.

This field is applicable to Flat and Calculated shipping.
Order.ShippingDetails
  .InternationalShippingServiceOption
  .ShipToLocation
string Conditional,
repeatable: [0..*]
An international location or region to where the item seller will ship the item.

Use GeteBayDetails with DetailName set to ShippingLocationDetails to determine which locations are valid per site. In the GeteBayDetails response, look for the ShippingLocationDetails.ShippingLocation fields.

For the AddItem family of calls, this field is required if any international shipping service is specified.

For GetOrders, GetOrderTransactions, and GetItemTransactions only: If using Trading WSDL Version 1019 or above, ShipToLocation fields 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, ShipToLocation fields are only returned to the buyer or seller, and a string value of Unavailable will be returned to all third parties.

See Specifying Locations to Where You Ship.



Applicable values: See CountryCodeType, ShippingRegionCodeType
Order.ShippingDetails.SalesTax SalesTaxType Optional This container shows the sales tax rate percentage for a specific tax jurisdiction. Additionally, it indicates whether or not the seller applies sales tax to shipping charges in addition to the item cost. The concept of 'sales tax' is only applicable to eBay US and Canada (English and French) sites.

This container can be used in an Add/Revise/Relist/Verify call to set sales tax settings for a specific tax jurisdiction, but it is actually a better practice if a user sets up sales tax rates through the Sales Tax Table tool in My eBay (or by using the SetTaxTable call). A seller's Sales Tax Table is applied to the listing by including the UseTaxTable field in the request and setting its value to true. The GetTaxTable call can be used to retrieve the current sales tax rates for different tax jurisdictions.

This container is only returned in order-related 'Get' calls if sales tax is applicable to the order line item.

Note: Beginning January 1, 2019, buyers in some US states will automatically be charged sales tax for eBay purchases. eBay will collect and remit this sales tax to the proper taxing authority on the buyer's behalf. So, if a sales tax rate is established for a state that is subject to 'eBay Collect and Remit', this sales tax rate will be ignored by eBay during checkout process. For a list of the US states that will become subject to 'eBay Collect and Remit' (and effective dates), see the eBay sales tax collection help topic.

See Enabling Multi-jurisdiction Sales Tax.

Order.ShippingDetails.SalesTax
  .SalesTaxPercent
float Optional This float value is the sales tax percentage rate applicable to the corresponding tax jurisdiction (US state or Canadian province). Sellers are responsible for providing accurate sales tax rates for each jurisdiction. This sales tax rate comes into play when a buyer from that tax jurisdiction makes a purchase from the seller. The value passed in is stored with a precision of 3 digits after the decimal point (##.###).

This field is only returned in order management calls if sales tax applies to the order line item, and is only in GetItem (and other 'Get' calls) if sales tax is applicable to the listing or order line item, and the seller is the person making the call.

Note: Beginning January 1, 2019, buyers in some US states will automatically be charged sales tax for eBay purchases. eBay will collect and remit this sales tax to the proper taxing authority on the buyer's behalf. So, if a sales tax rate is established for a state that is subject to 'eBay Collect and Remit', the sales tax rate in this field is ignored by eBay during checkout process. For a list of the US states that will become subject to 'eBay Collect and Remit' (and effective dates), see the eBay sales tax collection help topic.
Order.ShippingDetails.SalesTax
  .SalesTaxState
string Optional This is the unique, two-digit identifier of the tax jurisdiction (such as 'CA' for California). To retrieve all two-digit identifiers for all states/territories/provinces for a site, a seller can either use a GetTaxTable call with DetailLevel set to ReturnAll, or they can use the GeteBayDetails call with DetailLevel name set to TaxJurisdiction. Please note that both GetTaxTable and GeteBayDetails calls use a JurisdictionID field to express these tax jurisdiction identifiers instead of SalesTaxState, but the values used in these fields are the same.

The SalesTaxState field is always required in an Add/Revise/Relist/Verify call, and always returned with each SalesTax container to identify the tax jurisdiction.
Order.ShippingDetails.SalesTax
  .ShippingIncludedInTax
boolean Optional This field is included in an Add/Revise/Relist/Verify call and set to true if the seller wants sales tax for the jurisdiction to apply to the cumulative amount of item cost and shipping charges. This value defaults to false if not specified.

This field is always returned with the SalesTax container (whether true or false).

Note: Beginning January 1, 2019, buyers in some US states will automatically be charged sales tax for eBay purchases. eBay will collect and remit this sales tax to the proper taxing authority on the buyer's behalf. So, if a true value is set for this field for a state that is subject to 'eBay Collect and Remit', this setting is ignored by eBay during checkout process. For a list of the US states that will become subject to 'eBay Collect and Remit' (and effective dates), see the eBay sales tax collection help topic.
Default: False.
Order.ShippingDetails
  .ShippingServiceOptions
ShippingServiceOptionsType Optional,
repeatable: [0..*]
Shipping costs and options related to domestic shipping services offered by the seller. Flat and calculated shipping. Required if InternationalShippingServiceOption is specified.

For flat shipping, a maximum shipping cost may apply when listing. See Shipping documentation for details about Maximum Flat Rate Shipping Costs.

If you specify multiple ShippingServiceOptions nodes, the repeating nodes must be contiguous. For example, you can insert InternationalShippingServiceOption nodes after a list of repeating ShippingServiceOptions nodes, but not between them:

<ShippingServiceOptions>...</ShippingServiceOptions>
<ShippingServiceOptions>...</ShippingServiceOptions>
<ShippingServiceOptions>...</ShippingServiceOptions>
<InternationalShippingServiceOption>...</InternationalShippingServiceOption>
<InternationalShippingServiceOption>...</InternationalShippingServiceOption>


If you specify ShippingDetails when you revise or relist an item but you omit ShippingServiceOptions, eBay will drop the domestic shipping services from the listing. This may also have unintended side effects, as other fields that depend on this data may be dropped as well.

To retain the shipping services and dependent fields when you modify other shipping details, it may be simplest to specify all ShippingDetails that you still want to include in the listing.

A seller can offer up to four domestic shipping services and up to five international shipping services. However, if the seller is opted in to the Global Shipping Program, only four other international shipping services may be offered (regardless of whether or not Global Shipping is offered for the listing). All specified domestic and international shipping services must be the same shipping type (for example, Flat versus Calculated).

For GetItemShipping, results are filtered: if any service is not available in the buyer's region, it is removed. If no services remain after this filtering, a warning is returned.

See Overview of the API Schema for rules regarding repeating instances of a nodes (nodes for which maxOccurs is "unbounded" or is greater than 1).

Order.ShippingDetails
  .ShippingServiceOptions
  .ShippingInsuranceCost
AmountType (double) Optional The insurance cost associated with shipping a single item with this shipping service.

Exception: For GetItemShipping, this is proportional to QuantitySold. If the item has not yet been sold, insurance information cannot be calculated and the value is 0.00. For calculated shipping only.

See Determining Shipping Costs for a Listing.

Order.ShippingDetails
  .ShippingServiceOptions
  .ShippingService
token Conditional A shipping service option being offered by the seller to ship an item to a buyer. For a list of valid ShippingService values, call GeteBayDetails with DetailName set to ShippingServiceDetails. The ShippingServiceDetails.ValidForSellingFlow flag must also be present. Otherwise, that particular shipping service option is no longer valid and cannot be offered to buyers through a listing.

To view the full list of domestic shipping service options in the response, look for the ShippingServiceDetails.ShippingService fields. Domestic shipping service options will not have a InternationalService = true field, as this indicates that the ShippingService value is an International shipping service option.

For flat and calculated shipping.

If there are two or more services and one is "pickup", "pickup" must not be specified as the first service.

See GeteBayDetails.



Applicable values: See ShippingServiceCodeType
Order.ShippingDetails
  .ShippingServiceOptions
  .ShippingServiceAdditionalCost
AmountType (double) Conditional The cost of shipping each additional item if the same buyer purchases multiple quantity of the same line item. This field is required when creating a multiple-quantity, fixed-price listing. Generally, the seller will give the buyer a shipping discount if that buyer purchases multiple quantity of the item, so this value should usually be less than the value set for ShippingServiceCost.

The value of this field can even be set to 0 if the seller wants to encourage buyers to buy multiple quantity of the item, or it could be that the seller can fit multiple quantities of the line item in a single shipping package, so the seller is just passing this shipping savings onto the buyer. This field is not applicable for single-quantity listings.

See Determining Shipping Costs for a Listing.

Order.ShippingDetails
  .ShippingServiceOptions
  .ShippingServiceCost
AmountType (double) Conditional The base cost of shipping the item using the shipping service specified in the ShippingService field. In the case of a multiple-quantity, fixed-price listing, the ShippingServiceAdditionalCost field shows the cost to ship each additional item if the buyer purchases multiple quantity of the same line item.

When returned by GetItemShipping, it includes the packaging and handling cost. For flat and calculated shipping.

If a shipping service has been specified (even LocalPickup), GetItem returns the shipping service cost, even if the cost is zero. Otherwise, cost is not returned.

If this is for calculated shipping for a listing that has not yet ended, note that the cost cannot be determined until the listing has ended and the buyer has specified a postal code.

For GetItemShipping, promotional shipping savings is reflected in the cost, if applicable.
  • If the promotional shipping option is lower than other shipping services being offered, the savings is reflected in the returned shipping cost. The shipping service named Promotional Shipping Service (or whatever is the localized name for it) is included among the shipping services.
  • If the promotional shipping cost is lower than the cost of other shipping services being offered, it is presented first in the list. (The LOWEST shipping service cost is always presented first, regardless of whether there is promotional shipping.)

See Determining Shipping Costs for a Listing.

Order.ShippingDetails
  .ShippingServiceOptions
  .ShippingServicePriority
int Conditional Controls the order (relative to other shipping services) in which the corresponding ShippingService will appear in the View Item and Checkout page.

Sellers can specify up to four domestic shipping services (with four ShippingServiceOptions containers), so valid values are 1, 2, 3, and 4. A shipping service with a ShippingServicePriority value of 1 appears at the top. Conversely, a shipping service with a ShippingServicePriority value of 4 appears at the bottom of a list of four shipping service options.

This field is applicable to Flat and Calculated shipping.
Order.ShippingDetails
  .ShippingServiceOptions
  .ShippingSurcharge
AmountType (double) Conditional An additional fee to charge US buyers who have the item shipped via UPS or FedEx to Alaska, Hawaii or Puerto Rico. Can only be assigned a value for the eBay US site and for items in the Parts and Accessories category of the eBay Motors site. Only returned if set. If some line items in an order have a surcharge, surcharge is added only for those line items. Flat rate shipping only.
Order.Total AmountType (double) Required The Total amount equals the Subtotal value plus the shipping/handling, shipping insurance, and sales tax costs.
Order.Total
  [ attribute currencyID ]
CurrencyCodeType Required The Total amount equals the Subtotal value plus the shipping/handling, shipping insurance, and sales tax costs.

For a list of possible enumeration values, see CurrencyCodeType.
Order.TransactionArray TransactionArrayType Required Container consisting of one or more line items that comprise an order. The data for an order line item is stored in the Transaction container. For the AddOrder call, there will always be at least two order line items in the container, but no more than 40.

We strongly recommend that you avoid mixing transactions for digital and non-digital listings in the same Combined Invoice order. (In the future, AddOrder may enforce this recommendation.)

See Combined Invoice.

Order.TransactionArray
  .Transaction
TransactionType Required,
repeatable: [1..*]
A Transaction container is returned for each line item in the order. This container consists of detailed information on one order line item.

For the AddOrder call, a Transaction container is used to identified the unpaid order line items that are being combined into one Combined Invoice order.

See Listing an Item.

Order.TransactionArray
  .Transaction.Item
ItemType Required Container consisting of details about an item in a listing. The child fields return are dependent on the call, the type of item or listing, and the listing site.
Order.TransactionArray
  .Transaction.Item.ItemID
ItemIDType (string) Required The unique identifier of the eBay listing. This identifier is generated by eBay and returned in the response of an Add call if an item is successfully listed. Once an item is successfully created, the ItemID cannot be modified.

Note: Although we represent item IDs as strings in the schema, we recommend you store them as 64-bit signed integers. If you choose to store item IDs as strings, allocate at least 19 characters (assuming decimal digits are used) to hold them. Your code should be prepared to handle IDs of up to 19 digits.
Max length: 19 (Note: the eBay database specifies 38. Currently, Item IDs are usually 9 to 12 digits).
Order.TransactionArray
  .Transaction.TransactionID
string Required Unique identifier for an eBay order line item. An order line item is created once there is a commitment from a buyer to purchase an item. Since an auction listing can only have one order line item during the duration of the listing, the TransactionID for auction listings is always 0. Along with its corresponding ItemID, a TransactionID is used and referenced during an order checkout flow and after checkout has been completed.

For GetOrders, GetOrderTransactions, and GetItemTransactions only: If using Trading WSDL Version 1019 or above, this field will only be returned to the buyer, seller, or PayPal (if payment method is PayPal), and no longer returned at all to third parties (except for PayPal). If using a Trading WSDL older than Version 1019, transaction ID is only returned to the buyer, seller or PayPal, and a dummy value of 10000000000000 will be returned to all third parties (except for PayPal).
Max length: 19 (Note: The eBay database specifies 38. Transaction IDs are usually 9 to 12 digits.).
Standard Input Fields  
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.

InvocationID UUIDType (string) Optional A unique identifier for a particular call. If the same InvocationID is passed in after it has been passed in once on a call that succeeded for a particular application and user, then an error will be returned. The identifier can only contain digits from 0-9 and letters from A-F. The identifier must be 32 characters long. For example, 1FB02B2-9D27-3acb-ABA2-9D539C374228.
Max length: 32.
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) 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"?>
<AddOrderResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Output Fields -->
  <CreatedTime> dateTime </CreatedTime>
  <OrderID> OrderIDType (string) </OrderID>
  <!-- Standard Output Fields -->
  <Ack> AckCodeType </Ack>
  <Build> string </Build>
  <CorrelationID> string </CorrelationID>
  <DuplicateInvocationDetails> DuplicateInvocationDetailsType
    <DuplicateInvocationID> UUIDType (string) </DuplicateInvocationID>
    <InvocationTrackingID> string </InvocationTrackingID>
    <Status> InvocationStatusType </Status>
  </DuplicateInvocationDetails>
  <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>
</AddOrderResponse>
Return Value Type Occurrence Meaning
Call-specific Output Fields [Jump to standard fields]
CreatedTime dateTime Always Timestamp that indicates the date and time that the Combined Invoice order was created.

See Combined Invoice.

OrderID OrderIDType (string) Always The unique identifier for the Combined Invoice order. This value is created by eBay upon a successful AddOrder call. This value can be used as an input filter in GetOrders and GetOrderTransactions to retrieve the order.

See Combined Invoice.

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

(Not all values in AckCodeType apply to this field.)

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.
DuplicateInvocationDetails DuplicateInvocationDetailsType Conditionally Information that explains a failure due to a duplicate InvocationID being passed in.
DuplicateInvocationDetails
  .DuplicateInvocationID
UUIDType (string) Conditionally This value represents the duplicate InvocationID or InvocationTrackingID that was used in the call request.
DuplicateInvocationDetails
  .InvocationTrackingID
string Conditionally This unique identifier identifies the business item the previous API invocation created. For example, the Item ID of the item created by an AddItem call.
DuplicateInvocationDetails
  .Status
InvocationStatusType Conditionally This enumeration value indicates the status of the previous call that used the InvocationID or InvocationTrackingID specified in the DuplicateInvocationID.

Applicable values:

CustomCode
 
Failure
(out)
InProgress
(out)
Success
(out)

Code so that your app gracefully handles any future changes to this list.
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.

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

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

Creates an order from two ItemID/TransactionID pairs.

Description

User braggybuyer purchased two separate items from magicalbookseller. Magical Bookseller wants to make the process more convenient for herself and the buyer by combining the two transactions into one order. This makes it so braggybuyer can pay for both items together (and thus go through the checkout process a single time for everything). Magical Bookseller has the item ID for each listing and has used GetItemTransactions to obtain the transaction ID values that correspond to each item.

Input

The key input for this call is Transaction (a container with the ItemID and its corresponding TransactionID). For the seller to create the order, set CreatingUserRole to Seller. (Note that a few more options are available when the person creating the order is the seller.)

XML format.

<?xml version="1.0" encoding="utf-8"?>
<AddOrderRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <RequesterCredentials>
    <eBayAuthToken>ABC...123</eBayAuthToken>
  </RequesterCredentials>
  <Order>
    <CreatingUserRole>Seller</CreatingUserRole>
    <PaymentMethods>PayPal</PaymentMethods>
    <Total currencyID="USD">36.00</Total>
    <TransactionArray>
      <!-- The user making this call should be the buyer or seller of each ItemID/TransactionID pair -->
      <Transaction>
        <Item>
          <ItemID>110025788765</ItemID>
        </Item>
        <TransactionID>0</TransactionID>
      </Transaction>
      <Transaction>
        <Item>
          <ItemID>110025788368</ItemID>
        </Item>
        <TransactionID>0</TransactionID>
      </Transaction>
    </TransactionArray>
  </Order>
</AddOrderRequest>

Output

The call creates an order and returns an OrderID. The order is assigned the state of Active.

XML format.
<?xml version="1.0" encoding="UTF-8" ?>
<AddOrderResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2015-12-10T16:09:47.540Z</Timestamp>
  <Ack>Success</Ack>
  <Version>967</Version>
  <Build>e967_core_Bundled_5642307_R1</Build>
  <OrderID>865826</OrderID>
  <CreatedTime>2015-12-10T16:09:47.000Z</CreatedTime>
</AddOrderResponse>



Change History

Change Date Description
947
2015-10-29
  • ShippingServiceCodeType (modified): A new enumeration value, FlatRateFreight, enables sellers to offer free or flat rate freight shipping on listings shipped within the United States. The seller negotiates the actual shipping cost with the freight carrier separately from the checkout process, so the sale can be completed quickly.
945
2015-10-15
  • BuyerPaymentMethodCodeType (modified): Sellers can no longer specify Moneybookers, ProPay, or Paymate as values in a PaymentMethods field. If any of these values are used, the Combined Invoice operation will be rejected.
929
2015-06-26
  • OrderType.ContainseBayPlusTransaction (added): Returns a boolean value that indicates if the order has an eBay Plus transaction.
  • TransactionType.eBayPlusTransaction (added): Returns a boolean value that indicates if this is an eBay Plus transaction.
899
2014-11-04
  • BuyerPaymentMethodCodeType (modified): 'QIWI' added as enumeration value. This payment method can only be specified on the US site and is only applicable to Russian buyers.
799
2012-11-07
  • ShippingDetailsType.InternationalShippingServiceOption (doc change): The description clarifies that a seller can offer up to four domestic shipping services and up to five international shipping services. However, if the seller is opted in to the Global Shipping Program, only four other international shipping services may be offered (regardless of whether or not Global Shipping is offered for the listing).
793
2012-09-26
  • Order.TransactionArray (doc change): Added a note that the TransactionArray container can contain a maximum of 40 orders (Transaction containers). No more than 40 orders can be combined using the AddOrder call.
791
2012-09-12
  • InternationalShippingServiceOption.ShippingService (modified): New International shipping services added for UK and DE sites as part of the EU delivery estimate project. For UK, these new enumeration values are UK_ParcelForceIntlExpress, UK_ParcelForceIntlValue, and UK_ParcelForceIntlEconomy. For DE, these new enumeration values are DE_DeutschePostBriefIntlEcon and DE_DeutschePostBriefIntlPriority.
781
2012-07-04
  • ImportCharge (doc change): ImportCharge is a Global Shipping Program field, and AddOrder is not currently compatible with the Global Shipping Program.
  • ShippingServiceCodeType (modified): AU_StandardDeliveryFromOutsideAU added as a shipping service option. This option can be specified by sellers on the AU site if the item is being shipped from a location outside of Australia using standard delivery.
777
2012-06-06
  • ImportCharge (added): The total cost of customs and taxes that will be applied to a item shipped internationally using the Global Exchange program. ImportCharge is optional in Order.ShippingDetails.InternationalShippingServiceOption. This amount is calculated and supplied for each item by the international shipping provider when a buyer views the item properties.
719
2011-04-27
  • ShippingServiceCodeType (modified): 15 new shipping services added for the Australia and Canada sites. The nine new Australia carrier-specific shipping services include AU_AusPostRegisteredPostInternationalPaddedBag1kg, AU_AusPostRegisteredPostInternationalPaddedBag500g, AU_AusPostRegisteredPostInternationalParcel, AU_AustralianAirExpressFlatRate1kg, AU_AustralianAirExpressFlatRate3kg, AU_AustralianAirExpressFlatRate5kg, AU_AustralianAirExpressMetro15kg, AU_eBayAusPost3kgFlatRateSatchel, and AU_eBayAusPost500gFlatRateSatchel. The nine new Australia generic service level shipping services include AU_EconomyDeliveryFromOutsideAU, AU_ExpeditedDeliveryFromOutsideAU, AU_ExpressDelivery, AU_Freight, and AU_StandardDelivery. The new Canada shipping service is CA_Freight.
  • Item.ShippingDetails.ShippingServiceOptions (modified): '4' has been added as a valid integer value to account for the additional international shipping service that may be specified by the seller.
  • Item.ShippingDetails.InternationalShippingServiceOption (modified): '4' and '5' have been added as valid integer values to account for the additional international shipping services that may be specified by the seller.
635
2009-09-16
  • InsuranceDetails, InsuranceFee, InsuranceOption, InternationalInsuranceDetails, InsuranceWanted, ShippingInsuranceCost (modified): Sellers can no longer give buyers the option to purchase shipping insurance for either domestic or international items. The buyer-paid shipping insurance option has been removed from the following sites:
    BEFR, BENL, CA, CAFR, HK, IE, IN, MY, Motors, NL, PH, PL, SG, UK, US
    Insurance tags are returned only when the associated item has buyer-paid shipping insurance values.
603
2009-02-04
  • Order.PaymentMethods.IntegratedMerchantCreditCard (added): This payment method can apply if a seller has a payment gateway account.
555
2008-03-05
  • ShippingDetails.CODCost (added): By April, on the Italy site (site ID 101), you can specify the cost of cash-on-delivery shipping.
  • ShippingDetails.CODCost (added): By April, on the Italy site (site ID 101), you can specify the cost of cash-on-delivery shipping.
537
2007-10-31
  • Item.PaymentMethods.PaisaPayEscrow, Item.PaymentMethods.PaisaPayEscrowEMI (added): Payment methods PaisaPayEscrow and PaisaPayEscrowEMI is offered. Applies to India site only.
477
2006-09-06
  • ShippingSurcharge (added): Sellers on eBay US and Motors Parts and Accessories can now specify a surcharge when using flat rate shipping via UPS to Alaska, Hawaii or Puerto Rico.
471
2006-08-09
  • ApplyShippingDiscount (doc change): Not applicable to AddOrder. (All orders apply shipping discounts, by definition.) Removed from the Input fields documentation.
1085
2018-10-26
  • Order.PaymentMethods (modified): For sellers enrolled in the new eBay Managed Payments program, a specified payment method is not necessary.
  • ShippingDetails.SalesTax (doc change): Added a note to state that the Sales Tax rate for a US tax jurisdiction that is subject to the 'eBay Collect and Remit Tax' program will be ignored during the checkout process, since eBay will be collecting and remitting this tax to the tax authorities without the seller's involvement.