example for api consume