Deloitte interview question

how to write a API from scratch