PHP code example of nogrod / tyre24-seller-php-sdk

1. Go to this page and download the library: Download nogrod/tyre24-seller-php-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nogrod / tyre24-seller-php-sdk example snippets





 Configure Bearer (JWT) authorization: OAuthAccessToken
$config = Tyre24\Seller\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: X-AUTH-TOKEN
$config = Tyre24\Seller\Configuration::getDefaultConfiguration()->setApiKey('X-AUTH-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Tyre24\Seller\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AUTH-TOKEN', 'Bearer');


$apiInstance = new Tyre24\Seller\Api\ArticlesApi(
    // 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
);
$country = de; // string | country code in ISO 3166-1 alpha-2 (lowercase 2-letter country code).
$article_type = K; // string | The article type. For a full list of available types, please refer to the endpoint `/common/article-types`.
$article_id = 123456; // int | Alzura article id.
$customer_article_id = 10KRXS-20; // string | Original customer article id.
$manufacturer_number = Alzura Manufacturer; // string | The manufacturer number (valid if used with either the manufacturer name or the the brand id).
$manufacturer_name = 1234567891200; // string | The manufacturer name (valid if used with the manufacturer number).
$brand_id = 10; // int | The brand id (valid if used with the manufacturer number).
$ean = 0101093311309; // string | The article EAN.
$oen = 4902429499439; // string | The article OEN.

try {
    $apiInstance->deleteAvailableStockByArticleNumberForSeller($country, $article_type, $article_id, $customer_article_id, $manufacturer_number, $manufacturer_name, $brand_id, $ean, $oen);
} catch (Exception $e) {
    echo 'Exception when calling ArticlesApi->deleteAvailableStockByArticleNumberForSeller: ', $e->getMessage(), PHP_EOL;
}

json
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/nogrod/tyre24-seller-php-sdk.git"
    }
  ],
  "