MT#7959 update contracts api doc

(cherry picked from commit fc4bdaf75052ca2edc0aa04ef687f8abaaf93068)
(cherry picked from commit c312b62fef2d96584b9b50c840620e5ea96788bf)
MT#7959 fix contract PUT/PATCH, tests

now that type is checked by form, it must be
properly passed by put/patch. Also error message changed.

(cherry picked from commit 526a6c1a194e66f367fb8d94e9c3327a26c49619)