merhabalar,
pazaryerleri entegrasyonu için trendyol ve ticimaxdan siparişleri rahatlıkla çekebildim anak hepsiburadada bir sorun yaşıyorum.
https://oms-external-sit.hepsiburada.com/orders/merchantid/{merchantId}
dokumanında belirttiği gibi bu endpointi kullanıyorum.
authorization için yine dokumanda olduğu gibi merchantId:secret_key i base64 e çevirip gönderiyorum ancak 401 hatası veriyor, yardımcı olabilecek var mı?
Hepsiburada Sipariş Endpointi
4
●142
- 01-12-2025, 08:55:44
MERCHANT_ID="12345" SECRET_KEY="abcXYZ" AUTH=$(echo -n "$MERCHANT_ID:$SECRET_KEY" | base64) curl --request GET \ --url "https://oms-external-sit.hepsiburada.com/orders/merchantid/$MERCHANT_ID" \ --header "accept: application/json" \ --header "authorization: Basic $AUTH" \ --header "content-type: application/json"
bu şekilde mi yazıyorsun - 01-12-2025, 09:15:47evet aynen bu şekilde yapıyorum 401compfix adlı üyeden alıntı: mesajı görüntüle
- 01-12-2025, 12:52:42Merhabaykyazilim adlı üyeden alıntı: mesajı görüntüle
username password formatı ile uygulamanız gerekebilir eskiden uğraşıyordum çok hatırlamıyorum ama dener misin ?
<?php
$merchantId = "MERCHANT_ID_BURAYA";
$username = "USERNAME_BURAYA";
$password = "SECRET_KEY_BURAYA";
$credentials = base64_encode($username . ':' . $password);
$url = "https://oms-external-sit.hepsiburada.com/orders/merchantid/" . $merchantId;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Basic ' . $credentials,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "HTTP Code: " . $httpCode . "n";
echo "Response: " . $response . "n";