• 01-12-2025, 08:48:11
    #1
    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ı?
  • 01-12-2025, 08:55:44
    #2
    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:47
    #3
    compfix adlı üyeden alıntı: mesajı görüntüle
    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
    evet aynen bu şekilde yapıyorum 401
  • 01-12-2025, 09:31:51
    #4
    Kodu birlikte kontrol edelim. Whatsapp üzerinden yazdım.
  • 01-12-2025, 12:52:42
    #5
    ykyazilim adlı üyeden alıntı: mesajı görüntüle
    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ı?
    Merhaba

    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";