Made API entities serialisable