Use the Catalog API to search the eBay catalog for products on which to base a seller's item listing; to retrieve a product record by its eBay product identifier (ePID); to submit a catalog change request to modify an existing product or create a new product; and to manage catalog change requests.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/nopolabs/ebay_commerce_catalog_v1_beta_oas2_php.git"
}
],
"require": {
"nopolabs/ebay_commerce_catalog_v1_beta_oas2_php": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/ebay_commerce_catalog_v1_beta_oas2_php/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: Authorization Code
$config = Nopolabs\EBay\Commerce\Catalog\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Nopolabs\EBay\Commerce\Catalog\Api\ChangeRequestApi(
// 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
);
$x_ebay_c_marketplace_id = "x_ebay_c_marketplace_id_example"; // string | Use this header to identify the authenticated user's business context. This header is currently limited to EBAY_US, EBAY_AU, EBAY_CA, and EBAY_GB values. If not included with your request, the marketplace value defaults to EBAY_US. Note that it does not indicate a language preference or end-user location.
$accept_language = "accept_language_example"; // string | Use this header to specify the natural language in which the authenticated user desires the response.
$body = new \Nopolabs\EBay\Commerce\Catalog\Model\CreateChangeRequestPayload(); // \Nopolabs\EBay\Commerce\Catalog\Model\CreateChangeRequestPayload | Contains the full details of a specified catalog change request, including the type of request, the reason for a product update request, and the details of the new or updated product being suggested.
try {
$apiInstance->createChangeRequest($x_ebay_c_marketplace_id, $accept_language, $body);
} catch (Exception $e) {
echo 'Exception when calling ChangeRequestApi->createChangeRequest: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://api.ebay.com/commerce/catalog/v1
Class | Method | HTTP request | Description |
---|---|---|---|
ChangeRequestApi | createChangeRequest | POST /change_request | |
ChangeRequestApi | getChangeRequest | GET /change_request/{change_request_id} | |
ChangeRequestApi | getChangeRequests | GET /change_request | |
ProductApi | getProduct | GET /product/{epid} | |
ProductMetadataApi | getProductMetadata | GET /get_product_metadata | |
ProductMetadataApi | getProductMetadataForCategories | GET /get_product_metadata_for_categories | |
ProductSummaryApi | search | GET /product_summary/search |
- Aspect
- AspectDistribution
- AspectValueDistribution
- CategoryAspect
- CategoryAspectValue
- ChangeRequest
- ConflictingProduct
- Correction
- CorrectionAspectValue
- CorrectionAspectValues
- CorrectionProductAttribute
- CreateChangeRequestPayload
- GetChangeRequestsResponse
- Image
- ProcessResolution
- Product
- ProductAspect
- ProductAspectConstraint
- ProductAspectValue
- ProductIdentifier
- ProductIdentifierConstraint
- ProductIdentifierForProductMetadata
- ProductMetadata
- ProductMetadataAspect
- ProductMetadataForCategories
- ProductSearchResponse
- ProductSummary
- Refinement
- SuggestedProduct
- ValueConstraint
- Violation
- ViolationAspectValues
- ViolationProductAttribute
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://auth.ebay.com/oauth2/authorize
- Scopes:
- https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly: This scope would allow signed in user to read catalog data.
- https://api.ebay.com/oauth/api_scope/sell.inventory: View and manage your inventory and offers
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes:
- https://api.ebay.com/oauth/api_scope: View public data from eBay