otto / marketplace-php-sdk
This package is abandoned and no longer maintained.
No replacement package was suggested.
Otto Market PHP SDK
0.2.3
2022-02-28 12:09 UTC
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.2
- league/oauth2-client: ^2.6
- monolog/monolog: ^2.2
- phpunit/phpunit: ^9
- psr/log: ^1.1
Requires (Dev)
- squizlabs/php_codesniffer: ^3.5
- vimeo/psalm: ^4.6
README
Deprecation Notice!
After 31.03.2023 we will not support the sdk anymore. There will be no further development.
Notice!
Only products and shipments are currently supported. Other interfaces will follow!
Introduction
The otto market PHP SDK is an easy way for developers to access the otto market api in their php code, and build their programs on top of that. A detailed documentation about all interfaces can be found at our documentation.
Jump to:
Requirements
- Sign up for Otto Market – You need a working seller account. Register here and fetch your credentials.
- Minimum requirements – To run the SDK, your system needs PHP >= 7.4.
Installation
To use the SDK we recommend using Composer. It is available via Packagist under the otto/marketplace-php-sdk
.
You can include the SDK in your project using the following in the root directory of your project.:
composer require otto/marketplace-php-sdk
Use of the SDK
Set a new deliveryType and deliveryTime
<?php use Otto\Market\Client\Configuration; use Otto\Market\Products\Model\Delivery; use Otto\Market\Client\PartnerApiClient; // Configure the client $configuration = Configuration::forLive('my-api-username', 'my-api-password'); $client = new PartnerApiClient($configuration); // Update the delivery information for all products $myProducts = $client->getPartnerProductClient()->getProducts(); foreach ($myProducts as $productVariation) { $delivery = new Delivery(); $delivery->setType('PARCEL'); $delivery->setDeliveryTime(2); $productVariation->setDelivery($delivery); } // Save the updated products $client->getPartnerProductClient()->postProducts($myProducts);
Example CLI Client
For an implemented example go to samples.
Features
We offer the following methods for usage:
- products
- get brands
- get categories
- get category definition from category
- get products
- post products from json
- get activeStatus
- post activeStatus
- get marketplaceStatus
- shipments
- get shipments
- post shipments
Resources
- License – see Apache 2.0 License