Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 6.64 KB

ListingApi.md

File metadata and controls

60 lines (42 loc) · 6.64 KB

SapientPro\EbayInventorySDK\ListingApi

All URIs are relative to https://api.ebay.com/sell/inventory/v1

Method HTTP request Description
bulkMigrateListing POST /bulk_migrate_listing

bulkMigrateListing

SapientPro\EbayInventorySDK\Models\BulkMigrateListingResponse bulkMigrateListing($body)

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

    <span class="tablenote">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. 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
The response payload of the Bulk Migrate Listings call will show the results of each listing migration. These results include an HTTP status code to indicate the success or failure of each listing migration, the SKU value associated with each item, and if the migration is successful, an Offer ID value. The SKU value will be used in the Inventory API to manage the Inventory Item object, and the Offer ID value will be used in the Inventory API to manage the Offer object. Errors and/or warnings containers will be returned for each listing where an error and/or warning occurred with the attempted migration.

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.

Example

<?php
use SapientPro\EbayInventorySDK\Configuration;
use SapientPro\EbayInventorySDK\Api\ListingApi;
use SapientPro\EbayInventorySDK\Models\BulkMigrateListing;

// Configure OAuth2 access token for authorization: api_auth
$config = Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new ListingApi(
    config: $config
);
$body = BulkMigrateListing::fromArray([
//
]);

try {
    $result = $apiInstance->bulkMigrateListing($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ListingApi->bulkMigrateListing: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body SapientPro\EbayInventorySDK\Models\BulkMigrateListing Details of the listings that needs to be migrated into Inventory

Return type

SapientPro\EbayInventorySDK\Models\BulkMigrateListingResponse

Authorization

api_auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]