POST/bulk_migrate_listing
This call is used to convert existing eBay Listings to the corresponding Inventory API objects. If an eBay listing is successfully migrated to the Inventory API model, new Inventory Location, Inventory Item, and Offer objects are created. For a multiple-variation listing that is successfully migrated, in addition to the three new Inventory API objects just mentioned, an Inventory Item Group object will also be created. If the eBay listing is a motor vehicle part or accessory listing with a compatible vehicle list (ItemCompatibilityList container in Trading API's Add/Revise/Relist/Verify calls), a Product Compatibility object will be created.
Migration Requirements
To be eligible for migration, the active eBay listings must meet the following requirements:
- Listing type is Fixed-Price
Note: Auction listings are supported by the Inventory API, but the bulkMigrateListing method cannot be used to migrate auction listings.
- The item(s) in the listings must have seller-defined SKU values associated with them, and in the case of a multiple-variation listing, each product variation must also have its own SKU value
- Business Polices (Payment, Return Policy, and Shipping) must be used on the listing, as legacy payment, return policy, and shipping fields will not be accepted. With the Payment Policy associated with a listing, the immediate payment requirement must be enabled.
- The postal/zip code (PostalCode field in Trading's ItemType) or city (Location field in Trading's ItemType) must be set in the listing; the country is also needed, but this value is required in Trading API, so it will always be set for every listing
Unsupported Listing Features
The following features are not yet available to be set or modified through the Inventory API, but they will remain on the active eBay listing, even after a successful migration to the Inventory model. The downside to this is that the seller will be completely blocked (in APIs or My eBay) from revising these features/settings once the migration takes place:
- Any listing-level Buyer Requirements
- Listing enhancements like a bold listing title or Gallery Plus
Making the Call
In the request payload of the bulkMigrateListings call, the seller will pass in an array of one to five eBay listing IDs (aka Item IDs). To save time and hassle, that seller should do a pre-check on each listing to make sure those listings meet the requirements to be migrated to the new Inventory model. This method also requires the
Content-Type
request header. See the HTTP request headers for more information. There are no path or query parameters for this call.Call Response
If an eBay listing is migrated successfully to the new Inventory model, the following will occur:
- An Inventory Item object will be created for the item(s) in the listing, and this object will be accessible through the Inventory API
- An Offer object will be created for the listing, and this object will be accessible through the Inventory API
- An Inventory Location object will be created and associated with the Offer object, as an Inventory Location must be associated with a published Offer
If a multiple-variation listing is successfully migrated, along with the Offer and Inventory Location objects, an Inventory Item object will be created for each product variation within the listing, and an Inventory Item Group object will also be created, grouping those variations together in the Inventory API platform. For a motor vehicle part or accessory listing that has a specified list of compatible vehicles, in addition to the Inventory Item, Inventory Location, and Offer objects that are created, a Product Compatibility object will also be created in the Inventory API platform.
Input
Resource URI
This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com
root URI with api.sandbox.ebay.com
URI parameters
This method has no URI parameters.
HTTP request headers
All requests made to eBay REST operations require you to provide the Authorization
HTTP header for authentication authorization.
The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.
Header | Type | Description |
---|---|---|
Content-Type | string | This header indicates the format of the request body provided by the client. Its value should be set to application/json. For more information, refer to HTTP request headers. Occurrence: Required |
OAuth scope
This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):
https://api.ebay.com/oauth/api_scope/sell.inventory
See OAuth access tokens for more information.
Request payload
Copy complete valid JSON to clipboardRequest fields
Input container/field | Type | Description |
---|---|---|
requests | array of MigrateListing | This is the base container of the bulkMigrateListings request payload. One to five eBay listings will be included under this container. Occurrence: Required |
requests.listingId | string | The unique identifier of the eBay listing to migrate to the new Inventory model. In the Trading API, this field is known as the ItemID. Occurrence: Required |
Output
HTTP response headers
This call has no response headers.
Response payload
Response fields
Output container/field | Type | Description |
---|---|---|
responses | array of MigrateListingResponse | This is the base container of the response payload of the bulkMigrateListings call. The results of each attempted listing migration is captured under this container. Occurrence: Always |
responses.errors | array of ErrorDetailV3 | If one or more errors occur with the attempt to migrate the listing, this container will be returned with detailed information on each error. Occurrence: Conditional |
responses.errors.category | string | This string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors. Occurrence: Conditional |
responses.errors.domain | string | The name of the domain in which the error or warning occurred. Occurrence: Conditional |
responses.errors.errorId | integer | A unique code that identifies the particular error or warning that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms. Occurrence: Conditional |
responses.errors.inputRefIds | array of string | An array of one or more reference IDs which identify the specific request element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
responses.errors.longMessage | string | A detailed description of the condition that caused the error or warning, and information on what to do to correct the problem. Occurrence: Conditional |
responses.errors.message | string | A description of the condition that caused the error or warning. Occurrence: Conditional |
responses.errors.outputRefIds | array of string | An array of one or more reference IDs which identify the specific response element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
responses.errors.parameters | array of ErrorParameterV3 | Various warning and error messages return one or more variables that contain contextual information about the error or waring. This is often the field or value that triggered the error or warning. Occurrence: Conditional |
responses.errors.parameters.name | string | This type contains the name and value of an input parameter that contributed to a specific error or warning condition. Occurrence: Conditional |
responses.errors.parameters.value | string | This is the actual value that was passed in for the element specified in the name field. Occurrence: Conditional |
responses.errors.subdomain | string | The name of the subdomain in which the error or warning occurred. Occurrence: Conditional |
responses.inventoryItemGroupKey | string | This field will only be returned for a multiple-variation listing that the seller attempted to migrate. Its value is auto-generated by eBay. For a multiple-variation listing that is successfully migrated to the new Inventory model, eBay automatically creates an inventory item group object for the listing, and the seller will be able to retrieve and manage that new inventory item group object by using the value in this field. Occurrence: Conditional |
responses.inventoryItems | array of InventoryItemListing | This container exists of an array of SKU values and offer IDs. For single-variation listings, this will only be one SKU value and one offer ID (if listing was successfully migrated), but multiple SKU values and offer IDs will be returned for multiple-variation listings. Occurrence: Always |
responses.inventoryItems.offerId | string | Upon a successful migration of a listing, eBay auto-generates this unique identifier, and this offer ID value will be used to retrieve and manage the newly-created offer object. This value will only be generated and returned if the eBay listing is migrated successfully. Occurrence: Conditional |
responses.inventoryItems.sku | string | This is the seller-defined SKU value associated with the item(s) in a listing. This same SKU value will be used to retrieve and manage the newly-created inventory item object if the listing migration is successful. This SKU value will get returned even if the migration is not successful. Occurrence: Always |
responses.listingId | string | The unique identifier of the eBay listing that the seller attempted to migrate. Occurrence: Always |
responses.marketplaceId | MarketplaceEnum | This is the unique identifier of the eBay Marketplace where the listing resides. The value fo the eBay US site will be Occurrence: Always |
responses.statusCode | integer | This field is returned for each listing that the seller attempted to migrate. See the HTTP status codes table to see which each status code indicates. Occurrence: Always |
responses.warnings | array of ErrorDetailV3 | If one or more warnings occur with the attempt to migrate the listing, this container will be returned with detailed information on each warning. It is possible that a listing can be successfully migrated even if a warning occurs. Occurrence: Conditional |
responses.warnings.category | string | This string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors. Occurrence: Conditional |
responses.warnings.domain | string | The name of the domain in which the error or warning occurred. Occurrence: Conditional |
responses.warnings.errorId | integer | A unique code that identifies the particular error or warning that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms. Occurrence: Conditional |
responses.warnings.inputRefIds | array of string | An array of one or more reference IDs which identify the specific request element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
responses.warnings.longMessage | string | A detailed description of the condition that caused the error or warning, and information on what to do to correct the problem. Occurrence: Conditional |
responses.warnings.message | string | A description of the condition that caused the error or warning. Occurrence: Conditional |
responses.warnings.outputRefIds | array of string | An array of one or more reference IDs which identify the specific response element(s) most closely associated to the error or warning, if any. Occurrence: Conditional |
responses.warnings.parameters | array of ErrorParameterV3 | Various warning and error messages return one or more variables that contain contextual information about the error or waring. This is often the field or value that triggered the error or warning. Occurrence: Conditional |
responses.warnings.parameters.name | string | This type contains the name and value of an input parameter that contributed to a specific error or warning condition. Occurrence: Conditional |
responses.warnings.parameters.value | string | This is the actual value that was passed in for the element specified in the name field. Occurrence: Conditional |
responses.warnings.subdomain | string | The name of the subdomain in which the error or warning occurred. Occurrence: Conditional |
HTTP status codes
This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.
Status | Meaning |
---|---|
200 | Success |
207 | Multi-Status |
400 | Bad Request |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
25001 | API_INVENTORY | APPLICATION | Any System error. {additionalInfo} |
25718 | API_INVENTORY | REQUEST | Cannot migrate listing. {additionalInfo} |
Warnings
This call has no warnings.
Samples
New to making API calls? Please see Making a Call.
Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.
Sample 1: Bulk Migrate Listings
This call will migrate three active eBay listings to the new Inventory model. The eBay listings will remain active, and new objects will be created in the Inventory API so the items and associated offers can be managed with the Inventory API.
Input
This call will attempt to update three active listings on the eBay US site. There are no URL or query parameters for this call, and the eBay listing IDs (also known as Item IDs) are passed in under the requests container in the request payload.
POSThttps://api.ebay.com/sell/inventory/v1/bulk_migrate_listing
Output
As you can see in the output, there were three different results for the three eBay listing IDs that were passed into the request payload.
The 1**********1
listing is actually a multiple-variation listing, and based on the statusCode value of 200
and the absence of any error or warning messages, all four product variations were successfully migrated to the new Inventory model. An Inventory Item object was created for each of the four SKUs, and these four Inventory Item objects will all be identified with their SKU values. An Offer object was also created for each of the four variations, and these four Offer objects will all be identified with their offerId values. Finally, one Inventory Item Group object was created for this group of variations, and this object will be identified with its inventoryItemGroupKey value - dress_shirt_3
.
The 1**********2
listing is a single-variation listing, and based on the statusCode value of 200
and the absence of any error or warning messages, this listing was also successfully migrated to the new Inventory model. An Inventory Item object was created for this SKU, and this Inventory Item object will be identified with its SKU value. An Offer object was also created for this listing, and this Offer object will be identified with the offerId value.
The attempted migration of the 1**********3
listing failed, as indicated by the statusCode value of 400
, which indiates a Bad Request. The message field under the errors container indicates the migration failed because the eBay listing did not have a defined SKU value. To resolve this problem, the seller would have to make a ReviseFixedPriceItem call (Trading API) to add a SKU value to the listing, and then the seller could attempt the migration once more.