Refactoring the api call with the changes of  STORE-66