Consuming the API on the client side