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:
- The CreatingUserRole: whether the seller or buyer is creating the order.
- At least one PaymentMethods property.
- The Total of the order.
- A TransactionArray container with at least two order line items that have been purchased or won.
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:
Manage and fulfill orders
Combined invoice
Output Detail Controls Samples Change History |
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 <InternationalShippingServiceOption> InternationalShippingServiceOptionsType <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 <ShippingService> token </ShippingService> <ShippingServiceAdditionalCost> AmountType (double) </ShippingServiceAdditionalCost> <ShippingServiceCost> AmountType (double) </ShippingServiceCost> <ShippingServicePriority> int </ShippingServicePriority> </ShippingServiceOptions> <!-- ... more ShippingServiceOptions nodes allowed here ... --> <ThirdPartyCheckout> boolean </ThirdPartyCheckout> </ShippingDetails> <Total currencyID="CurrencyCodeType"> AmountType (double) </Total> <TransactionArray> TransactionArrayType <Transaction> TransactionType <Item> ItemType <ItemID> ItemIDType (string) </ItemID> <ShippingServiceCostOverrideList> ShippingServiceCostOverrideListType </ShippingServiceCostOverrideList> </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 initiated/created by the buyer or by the seller. This field is only returned for Combined Invoice orders. An AddOrder call can be used by a seller or buyer to combine two or more unpaid order line items into a 'Combined Invoice' order. Once two or more line items are successfully combined into one order, the buyer only needs to make one payment (instead of multiple payments - one for each order line item). The CreatingUserRole field is required in the AddOrder call request. Note: Except for listings that required immediate payment, buyers also may have the opportunity to combine multiple line items (from the same seller) into a 'Combined Invoice' order through the buy/checkout flow. This may include accepted Best Offers or auctions that the buyer wins. Applicable values: See Combined Invoice. |
Order.PaymentMethods | BuyerPaymentMethodCodeType | Conditional,
repeatable: [0..*] |
In GetOrders and OrderReport, a PaymentMethods field will appear for each payment method available to the buyer for the order's purchase. However, once the buyer pays for the order, any and all of these PaymentMethods fields will stop being returned, and instead, the actual payment method used will be returned in the PaymentMethod field of the CheckoutStatus container. In an AddOrder call, the seller can use one or more PaymentMethods fields to override whatever available payment methods were already defined for each individual line item. Note: For AddOrder, the seller can only specify offline payment methods (if offline payment is supported for the listing), as eBay now controls all electronic payment methods avaialable to buyers, and sellers have no control over these payment methods. Applicable values: (Not all values in BuyerPaymentMethodCodeType apply to this field.) |
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. Note: For the GetOrders calls, this field is only returned to the seller of the order; this field is not returned to the buyer or to a third party. |
Order.ShippingDetails | ShippingDetailsType | Optional |
Container consisting of order-level shipping details. More shipping-related details can be found at the line item level for each line item in the order. In an AddOrder call, the seller can use the ShippingDetails container to make adjustments to shipping details, including the available shipping service options and shipping cost. Sometimes, sellers will reduce the cost of shipping if one or more order line items can be shipped together in the same package. |
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 or eBay International Shipping, only four other international shipping services may be offered (regardless of whether or not Global Shipping or eBay International 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 or eBay International Shipping) 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 Repeating (unbounded) fields for rules regarding repeating instances of a nodes (nodes for which maxOccurs is "unbounded" or is greater than 1). |
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 https://developer.ebay.com/api-docs/user-guides/static/trading-user-guide/shipping-types-rates.html. |
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. If this field is omitted from international shipping service options, the order of the shipping service options in View Item and Checkout pages will be determined by the order that these shipping service options are presented in the request payload of an Add/Revise/Relist call. |
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 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 Shipping information. Applicable values: See CountryCodeType, ShippingRegionCodeType |
Order.ShippingDetails.SalesTax | SalesTaxType | Optional |
This container shows sales tax information for an item in a specific tax jurisdiction. 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 management 'Get' calls if sales tax is applicable to the order line item. For eBay Collect and Remit states, the sales tax information is displayed in the Transaction.Taxes container instead. Note: Buyers in all 50 US states and DC are automatically charged sales tax for eBay purchases, and eBay collects and remits this sales tax to the proper taxing authority on the buyer's behalf. Because of this, if a sales tax percentage rate is applied to a listing by a seller in one of these states, this field will be ignored during the checkout process. Currently, sales tax percentage rates can only be specified by sellers in Canada and 5 US territories, including American Samoa (AS), Guam (GU), Northern Mariana Islands (MP), Palau (PW), and Virgin Islands (VI). |
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. Although this field will be returned at the order level in order management calls for a single line item order, sales tax is applied at the line item level and not order level. For multiple line item orders, this field will not be returned at all at the order level. Note: Buyers in all 50 US states and DC are automatically charged sales tax for eBay purchases, and eBay collects and remits this sales tax to the proper taxing authority on the buyer's behalf. Because of this, if a sales tax percentage rate is applied to a listing by a seller in one of these states, this field will be ignored during the checkout process. Currently, sales tax percentage rates can only be specified by sellers in Canada and 5 US territories, including American Samoa (AS), Guam (GU), Northern Mariana Islands (MP), Palau (PW), and Virgin Islands (VI). |
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 conditionally required in an Add/Revise/Relist/Verify call if the seller is applying sales tax to a listing for a particular jurisdiction, and is 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: Buyers in all 50 US states and DC are automatically charged sales tax for eBay purchases, and eBay collects and remits this sales tax to the proper taxing authority on the buyer's behalf. Because of this, if a sales tax percentage rate is applied to a listing by a seller in one of these states, this field will be ignored during the checkout process. Currently, sales tax percentage rates can only be specified by sellers in Canada and 5 US territories, including American Samoa (AS), Guam (GU), Northern Mariana Islands (MP), Palau (PW), and Virgin Islands (VI). Default: False. |
Order.ShippingDetails .ShippingServiceOptions |
ShippingServiceOptionsType | Optional,
repeatable: [0..*] |
This container is used to provide details on a specific domestic shipping service option, including the unique identifier of the shipping service option and the costs related to domestic shipping service. A separate ShippingServiceOptions container is needed for each domestic shipping service option that is available to ship the item. Unless a fulfillment business policy is being used, generally at least one ShippingServiceOptions container will be required. 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> 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 or eBay International Shipping, only four other international shipping services may be offered (regardless of whether or not Global Shipping shipment or eBay International Shipping is offered for the listing). All specified domestic and international shipping services must be the same shipping type (for example, Flat versus Calculated). Note: If the seller has set the shipping cost model to 'Flat' or 'Calculated' (ShippingDetails.ShippingType field), at least one actual shipping service option must be specified through a ShippingServiceOptions container. In the past, eBay allowed users to set the shipping cost model to 'Flat' or 'Calculated', and then just pass in one ShippingServiceOptions container with the ShippingServiceOptions.ShipppingService value set to a 'Local Pickup' option. Now, sellers must pass in at least one actual domestic shipping service option in addition to any 'Local Pickup' option, or the listing will be blocked with the following error: 17510 - You must specify at least one domestic shipping service, other than or in addition to Local Pickup. 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 Repeating (unbounded) fields for rules regarding repeating instances of a nodes (nodes for which maxOccurs is "unbounded" or is greater than 1). |
Order.ShippingDetails .ShippingServiceOptions .ShippingService |
token | Conditional |
This enumeration value indicates a specific domestic shipping service option being offered by the seller to ship an item to a buyer who is located within the same country as the item. This field is required to identify each domestic shipping service option that is specified with a ShippingServiceOptions container. 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.Note: The eBay standard envelope (eSE) is a domestic envelope service with tracking through eBay. This service applies to specific sub-categories of Trading Cards, and to coins & paper money, postcards, stamps, patches, and similar eligible categories, and is only available on the US marketplace. See eBay standard envelope for details, restrictions, and an envelope size template. To use this service, send envelopes using the USPS mail and set the ShippingService field to US_eBayStandardEnvelope . For the REST equivalent, see Using the eBay standard envelope (eSE) 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.
|
Order.ShippingDetails .ShippingServiceOptions .ShippingServiceCost |
AmountType (double) | Conditional |
The base cost of shipping one unit of the item using the shipping service specified in the corresponding ShippingService field. In the case of a multiple-quantity, fixed-price listing, the ShippingServiceAdditionalCost field also becomes applicable, and shows the cost to ship each additional unit of the item if the buyer purchases multiple quantity of the same line item. Note: If the corresponding shipping service option is set as a 'free shipping' option (FreeShipping=true), the seller still needs to include this ShippingServiceCost field and set its value to 0.0 , as eBay will not do this automatically. When returned by GetItemShipping, it includes the packaging and handling cost. Note that if ShippingService is set to LocalPickup , ShippingServiceCost must be set to 0.0 . Also, if a shipping service has been specified (even LocalPickup), GetItem returns the shipping service cost, even if the cost is zero. 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. |
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. If this field is omitted from domestic shipping service options, the order of the shipping service options in View Item and Checkout pages will be determined by the order that these shipping service options are presented in the request payload of an Add/Revise/Relist call. |
Order.ShippingDetails .ThirdPartyCheckout |
boolean | Optional |
Note: This field is deprecated and will stop being returned in GetItemTransactions and GetSellerTransactions on January 31, 2024. |
Order.Total | AmountType (double) | Required |
The Total amount shows the total cost for the order, including total item cost (shown in Subtotal field), shipping charges (shown in ShippingServiceSelected.ShippingServiceCost field), and sales tax (shown in SalesTax.SalesTaxAmount field). Note: For GetOrders only: If using Trading WSDL Version 1307 or above, the amount in this field will include sales tax. If using a Trading WSDL older than Version 1307, the amount in this field will not include sales tax. To incorporate the new logic while using a Trading WSDL that is older than 1307, developers can also use the X-EBAY-API-COMPATIBILITY-LEVEL header and set its value to 1307 or higher. In an AddOrder call, the seller can pass in the Total amount for the 'Combined Invoice' order, and this is what the buyer will be expected to pay for the order. |
Order.Total [ attribute currencyID ] |
CurrencyCodeType | Required |
The Total amount shows the total cost for the order, including total item cost (shown in Subtotal field), shipping charges (shown in ShippingServiceSelected.ShippingServiceCost field), and sales tax (shown in SalesTax.SalesTaxAmount field). Note: For GetOrders only: If using Trading WSDL Version 1307 or above, the amount in this field will include sales tax. If using a Trading WSDL older than Version 1307, the amount in this field will not include sales tax. To incorporate the new logic while using a Trading WSDL that is older than 1307, developers can also use the X-EBAY-API-COMPATIBILITY-LEVEL header and set its value to 1307 or higher. In an AddOrder call, the seller can pass in the Total amount for the 'Combined Invoice' order, and this is what the buyer will be expected to pay for the order. 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 each order line item in the order is stored in a separate Transaction container. Under the TransactionArray container in an AddOrder call, a seller or buyer specifies two or more (up to 40) order line items into a 'Combined Invoice' order. 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. |
Order.TransactionArray .Transaction.Item |
ItemType | Required |
This container consists of relevant details about the listing associated with the sales transaction. Which listing fields are returned under this container will depend on the listing, the eBay marketplace, and the API call. In an AddOrder call, only the unique identifier of the listing (ItemID) is needed to help identify the sales transaction to combine into a 'Combined Invoice' order. |
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. |
Order.TransactionArray .Transaction.Item .ShippingServiceCostOverrideList |
ShippingServiceCostOverrideListType | Optional |
This container is used when the seller wants to override the flat shipping costs for all domestic and/or all international shipping services defined in the shipping business policy referenced in the SellerProfiles.SellerShippingProfile.ShippingProfileID field. Shipping costs include the cost to ship one item, the cost to ship each additional identical item, and any shipping surcharges applicable to domestic shipping services. A ShippingServiceCostOverrideList.ShippingServiceCostOverride container is required for each domestic and/or international shipping service that is defined in the domesticShippingPolicyInfoService and intlShippingPolicyInfoService containers of the shipping business policy. Note: To make sure that the shipping cost override and policies are set correctly on an item (that is using business policies and has one or more shipping service cost overrides set up), the Item.SellerProfiles.SellerShippingProfile container and the Item.ShippingServiceCostOverrideList.ShippingServiceCostOverride container(s) must be included, even if no changes are being made. Shipping service cost overrides are a listing-level concept, and the shipping costs specified through each ShippingServiceCostOverrideList.ShippingServiceCostOverride container will not change the shipping costs defined for the same shipping services in the shipping business policy. For Revise and Relist calls: To delete all shipping service cost overrides when you revise or relist, specify Item.ShippingServiceCostOverrideList in DeletedField, and don't pass ShippingServiceCostOverrideList in the request. |
Order.TransactionArray .Transaction.TransactionID |
string | Required |
Unique identifier for an eBay sales transaction. This identifier is created once there is a commitment from a buyer to purchase an item, or if/when the buyer actually purchases the line item through a 'Buy it Now' option. An ItemID/TransactionID pair can be used and referenced during an order checkout flow to identify a line item. The TransactionID value for auction listings is always 0 since there can be only one winning bidder/one sale for an auction listing. Note: Beginning in July 2024, non-zero transaction IDs will start being returned for auction listings. If necessary, update code to handle non-zero transaction IDs for auction transactions before this time. For GetOrders and GetItemTransactions only: If using Trading WSDL Version 1019 or above, this field will only be returned to the buyer and seller, and no longer returned at all to third parties. If using a Trading WSDL older than Version 1019, transaction ID is only returned to the buyer and seller, and a dummy value of 10000000000000 will be returned to all third parties.
|
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. Below are some examples from different countries.
|
||||||||||||||||||||||||||||||||||||||||
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., 1149). The version you specify for a call has these basic effects:
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:
|
||||||||||||||||||||||||||||||||||||||||
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 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 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. |
Input Detail Controls Samples Change History |
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 of the successfully-created 'Combined Invoice' order. This value is only created and returned if the AddOrder call is successful in creating the new order. This value can be used as an input filter in GetOrders calls to retrieve the 'Combined Invoice' order. Note: This unique identifier is not the same as the OrderID that is generated after payment. Max length: 40. 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: (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: 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. |
Errors.ErrorClassification | ErrorClassificationCodeType | Conditionally |
API errors are divided between two classes: system errors and request errors.
Applicable values: Code so that your app gracefully handles any future changes to this list. |
Errors.ErrorCode | token | Conditionally |
A unique code that identifies the particular error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.
See Errors By Number. |
Errors.ErrorParameters | ErrorParameterType | Conditionally,
repeatable: [0..*] |
This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned. |
Errors.ErrorParameters [ attribute ParamID ] |
string | Conditionally | This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned. |
Errors.ErrorParameters.Value | string | Conditionally | This is the value of the request parameter noted in the ParamID attribute. So, if the ParamID value was ItemID, the value in this field would be the actual value of that ItemID. |
Errors.LongMessage | string | Conditionally | A more detailed description of the condition that raised the error. |
Errors.SeverityCode | SeverityCodeType | Conditionally |
Indicates whether the error is a severe error (causing the request to fail) or an informational error (a warning) that should be communicated to the user.
Applicable values: If the source of the problem is within the application (such as a missing required element), change the application before you retry the request.
See the Error handling section of the Making a Trading API call guide for more information. 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. |
Input Output Samples Change History |
Detail Controls
DetailLevel
This call does not support varying Detail Levels. You do not need to pass DetailLevel in the request.
Input Output Detail Controls Change History |
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.
Creates an order from two ItemID/TransactionID pairs.
Description
User b*********r
purchased two separate items from m***************r
. Seller m***************r wants to make the process more convenient for herself and the buyer by combining the two transactions into one order. This makes it so b*********r
can pay for both items together (and thus go through the checkout process a single time for everything). Seller m***************r 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>A*******3</eBayAuthToken>
</RequesterCredentials>
<Order>
<CreatingUserRole>Seller</CreatingUserRole>
<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>1**********5</ItemID>
</Item>
<TransactionID>0</TransactionID>
</Transaction>
<Transaction>
<Item>
<ItemID>1**********8</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>8****6</OrderID>
<CreatedTime>2015-12-10T16:09:47.000Z</CreatedTime>
</AddOrderResponse>
Input Output Detail Controls Samples |
Change History
Change Date | Description |
---|---|
1321 2023-07-17 |
|
1315 2023-06-16 |
|
1145 2020-03-13 |
|
1119 2019-08-02 |
|
1113 2019-06-21 |
|
1107 2019-05-10 |
|
1101 2019-03-29 |
|
1095 2019-02-15 |
|
1085 2018-10-26 |
|
0947 2015-10-29 |
|
0945 2015-10-15 |
|
0929 2015-06-26 |
|
0899 2014-11-04 |
|
0799 2012-11-07 |
|
0793 2012-09-26 |
|
0791 2012-09-12 |
|
0781 2012-07-04 |
|
0777 2012-06-06 |
|
0719 2011-04-27 |
|
0635 2009-09-16 |
|
0603 2009-02-04 |
|
0555 2008-03-05 |
|
0537 2007-10-31 |
|
0477 2006-09-06 |
|
0471 2006-08-09 |
|