Fix issues with POST and PUT REST API methods