# Update a Product By Code Update Product Existing You must have "EDIT" role in "Products" Module OR "EDIT" role in "Global" Module Endpoint: PUT /Product Version: 3.1.0 Security: OAuth2_clientCredentials ## Request fields (application/json): - `Category` (string, required) The name of the category that will be use, you also can create new category. If you want to nest a category use a "/" operator ex: "Food/Snack/Pastries" will create 3 level category - `Name` (string, required) The name of the product to be created. - `Brand` (string) The name of the brand to be created. Backwards compatibility with property "BrandName" - `Code` (string, required) the code of the product to be created. - `Discontinued` (boolean, required) The product availability for selling. - `ImageURL` (string) The image link of the product to be created. - `ExtraImagesURL` (array) Image link of additional image in product - `Description` (string) The description of the product. - `Variants` (array) - `Variants.Model` (string, required) The name of the variant to be created. - `Variants.Code` (string, required) The code of the variant to be created. - `Variants.UnitCost` (integer) The cost of the variant to be created. - `Variants.UnitPrice` (integer) The price of the variant to be created. - `Variants.Discontinued` (boolean, required) The variant availability for selling. - `Variants.VariantDescription` (string) The description of the product to be inserted. ## Response 200 fields (application/json): - `ID` (string) Example: "9525a6b0-297f-4b4a-97c7-0ae876bb44cd" - `Variants` (array) Example: [{"Code":"1000S","ID":"9ad47be6-bf1c-4dd5-87a8-193fe56d1035"},{"Code":"1000M","ID":"b3d68610-22a5-445d-8c5c-c79487373aa2"}] - `Variants.Code` (string) - `ListVariantID` (array) Example: ["9ad47be6-bf1c-4dd5-87a8-193fe56d1035","b3d68610-22a5-445d-8c5c-c79487373aa2"] ## Response 400 fields (application/json): - `Message` (string) ## Response 500 fields (application/json): - `Message` (string) - `ExceptionMessage` (string) - `ExceptionType` (string) - `StackTrace` (string)