numerogeek / ebay-browse-api
<p>The Browse API has the following resources:</p> <ul> <li><b> item_summary: </b> Lets shoppers search for specific items by keyword, GTIN, category, charity, product, image </b><a href="/api-docs/static/versioning.html#experimental " target="_blank"><img src="/cms/img/docs/experimental-icon.svg"
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-10-18 22:11:07 UTC
README
The Browse API has the following resources:
- item_summary: Lets shoppers search for specific items by keyword, GTIN, category, charity, product, image (Experimental Method), or item aspects and refine the results by using filters, such as aspects, compatibility, and fields values, or UI parameters.
- item:
- Lets you retrieve the details of a specific item or all the items in an item group, which is an item with variations such as color and size and check if a product is compatible with the specified item, such as if a specific car is compatible with a specific part.
- Provides a bridge between the eBay legacy APIs, such as Finding, and the RESTful APIs, which use different formats for the item IDs.
The item_summary, search_by_image, and item resource calls require an Application access token.
Installation & Usage
Requirements
PHP 7.4 and later. Should also work with PHP 8.0.
Composer
To install the bindings via Composer, add the following to composer.json
:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/numerogeek/ebay-browse-api.git" } ], "require": { "numerogeek/ebay-browse-api": "*@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\EbayBrowseClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new OpenAPI\EbayBrowseClient\Api\ItemApi( // 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 ); $item_id = 'item_id_example'; // string | The eBay RESTful identifier of an item (such as a part you want to check). This ID is returned by the <b> Browse</b> and <b> Feed</b> API methods. <br><br> <b> RESTful Item ID Format: </b><code>v1</code>|<code><i>#</i></code>|<code><i>#</i></code> <br>For example: <code>v1|2**********2|0</code> or <code>v1|1**********2|4**********2</code> <br><br>For more information about item ID for RESTful APIs, see the <a href=\"/api-docs/buy/static/api-browse.html#Legacy\">Legacy API compatibility</a> section of the <i>Buy APIs Overview</i>. $x_ebay_c_marketplace_id = 'x_ebay_c_marketplace_id_example'; // string | The ID of the eBay marketplace you want to use. <b> Note: </b> This value is case sensitive.<br><br>For example: <br> <code>X-EBAY-C-MARKETPLACE-ID = EBAY_US</code> <br><br> For a list of supported sites see, <a href=\"/api-docs/buy/browse/overview.html#API\">API Restrictions</a>. $compatibility_payload = new \OpenAPI\EbayBrowseClient\Model\CompatibilityPayload(); // \OpenAPI\EbayBrowseClient\Model\CompatibilityPayload try { $result = $apiInstance->checkCompatibility($item_id, $x_ebay_c_marketplace_id, $compatibility_payload); print_r($result); } catch (Exception $e) { echo 'Exception when calling ItemApi->checkCompatibility: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api.ebay.com/buy/browse/v1
Models
- AdditionalProductIdentity
- AddonService
- Address
- Amount
- Aspect
- AspectDistribution
- AspectGroup
- AspectValueDistribution
- AttributeNameValue
- AuthenticityGuaranteeProgram
- AuthenticityVerificationProgram
- AutoCorrections
- AvailableCoupon
- BuyingOptionDistribution
- Category
- CategoryDistribution
- CommonDescriptions
- CompatibilityPayload
- CompatibilityProperty
- CompatibilityResponse
- ConditionDistribution
- ConvertedAmount
- CoreItem
- CouponConstraint
- Error
- ErrorParameter
- EstimatedAvailability
- HazardPictogram
- HazardStatement
- HazardousMaterialsLabels
- Image
- Item
- ItemGroup
- ItemGroupSummary
- ItemLocationImpl
- ItemReturnTerms
- ItemSummary
- Items
- LegalAddress
- MarketingPrice
- PaymentMethod
- PaymentMethodBrand
- PickupOptionSummary
- Product
- ProductIdentity
- RatingHistogram
- Refinement
- Region
- ReviewRating
- SearchByImageRequest
- SearchPagedCollection
- Seller
- SellerCustomPolicy
- SellerDetail
- SellerLegalInfo
- ShipToLocation
- ShipToLocations
- ShipToRegion
- ShippingOption
- ShippingOptionSummary
- TargetLocation
- TaxJurisdiction
- Taxes
- TimeDuration
- TypedNameValue
- VatDetail
Authorization
api_auth
- Type:
OAuth
- Flow:
application
- Authorization URL: ``
- Scopes:
- https://api.ebay.com/oauth/api_scope/buy.item.bulk: Retrieve eBay items in bulk.
- https://api.ebay.com/oauth/api_scope: View public data from eBay
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.18.4
- Package version:
1.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen