ebay_commerce_catalog_v1_beta_oas2_php

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

Requirements

PHP 5.5 and later

Installation & Usage

Composer

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

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/ebay_commerce_catalog_v1_beta_oas2_php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

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;
}

?>

Documentation for API Endpoints

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

Documentation For Models

Documentation For Authorization

Authorization Code

Client Credentials

Author