Rework api route and update documentation