TURKERL adlı üyeden alıntı: mesajı görüntüle
Basit diyen arkadaş Neye göre basit anlatsaydı iki dakika gösterseydi bari eline mi yapışırdı tam olarak ürünün nesini çekmek istiyorsun neye göre çekmek istiyorsun
https://developers.trendyol.com/docs...run-filtreleme
burada kodlar var ilgili ürüne ait stok kodu barkod veya idye göre ürünü çekebilirsin
<?php
// Trendyol API erişim bilgileri
$supplierId = ''; // Tedarikçi ID'nizi buraya yazın
$apiKey = ''; // API Key'inizi buraya yazın
$apiSecret = ''; // API Secret'ınızı buraya yazın

// API URL'si
$apiUrl = "https://api.trendyol.com/sapigw/suppliers/{$supplierId}/products?approved=true";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Basic ' . base64_encode($apiKey . ':' . $apiSecret),
'Content-Type: application/json'
]);

$response = curl_exec($ch);

if (curl_errno($ch)) {
echo 'cURL Hatası: ' . curl_error($ch);
curl_close($ch);
exit;
}

curl_close($ch);

$data = json_decode($response, true);

print_r($data);
?>