inv command and implementation to api