amorvan / ebay-sell-inventory-php-client
The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay marketplace. There are also methods in this API that will convert eligible, active eBay listings into the Inventory API model.
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-12-11 00:04:14 UTC
README
The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay marketplace. There are also methods in this API that will convert eligible, active eBay listings into the Inventory API model.
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/zvps/ebay-sell-inventory-php-client.git" } ], "require": { "zvps/ebay-sell-inventory-php-client": "*@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: Authorization Code $config = Ebay\Sell\Inventory\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Ebay\Sell\Inventory\Api\InventoryItemApi( // 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 ); $body = new \Ebay\Sell\Inventory\Model\BulkInventoryItem(); // \Ebay\Sell\Inventory\Model\BulkInventoryItem | Details of the inventories with sku and locale try { $result = $apiInstance->bulkCreateOrReplaceInventoryItem($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling InventoryItemApi->bulkCreateOrReplaceInventoryItem: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api.ebay.com/sell/inventory/v1
Models
- Address
- Amount
- Availability
- AvailabilityDistribution
- AvailabilityWithAll
- BaseResponse
- BestOffer
- BulkEbayOfferDetailsWithKeys
- BulkGetInventoryItem
- BulkGetInventoryItemResponse
- BulkInventoryItem
- BulkInventoryItemResponse
- BulkMigrateListing
- BulkMigrateListingResponse
- BulkOffer
- BulkOfferResponse
- BulkPriceQuantity
- BulkPriceQuantityResponse
- BulkPublishResponse
- Charity
- Compatibility
- CompatibleProduct
- Dimension
- EbayOfferDetailsWithAll
- EbayOfferDetailsWithId
- EbayOfferDetailsWithKeys
- Error
- ErrorParameter
- Fee
- FeeSummary
- FeesSummaryResponse
- FormatAllocation
- GeoCoordinates
- GetInventoryItem
- GetInventoryItemResponse
- Interval
- InventoryItem
- InventoryItemGroup
- InventoryItemListing
- InventoryItemResponse
- InventoryItemWithSkuLocale
- InventoryItemWithSkuLocaleGroupKeys
- InventoryItemWithSkuLocaleGroupid
- InventoryItems
- InventoryLocation
- InventoryLocationFull
- InventoryLocationResponse
- ListingDetails
- ListingPolicies
- Location
- LocationDetails
- LocationResponse
- MigrateListing
- MigrateListingResponse
- NameValueList
- OfferKeyWithId
- OfferKeysWithId
- OfferPriceQuantity
- OfferResponse
- OfferResponseWithListingId
- OfferSkuResponse
- Offers
- OperatingHours
- PackageWeightAndSize
- PickupAtLocationAvailability
- PriceQuantity
- PriceQuantityResponse
- PricingSummary
- Product
- ProductFamilyProperties
- ProductIdentifier
- PublishByInventoryItemGroupRequest
- PublishResponse
- ShipToLocationAvailability
- ShipToLocationAvailabilityWithAll
- ShippingCostOverride
- SpecialHours
- Specification
- Tax
- TimeDuration
- VariesBy
- Version
- Weight
- WithdrawByInventoryItemGroupRequest
- WithdrawResponse
Authorization
Authorization Code
- Type:
OAuth
- Flow:
accessCode
- Authorization URL:
https://auth.ebay.com/oauth2/authorize
- Scopes:
- https://api.ebay.com/oauth/api_scope/sell.inventory: View and manage your inventory and offers
- https://api.ebay.com/oauth/api_scope/sell.inventory.readonly: View your inventory and offers
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:
1.14.0
- Package version:
5.0.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen