added subscription endpoint sample code