The documentation on controllers has everything you need. An action path consists of the module ID, the name of the controller and the name of the action. In your case, the action path will be something like giftcard/gift-card/process-request
. You can use that as the action
parameter in a POST request, or you can POST directly to the action's URL (/actions/giftcard/gift-card/process-request
, where the first segment depends on your actionTrigger
setting).
You can make an AJAX request to that URL using fetch()
or an HTTP library like axios.