changed REST API PUT to use JSON
Added constraint checks for record types