PHP code example of bluntk / pazarama

1. Go to this page and download the library: Download bluntk/pazarama 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/ */

    

bluntk / pazarama example snippets


$pazarama = new \bluntk\Pazarama([
            'api_key' => $this->apiKey,
            'api_secret' => $this->apiSecret
]);

$categoryTree = $pazarama->categories();

$brands = $pazarama->brands(page: 1, size: 10);

$categoryWithAttributes = $pazarama->categoryWithAttributes($id);

$sellerDeliveries = $pazarama->sellerDeliveries();

$cities = $pazarama->cities();

$data = [
        'Name' => 'Name',
        'DisplayName' => 'Display Name',
        'Description' => 'Description',
        'BrandId' => 'Marka ID',
        'Desi' => 1,
        'Code' => 'Barkod',
        'GroupCode' => 'Grup Kodu', // Gruplandırma için ana barkod
        'StockCount' => 'Stok sayısı',
        'VatRate' => 'Vergi Oranı',
        'ListPrice' => 'Liste Fiyatı',
        'SalePrice' => 'Satış Fiyatı',
        'CategoryId' => 'Kategori ID',
        'images' => [
            ['imageurl' => 'görsel url'],
            ['imageurl' => 'görsel url2']
        ],
        'attributes' => [
            [
                'attributeId' => 'AttributeID',
                'attributeValueId' => 'Attribute Value ID',
            ],
           [
                'attributeId' => 'AttributeID',
                'attributeValueId' => 'Attribute Value ID',
            ],
        ],
    ];
$product = $pazarama->createProduct();

$pazarama->productBatchRequest($batchRequestId);