Just like we did when creating a product, we can update the product by hitting the /product/{ProductId} endpoint. We specify the request type PUT using the -X flag with the curl command.
Update the lang of the product created by executing the command below,
The updateProduct function also uses monadic notation like in the saveProduct function above. The difference is that it deletes all known translations before saving the given ones.