We need to add permissions to each API endpoint to ensure these can't be accessed from unauthorized users (as then they'd be able to change pricing etc.).
Take a look at how Craft Commerce secures their controllers for reference.
You wanna use this method if possible. I doubt the Yii rest controller I'm using has this method but it's only a couple of lines so it's probably easier to copy/paste.
We need to add permissions to each API endpoint to ensure these can't be accessed from unauthorized users (as then they'd be able to change pricing etc.).
Take a look at how Craft Commerce secures their controllers for reference.