Fully working api. Manually tested (UT incoming).