Not getting any value while searching the products using REST APIFiltering data in magento REST APIHow to use V1/search to get the names and SKU's of the magento productsSort Products REST API : Magento 2GET products for my cart with customer tokenHow to load another language variables by REST APIMagento2 : Getting error while updating the data using APIAdd Configurable products using REST APIgetting “Consumer is not authorized to access %resources” when using rest API in magento2Getting error while set shipping estimation using REST APIhow to add js in custom form in backend magento 2

Should I report a leak of confidential HR information?

How hard is it to sell a home which is currently mortgaged?

How exactly is a normal force exerted, at the molecular level?

Why do I need two parameters in an HTTP parameter pollution attack?

Can I travel from Germany to England alone as an unaccompanied minor?

How can I write a panicked scene without it feeling like it was written in haste?

How did installing this RPM create a file?

Can a function nowhere continuous have a connected graph?

What could a reptilian race tell by candling their eggs?

Security Patch SUPEE-11155 - Possible issues?

Why do we use a cylinder as a Gaussian surface for infinitely long charged wire?

How can I deal with extreme temperatures in a hotel room?

One folder having two different locations on Ubuntu 18.04

How to securely dispose of a smartphone?

Should I share with a new service provider a bill from its competitor?

Is it bad to describe a character long after their introduction?

Lifting a probability measure to the power set

Balanced parentheses using STL C++

Why do changes to /etc/hosts take effect immediately?

Perl 6 multi methods never match expected signature

Who voices the character "Finger" in The Fifth Element?

Why was Mal so quick to drop Bester in favour of Kaylee?

Handling a player (unintentionally) stealing the spotlight

Is it legal to call shared_future::get() multiple times on the same instance in the same thread?



Not getting any value while searching the products using REST API


Filtering data in magento REST APIHow to use V1/search to get the names and SKU's of the magento productsSort Products REST API : Magento 2GET products for my cart with customer tokenHow to load another language variables by REST APIMagento2 : Getting error while updating the data using APIAdd Configurable products using REST APIgetting “Consumer is not authorized to access %resources” when using rest API in magento2Getting error while set shipping estimation using REST APIhow to add js in custom form in backend magento 2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am searching product as per product sku and name using the end point API of magento2 but for some search text no value is coming. I am explaining my code below.



There is one product present which is given below.



"id":124,
"sku":"Birthday Cake",
"name":"Birthday Cakes",


When I am searching this product using the following code its returning null as output.



$stext='Cake';
$searchText='%'.$stext.'%';
$ch = curl_init('http://abcd.com/index.php/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=name&searchCriteria[filterGroups][0][filters][0][value]='.$searchText.'&searchCriteria[filterGroups][0][filters][0][conditionType]=like&searchCriteria[filterGroups][0][filters][1][field]=sku&searchCriteria[filterGroups][0][filters][1][value]='.$searchText.'&searchCriteria[filterGroups][0][filters][1][conditionType]=like');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));
$res = curl_exec($ch);
$resu = json_decode($res, 1);
echo json_encode($resu);


Here I need to check the similar keyword. For this $stext='Cake' the output is coming null but for $stext='Birthday' the proper output is coming. Again when I am searching $stext='Birthday Cake' no output is coming.



Here I need to do the text search as per name and sku.










share|improve this question




























    0















    I am searching product as per product sku and name using the end point API of magento2 but for some search text no value is coming. I am explaining my code below.



    There is one product present which is given below.



    "id":124,
    "sku":"Birthday Cake",
    "name":"Birthday Cakes",


    When I am searching this product using the following code its returning null as output.



    $stext='Cake';
    $searchText='%'.$stext.'%';
    $ch = curl_init('http://abcd.com/index.php/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=name&searchCriteria[filterGroups][0][filters][0][value]='.$searchText.'&searchCriteria[filterGroups][0][filters][0][conditionType]=like&searchCriteria[filterGroups][0][filters][1][field]=sku&searchCriteria[filterGroups][0][filters][1][value]='.$searchText.'&searchCriteria[filterGroups][0][filters][1][conditionType]=like');
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));
    $res = curl_exec($ch);
    $resu = json_decode($res, 1);
    echo json_encode($resu);


    Here I need to check the similar keyword. For this $stext='Cake' the output is coming null but for $stext='Birthday' the proper output is coming. Again when I am searching $stext='Birthday Cake' no output is coming.



    Here I need to do the text search as per name and sku.










    share|improve this question
























      0












      0








      0








      I am searching product as per product sku and name using the end point API of magento2 but for some search text no value is coming. I am explaining my code below.



      There is one product present which is given below.



      "id":124,
      "sku":"Birthday Cake",
      "name":"Birthday Cakes",


      When I am searching this product using the following code its returning null as output.



      $stext='Cake';
      $searchText='%'.$stext.'%';
      $ch = curl_init('http://abcd.com/index.php/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=name&searchCriteria[filterGroups][0][filters][0][value]='.$searchText.'&searchCriteria[filterGroups][0][filters][0][conditionType]=like&searchCriteria[filterGroups][0][filters][1][field]=sku&searchCriteria[filterGroups][0][filters][1][value]='.$searchText.'&searchCriteria[filterGroups][0][filters][1][conditionType]=like');
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));
      $res = curl_exec($ch);
      $resu = json_decode($res, 1);
      echo json_encode($resu);


      Here I need to check the similar keyword. For this $stext='Cake' the output is coming null but for $stext='Birthday' the proper output is coming. Again when I am searching $stext='Birthday Cake' no output is coming.



      Here I need to do the text search as per name and sku.










      share|improve this question














      I am searching product as per product sku and name using the end point API of magento2 but for some search text no value is coming. I am explaining my code below.



      There is one product present which is given below.



      "id":124,
      "sku":"Birthday Cake",
      "name":"Birthday Cakes",


      When I am searching this product using the following code its returning null as output.



      $stext='Cake';
      $searchText='%'.$stext.'%';
      $ch = curl_init('http://abcd.com/index.php/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=name&searchCriteria[filterGroups][0][filters][0][value]='.$searchText.'&searchCriteria[filterGroups][0][filters][0][conditionType]=like&searchCriteria[filterGroups][0][filters][1][field]=sku&searchCriteria[filterGroups][0][filters][1][value]='.$searchText.'&searchCriteria[filterGroups][0][filters][1][conditionType]=like');
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));
      $res = curl_exec($ch);
      $resu = json_decode($res, 1);
      echo json_encode($resu);


      Here I need to check the similar keyword. For this $stext='Cake' the output is coming null but for $stext='Birthday' the proper output is coming. Again when I am searching $stext='Birthday Cake' no output is coming.



      Here I need to do the text search as per name and sku.







      magento2 php rest-api






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 19 at 11:15









      satyasatya

      1587 bronze badges




      1587 bronze badges




















          0






          active

          oldest

          votes














          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278857%2fnot-getting-any-value-while-searching-the-products-using-rest-api%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278857%2fnot-getting-any-value-while-searching-the-products-using-rest-api%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form