Working with REST APIs was named in nearly every mobile advert we read, junior or senior, Ghanaian or remote. Prices, orders, user profiles and messages all come from servers. Your app must ask for them, understand the answer and cope gracefully when the network is slow or gone.
What an API is
An API is a set of addresses (URLs) on a server that your app can call. A REST API uses standard HTTP methods:
GETto read data, such as a list of productsPOSTto create something, such as a new orderPUTorPATCHto updateDELETEto remove
The server replies with a status code (200 means OK, 404 means not found, 500 means a server error) and usually a body in JSON, a text format made of objects and lists:
{ "name": "Rice 5kg", "price": 120, "inStock": true }