All URIs are relative to https://api.ebay.com/sell/inventory/v1.
Method | HTTP request | Description |
---|---|---|
createOrReplaceProductCompatibility() | PUT /inventory_item/{sku}/product_compatibility | |
deleteProductCompatibility() | DELETE /inventory_item/{sku}/product_compatibility | |
getProductCompatibility() | GET /inventory_item/{sku}/product_compatibility |
createOrReplaceProductCompatibility($content_language, $sku, $body): \Ebay\Sell\Inventory\Model\BaseResponse
This call is used by the seller to create or replace a list of products that are compatible with the inventory item. The inventory item is identified with a SKU value in the URI. Product compatibility is currently only applicable to motor vehicle parts and accessory categories, but more categories may be supported in the future. In addition to the authorization header, which is required for all eBay REST API calls, the createOrReplaceProductCompatibility call also requires the Content-Language header, that sets the natural language that will be used in the field values of the request payload. For US English, the code value passed in this header should be en-US. To view other supported Content-Language values, and to read more about all supported HTTP headers for eBay REST API calls, see the HTTP request headers topic in the Using eBay RESTful APIs document.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: Authorization Code
$config = Ebay\Sell\Inventory\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Ebay\Sell\Inventory\Api\ProductCompatibilityApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$content_language = 'content_language_example'; // string | This request header sets the natural language that will be provided in the field values of the request payload.
$sku = 'sku_example'; // string | A SKU (stock keeping unit) is an unique identifier defined by a seller for a product
$body = new \Ebay\Sell\Inventory\Model\Compatibility(); // \Ebay\Sell\Inventory\Model\Compatibility | Details of the compatibility
try {
$result = $apiInstance->createOrReplaceProductCompatibility($content_language, $sku, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductCompatibilityApi->createOrReplaceProductCompatibility: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
content_language | string | This request header sets the natural language that will be provided in the field values of the request payload. | |
sku | string | A SKU (stock keeping unit) is an unique identifier defined by a seller for a product | |
body | \Ebay\Sell\Inventory\Model\Compatibility | Details of the compatibility |
\Ebay\Sell\Inventory\Model\BaseResponse
[Authorization Code](../../README.md#Authorization Code)
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteProductCompatibility($sku)
This call is used by the seller to delete the list of products that are compatible with the inventory item that is associated with the compatible product list. The inventory item is identified with a SKU value in the URI. Product compatibility is currently only applicable to motor vehicle parts and accessory categories, but more categories may be supported in the future.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: Authorization Code
$config = Ebay\Sell\Inventory\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Ebay\Sell\Inventory\Api\ProductCompatibilityApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$sku = 'sku_example'; // string | A SKU (stock keeping unit) is an unique identifier defined by a seller for a product
try {
$apiInstance->deleteProductCompatibility($sku);
} catch (Exception $e) {
echo 'Exception when calling ProductCompatibilityApi->deleteProductCompatibility: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
sku | string | A SKU (stock keeping unit) is an unique identifier defined by a seller for a product |
void (empty response body)
[Authorization Code](../../README.md#Authorization Code)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProductCompatibility($sku): \Ebay\Sell\Inventory\Model\Compatibility
This call is used by the seller to retrieve the list of products that are compatible with the inventory item. The SKU value for the inventory item is passed into the call URI, and a successful call with return the compatible vehicle list associated with this inventory item. Product compatibility is currently only applicable to motor vehicle parts and accessory categories, but more categories may be supported in the future.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: Authorization Code
$config = Ebay\Sell\Inventory\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Ebay\Sell\Inventory\Api\ProductCompatibilityApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$sku = 'sku_example'; // string | A SKU (stock keeping unit) is an unique identifier defined by a seller for a product
try {
$result = $apiInstance->getProductCompatibility($sku);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductCompatibilityApi->getProductCompatibility: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
sku | string | A SKU (stock keeping unit) is an unique identifier defined by a seller for a product |
\Ebay\Sell\Inventory\Model\Compatibility
[Authorization Code](../../README.md#Authorization Code)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]