update api-docs and loan functionality from api.