• How to call dispatch event for REST API's only in mobile devices.
  • define your event in events.xml in etc/webapi_rest in your custom module. – Ramkishan Suthar Apr 21 '19 at 4:57

This can be done by defining events.xml in webapi_rest folder.



Magento is doing the same in quote module for sending mail for specific area REST

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_model_service_quote_submit_success">
        <observer name="sendEmail" instance="Magento\Quote\Observer\Webapi\SubmitObserver" />
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.