<?xml version="1.0"?>
<!--
/**
 * Magezon
 *
 * This source file is subject to the Magezon Software License, which is available at https://www.magezon.com/license
 * Do not edit or add to this file if you wish to upgrade the to newer versions in the future.
 * If you wish to customize this module for your needs.
 * Please refer to https://www.magezon.com for more information.
 *
 * @category  Magezon
 * @package   Magezon_PopupBuilder
 * @copyright Copyright (C) 2020 Magezon (https://www.magezon.com)
 */
-->
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/V1/popupbuilderPopup/:popupId" method="GET">
        <service class="Magezon\PopupBuilder\Api\PopupRepositoryInterface" method="get"/>
        <resources>
            <resource ref="Magezon_PopupBuilder::popup"/>
        </resources>
    </route>
    <route url="/V1/popupbuilderPopup/search" method="GET">
        <service class="Magezon\PopupBuilder\Api\PopupRepositoryInterface" method="getList"/>
        <resources>
            <resource ref="Magezon_PopupBuilder::popup"/>
        </resources>
    </route>
    <route url="/V1/popupbuilderPopup" method="POST">
        <service class="Magezon\PopupBuilder\Api\PopupRepositoryInterface" method="save"/>
        <resources>
            <resource ref="Magezon_PopupBuilder::popup"/>
        </resources>
    </route>
    <route url="/V1/popupbuilderPopup/:id" method="PUT">
        <service class="Magezon\PopupBuilder\Api\PopupRepositoryInterface" method="save"/>
        <resources>
            <resource ref="Magezon_PopupBuilder::popup"/>
        </resources>
    </route>
    <route url="/V1/popupbuilderPopup/:popupId" method="DELETE">
        <service class="Magezon\PopupBuilder\Api\PopupRepositoryInterface" method="deleteById"/>
        <resources>
            <resource ref="Magezon_PopupBuilder::popup"/>
        </resources>
    </route>
</routes>
