Improvements on rest api and serializers