AfterShip interview question

What is API and Webhook? Give live examples from daily life.