Sage interview question

What is an API, and how do you implement it in code?