A washing machine comprising: a cabinet; a tub disposed in the cabinet; and a detergent supply apparatus configured to supply a detergent to the tub, wherein the detergent supply apparatus comprises: a detergent container accommodating housing installed in the cabinet, and having an opening in the front portion of the cabinet; a detergent container configured to store the detergent, and to be removably inserted into the detergent container accommodating housing through the opening of the detergent container accommodating housing; and a detergent container cover disposed on top of the detergent container and having a detergent inlet through which the detergent is loaded into the detergent container, a pump unit (220, 320, 420, 520) configured to pump the detergent from the detergent container to the detergent container accommodating housing; a connector unit (250, 350, 450) configured to supply power to the pump unit, and including a first body (230, 330, 430, 530) disposed at the detergent container and a second body (240, 340, 440, 540) disposed at the detergent container accommodating housing, such that the first body is coupled with the second body and electrically connected to the second body when the detergent container is accommodated in the detergent container accommodating housing; characterized in that the washing machine further comprises a controller configured to determine that the detergent container is properly accommodated in the detergent container accommodating housing when the first body is electrically connected to the second body. a cabinet; a tub disposed in the cabinet; and a detergent supply apparatus configured to supply a detergent to the tub, wherein the detergent supply apparatus comprises: a detergent container accommodating housing installed in the cabinet, and having an opening in the front portion of the cabinet; a detergent container configured to store the detergent, and to be removably inserted into the detergent container accommodating housing through the opening of the detergent container accommodating housing; and a detergent container cover disposed on top of the detergent container and having a detergent inlet through which the detergent is loaded into the detergent container, a pump unit (220, 320, 420, 520) configured to pump the detergent from the detergent container to the detergent container accommodating housing; a connector unit (250, 350, 450) configured to supply power to the pump unit, and including a first body (230, 330, 430, 530) disposed at the detergent container and a second body (240, 340, 440, 540) disposed at the detergent container accommodating housing, such that the first body is coupled with the second body and electrically connected to the second body when the detergent container is accommodated in the detergent container accommodating housing; characterized in that the washing machine further comprises a controller configured to determine that the detergent container is properly accommodated in the detergent container accommodating housing when the first body is electrically connected to the second body. a detergent container accommodating housing installed in the cabinet, and having an opening in the front portion of the cabinet; a detergent container configured to store the detergent, and to be removably inserted into the detergent container accommodating housing through the opening of the detergent container accommodating housing; and a detergent container cover disposed on top of the detergent container and having a detergent inlet through which the detergent is loaded into the detergent container, a pump unit (220, 320, 420, 520) configured to pump the detergent from the detergent container to the detergent container accommodating housing; a connector unit (250, 350, 450) configured to supply power to the pump unit, and including a first body (230, 330, 430, 530) disposed at the detergent container and a second body (240, 340, 440, 540) disposed at the detergent container accommodating housing, such that the first body is coupled with the second body and electrically connected to the second body when the detergent container is accommodated in the detergent container accommodating housing; characterized in that the washing machine further comprises a controller configured to determine that the detergent container is properly accommodated in the detergent container accommodating housing when the first body is electrically connected to the second body.