Get product data between 2 dates using filters in get product rest API magento2Filtering data in magento REST APIUsing searchCriteria while searching attributes in magento 2.0How to create complex search filters while doing a GET on sales orders through Magento 2 REST API?Regarding product list API to get only list of product for one store via REST API Magento2REST Api Products response not showing extension attributesMagento2 rest api error on product search on extension attributeMagento 2 Rest Api get Products List including qty fieldMagento 2 filter products by price from Rest APIUsing Magento 2 Rest API to filter on product visibilityMagento 2 Rest Api - Is this searchCriteria filter correct?

Feedback diagram

Word for giving preference to the oldest child

How did Biff return to 2015 from 1955 without a lightning strike?

Reasons for using monsters as bioweapons

Is Norway in the Single Market?

Is the EU really banning "toxic propellants" in 2020? How is that going to work?

What are the effects of the elements on 3D printed objects made with "infused" PLA

How can flights operated by the same company have such different prices when marketed by another?

Conflict between senior and junior members

Applying for mortgage when living together but only one will be on the mortgage

How do I respond appropriately to an overseas company that obtained a visa for me without hiring me?

Has the US government provided details on plans to deal with AIDS and childhood cancer?

Python π = 1 + (1/2) + (1/3) + (1/4) - (1/5) + (1/6) + (1/7) + (1/8) + (1/9) - (1/10) ...1748 Euler

How to compare files with diffrent extensions and delete extra files?

Password management for kids - what's a good way to start?

Not taking Bereavement Leave

Gold Battle KoTH

How to innovate in OR

How can a class have multiple methods without breaking the single responsibility principle

"Fewer errors means better products" or "Fewer errors mean better products"?

"Will flex for food". What does this phrase mean?

Can the additional attack from a Samurai's Rapid Strike have advantage?

Can birds evolve without trees?

Can living where magnetic ore is abundant provide any protection from cosmic radiation?



Get product data between 2 dates using filters in get product rest API magento2


Filtering data in magento REST APIUsing searchCriteria while searching attributes in magento 2.0How to create complex search filters while doing a GET on sales orders through Magento 2 REST API?Regarding product list API to get only list of product for one store via REST API Magento2REST Api Products response not showing extension attributesMagento2 rest api error on product search on extension attributeMagento 2 Rest Api get Products List including qty fieldMagento 2 filter products by price from Rest APIUsing Magento 2 Rest API to filter on product visibilityMagento 2 Rest Api - Is this searchCriteria filter correct?






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








3















I am using this API to get products between given end_date




"http://localhost/test/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=end_date&searchCriteria[filter_groups][0][filters][0][value]=2019-07-22
00:00:00&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq&searchCriteria[filter_groups][0][filters][0][field]=end_date&searchCriteria[filter_groups][0][filters][0][value]=2019-07-22
00:00:00&searchCriteria[filter_groups][0][filters][0][condition_type]=lteq"




but it is not giving me correct response. I am getting response like this



"
"items": [],
"search_criteria":
"filter_groups": [

"filters": [

"field": "end_date",
"value": "2019-07-22 00:00:00",
"condition_type": "lteq"

]

]
,
"total_count": 0
"


seems like API considering only last filter.










