[api] fix a bug where undertaking can have no representative or address
update README-API