simplifysoft/ebay-taxonomy-api

Use the Taxonomy API to discover the most appropriate eBay categories under which sellers can offer inventory items for sale, and the most likely categories under which buyers can browse or search for items to purchase. In addition, the Taxonomy API provides metadata about the required and recommend

1.0.2 2024-02-17 14:27 UTC

This package is auto-updated.

Last update: 2024-09-17 15:39:07 UTC


README

Use the Taxonomy API to discover the most appropriate eBay categories under which sellers can offer inventory items for sale, and the most likely categories under which buyers can browse or search for items to purchase. In addition, the Taxonomy API provides metadata about the required and recommended category aspects to include in listings, and also has two operations to retrieve parts compatibility information.

Installation & Usage

Requirements

PHP 7.2 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

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: api_auth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\CategoryTreeApi(
    // 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
);
$category_tree_id = 'category_tree_id_example'; // string | The unique identifier of the eBay category tree being requested.

try {
    $result = $apiInstance->fetchItemAspects($category_tree_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CategoryTreeApi->fetchItemAspects: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.ebay.com/commerce/taxonomy/v1

ClassMethodHTTP requestDescription
CategoryTreeApifetchItemAspectsGET /category_tree/{category_tree_id}/fetch_item_aspectsGet Aspects for All Leaf Categories in a Marketplace
CategoryTreeApigetCategorySubtreeGET /category_tree/{category_tree_id}/get_category_subtreeGet a Category Subtree
CategoryTreeApigetCategorySuggestionsGET /category_tree/{category_tree_id}/get_category_suggestionsGet Suggested Categories
CategoryTreeApigetCategoryTreeGET /category_tree/{category_tree_id}Get a Category Tree
CategoryTreeApigetCompatibilityPropertiesGET /category_tree/{category_tree_id}/get_compatibility_propertiesGet Compatibility Properties
CategoryTreeApigetCompatibilityPropertyValuesGET /category_tree/{category_tree_id}/get_compatibility_property_valuesGet Compatibility Property Values
CategoryTreeApigetDefaultCategoryTreeIdGET /get_default_category_tree_idGet a Default Category Tree ID
CategoryTreeApigetItemAspectsForCategoryGET /category_tree/{category_tree_id}/get_item_aspects_for_category

Models

Authorization

api_auth

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen