Sample Code for API consumers