I've began creating a module for a rest api for creditmemos - which I intend on using as an alternative to the built in version.
At the moment I've started the normal way for creating a webapi module, by creating a
webapi.xml which links to an interface. I've taken a slight tangent by creating a
preference tag in my
di.xml like so;
<?xml version="1.0" encoding="UTF-8"?> <config> <preference for="Vendor\Module\Api\MemoInterface" type="\Magento\Sales\Model\Order\CreditmemoRepository"/> </config>
This actually has worked.
I need to know how I can get more control over the data that is output than the default api. At the moment there is a large mass of data which is output and I'm unsure how to limit and curate this data.