Helpcenter +918010117117"
B4,309-10 Spaze iTech Park, Sector 49, Sohna Road, 122001 Gurgaon India
call to replace anchor tags contains '/admin' in href

Commands and Hooks

All entities have standard commands that are used to perform standard CRUD operations.

Standard Commands

Following are standard commands that are available by default to all global or store entities.

  • get 
  • list
  • add
  • edit
  • delete
  • duplicate
  • import
  • export

Custom Commands

Custom commands are available only in Enterprise plan.

Apart from standard commands, the user can create custom commands for any entity. 

Adding a custom command

To create a custom command for an entity, please follow these steps:

  • Go to Advance Settings > Entities in StoreHippo Admin Panel.
  • Search the entity to which you want to add the command.
  • Click on the edit button.
  • On the edit page, go toCommandstab.

<Image for commands tab will go here>

Click on Add New button. A form will appear withfollowingfields:


Enter the name of the command


Enter the HTTP method that can be used for the command. Possible values are:

  • GET
  • POST
  • PUT


Handler is the function that gets executed when the command is called.  Please refer to the section below on how to write command handlers.


Select the roles that have permission to call this command.

Extending standard commands

Hooks can be used to extend thebehaviourof standard commands. There are two types of hooks

Pre Hooks

pre hooks are executed before the command handler. If there are multiple pre hooks then they are executed in the order of priority.

Post Hooks

Post hooks are executed after the command is executed. If there are multiple pre hooks then they are executed in the order of priority.

Writing Command Handlers and Hooks

Both command handlers and hooks follow the same middleware syntax which looks as follows:

function(request, response, next) {



sessionneed to see if we need to pass the session. We probably should but leave aside the sensitive information
usercurrency, language, geolocation etc. will be part of this
appapp instance to call other APIs
moduleThird party installed apps.



send(data)will stop the execution and return the control from the current handler/hook. It will also stop the execution of any subsequent handler/hooks.
error(data)will stop execution and also return error
next()will return control from current handler but enable execution of subsequent handlers/hooks.