PHP code example of hasokeyk / trendyol

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

    

hasokeyk / trendyol example snippets




    use Hasokeyk\trendyol\Trendyol;

    XXXXXXXXXXXXXXXXXXXX';
    $password   = 'XXXXXXXXXXXXXXXXXXXX';

    $trendyol = new Trendyol($supplierId, $username, $password);



    use Hasokeyk\trendyol\Trendyol;

    XXXXXXXXXXXXXXXXXXXX';
    $password   = 'XXXXXXXXXXXXXXXXXXXX';

    $trendyol = new Trendyol($supplierId, $username, $password);

    $trendyol_marketplace_brands = $trendyol->marketplace->TrendyolMarketplaceBrands();

    $brands = $trendyol_marketplace_brands->get_brands();
    print_r($brands);



    use Hasokeyk\trendyol\Trendyol;

    XXXXXXXXXXXXXXXXXXXX';
    $password   = 'XXXXXXXXXXXXXXXXXXXX';

    $trendyol = new Trendyol($supplierId, $username, $password);

    $trendyol_marketplace_brands = $trendyol->marketplace->TrendyolMarketplaceBrands();

    $brands = $trendyol_marketplace_brands->search_brand('Herkes Alıyo');
    print_r($brands);



    use Hasokeyk\trendyol\Trendyol;

    XXXXXXXXXXXXXXXXXXXX';
    $password   = 'XXXXXXXXXXXXXXXXXXXX';

    $trendyol = new Trendyol($supplierId, $username, $password);

    $trendyol_marketplace_categories = $trendyol->marketplace->TrendyolMarketplaceCategories();

    $categories = $trendyol_marketplace_categories->get_categories();
    print_r($categories);



    use Hasokeyk\trendyol\Trendyol;

    XXXXXXXXXXXXXXXXXXXX';
    $password   = 'XXXXXXXXXXXXXXXXXXXX';

    $trendyol = new Trendyol($supplierId, $username, $password);

    $trendyol_marketplace_categories = $trendyol->marketplace->TrendyolMarketplaceCategories();

    $categories = $trendyol_marketplace_categories->get_category_info(2610);
    print_r($categories);



    use Hasokeyk\trendyol\Trendyol;

    XXXXXXXXXXXXXXXXXXXX';
    $password   = 'XXXXXXXXXXXXXXXXXXXX';

    $trendyol = new Trendyol($supplierId, $username, $password);

    $trendyol_marketplace_order = $trendyol->marketplace->TrendyolMarketplaceOrders();

    $filter = [
        'status' => 'Created',//Created, Picking, Invoiced, Shipped ,Cancelled, Delivered, UnDelivered, Returned, Repack, UnPacked, UnSupplied
    ];
    $orders = $trendyol_marketplace_order->get_my_orders($filter);
    print_r($orders);



    use Hasokeyk\trendyol\Trendyol;

    XXXXXXXXXXXXXXXXXXXX';
    $password   = 'XXXXXXXXXXXXXXXXXXXX';

    $trendyol = new Trendyol($supplierId, $username, $password);

    $trendyol_marketplace_products = $trendyol->marketplace->TrendyolMarketplaceProducts();

    $filter    = [
        'approved' => 'true',
    ];
    $products = $trendyol_marketplace_products->get_my_products($filter);
    print_r($products);