share|improve this question
































    3















    I am using this API to get products between given end_date




    "http://localhost/test/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=end_date&searchCriteria[filter_groups][0][filters][0][value]=2019-07-22
    00:00:00&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq&searchCriteria[filter_groups][0][filters][0][field]=end_date&searchCriteria[filter_groups][0][filters][0][value]=2019-07-22
    00:00:00&searchCriteria[filter_groups][0][filters][0][condition_type]=lteq"




    but it is not giving me correct response. I am getting response like this



    "
    "items": [],
    "search_criteria":
    "filter_groups": [

    "filters": [

    "field": "end_date",
    "value": "2019-07-22 00:00:00",
    "condition_type": "lteq"

    ]

    ]
    ,
    "total_count": 0
    "


    seems like API considering only last filter.










    share|improve this question




























      3












      3








      3








      I am using this API to get products between given end_date




      "http://localhost/test/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=end_date&searchCriteria[filter_groups][0][filters][0][value]=2019-07-22
      00:00:00&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq&searchCriteria[filter_groups][0][filters][0][field]=end_date&searchCriteria[filter_groups][0][filters][0][value]=2019-07-22
      00:00:00&searchCriteria[filter_groups][0][filters][0][condition_type]=lteq"




      but it is not giving me correct response. I am getting response like this



      "
      "items": [],
      "search_criteria":
      "filter_groups": [

      "filters": [

      "field": "end_date",
      "value": "2019-07-22 00:00:00",
      "condition_type": "lteq"

      ]

      ]
      ,
      "total_count": 0
      "


      seems like API considering only last filter.










      share|improve this question
















      I am using this API to get products between given end_date




      "http://localhost/test/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=end_date&searchCriteria[filter_groups][0][filters][0][value]=2019-07-22
      00:00:00&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq&searchCriteria[filter_groups][0][filters][0][field]=end_date&searchCriteria[filter_groups][0][filters][0][value]=2019-07-22
      00:00:00&searchCriteria[filter_groups][0][filters][0][condition_type]=lteq"




      but it is not giving me correct response. I am getting response like this



      "
      "items": [],
      "search_criteria":
      "filter_groups": [

      "filters": [

      "field": "end_date",
      "value": "2019-07-22 00:00:00",
      "condition_type": "lteq"

      ]

      ]
      ,
      "total_count": 0
      "


      seems like API considering only last filter.







      magento2 product rest-api






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 23 at 10:50









      MSA

      1,6804 silver badges19 bronze badges




      1,6804 silver badges19 bronze badges










      asked Jul 23 at 9:33









      vartika sharmavartika sharma

      234 bronze badges




      234 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          1














          Try this



          http://localhost/test/rest/V1/products?
          searchCriteria[filter_groups][0][filters][0][field]=created_at&
          searchCriteria[filter_groups][0][filters][0][condition_type]=from&
          searchCriteria[filter_groups][0][filters][0][value]=2019-07-22 00:00:00&
          searchCriteria[filter_groups][1][filters][0][field]=created_at&
          searchCriteria[filter_groups][1][filters][0][condition_type]=to&
          searchCriteria[filter_groups][1][filters][0][value]=2019-07-23 23:59:59


          I hope this will help






          share|improve this answer



























            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%2f282973%2fget-product-data-between-2-dates-using-filters-in-get-product-rest-api-magento2%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Try this



            http://localhost/test/rest/V1/products?
            searchCriteria[filter_groups][0][filters][0][field]=created_at&
            searchCriteria[filter_groups][0][filters][0][condition_type]=from&
            searchCriteria[filter_groups][0][filters][0][value]=2019-07-22 00:00:00&
            searchCriteria[filter_groups][1][filters][0][field]=created_at&
            searchCriteria[filter_groups][1][filters][0][condition_type]=to&
            searchCriteria[filter_groups][1][filters][0][value]=2019-07-23 23:59:59


            I hope this will help






            share|improve this answer





























              1














              Try this



              http://localhost/test/rest/V1/products?
              searchCriteria[filter_groups][0][filters][0][field]=created_at&
              searchCriteria[filter_groups][0][filters][0][condition_type]=from&
              searchCriteria[filter_groups][0][filters][0][value]=2019-07-22 00:00:00&
              searchCriteria[filter_groups][1][filters][0][field]=created_at&
              searchCriteria[filter_groups][1][filters][0][condition_type]=to&
              searchCriteria[filter_groups][1][filters][0][value]=2019-07-23 23:59:59


              I hope this will help






              share|improve this answer



























                1












                1








                1







                Try this



                http://localhost/test/rest/V1/products?
                searchCriteria[filter_groups][0][filters][0][field]=created_at&
                searchCriteria[filter_groups][0][filters][0][condition_type]=from&
                searchCriteria[filter_groups][0][filters][0][value]=2019-07-22 00:00:00&
                searchCriteria[filter_groups][1][filters][0][field]=created_at&
                searchCriteria[filter_groups][1][filters][0][condition_type]=to&
                searchCriteria[filter_groups][1][filters][0][value]=2019-07-23 23:59:59


                I hope this will help






                share|improve this answer













                Try this



                http://localhost/test/rest/V1/products?
                searchCriteria[filter_groups][0][filters][0][field]=created_at&
                searchCriteria[filter_groups][0][filters][0][condition_type]=from&
                searchCriteria[filter_groups][0][filters][0][value]=2019-07-22 00:00:00&
                searchCriteria[filter_groups][1][filters][0][field]=created_at&
                searchCriteria[filter_groups][1][filters][0][condition_type]=to&
                searchCriteria[filter_groups][1][filters][0][value]=2019-07-23 23:59:59


                I hope this will help







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jul 23 at 9:43









                Muhammad HashamMuhammad Hasham

                5,90610 gold badges31 silver badges81 bronze badges




                5,90610 gold badges31 silver badges81 bronze badges






























                    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%2f282973%2fget-product-data-between-2-dates-using-filters-in-get-product-rest-api-magento2%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

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

                    Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                    Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?