The rest api structure is set, return Megam::Error in case of an err.