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

                    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