Moved api interactions into celery task