Tria Federal interview question

How would you improve this API?