Skip to content

Instantly share code, notes, and snippets.

@zzpaul
Created September 27, 2016 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zzpaul/ef363fceb84227d3c0234590e6eacea1 to your computer and use it in GitHub Desktop.
Save zzpaul/ef363fceb84227d3c0234590e6eacea1 to your computer and use it in GitHub Desktop.
Magento 2 - Custom REST API - etc/webapi.xml
<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/module-webapi/etc/webapi.xsd">
<route url="/V1/BonusPoint/updateFreeBonusPoint" method="POST">
<service class="Vendor\BonusPoint\Api\BonusPointInterface" method="updateFreeBonusPoint"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
</routes>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment