'What is the best way to handle shipping status in an application

I am building an ecommerce which has shipping. My problem is:

I need to handle the shipping status and send a notification to a user when it changes. The api I'm using has an endpoint which gets a shipping number and it retrieves the status of it.

I haven't found any other way to do this than making a request every certain time and if it changes send a notification to the user.

I hope you can help me, thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source