Serialize member ID in API

Fix #1410 & #1412