update app code for api call