Cloudbeds interview question

Write the endpoints based on the given requirements