There are understandably quite a few rules when it comes to sanitary plumbing. This is work you need to hire a professional to carry out.
You can replace a toilet in an existing bathroom without building consent. You can also move your toilet, for example, if you’re combining a separate toilet and bathroom into one space.
Note: You'll need to apply for building consent if you want to increase the number of toilets in your home.
Exempt building work guidance: Technical requirements for the repair, maintenance and replacement of sanitary plumbing and drainage
Visit the Building Performance website for everything you need to know before you start building work that is exempt from the building consent process, including who you should engage to do the work, what rules to follow and where to go to for advice: Building work that doesn't need a building consent