logic for status related APIs