Added response format for REST categories

Also added som extra format/type checks to responses