# Discount coupons template insertion Endpoint: POST /api/discount-coupons/templates Version: 1.0.0 Security: shoptetAccessToken, shoptetPrivateApiToken ## Header parameters: - `Content-Type` (string, required) ## Request fields (application/json): - `data` (object, required) - `data.guid` (string,null) Product GUID. Must be unique if set. Generated automatically if not set. - `data.title` (string, required) Product name. MinLength 1 character, MaxLength 64 characters. Mandatory. - `data.customerGroupId` (integer) Group must exists if set. - `data.categoryGuids` (array,null) - `data.brands` (array,null) - `data.productFlags` (array,null) - `data.productFlags.code` (string, required) parameter code - `data.productFlags.condition` (string, required) or Enum: "required", "forbidden" ## Response 201 fields (application/json): - `data` (object) - `data.guid` (string, required) discount coupons template GUID - `data.title` (string, required) name of discount coupons template - `data.customerGroup` (object,null, required) group of users for whom the discount coupons shall be available. - `data.customerGroup.id` (number, required) customer group ID - `data.customerGroup.name` (string, required) customer group name - `data.categories` (array,null, required) list of categories, for which the discount coupons shall be available. - `data.categories.guid` (string, required) - `data.categories.name` (string, required) - `data.brands` (array,null, required) brands, for which the discount can be used. - `data.brands.code` (string, required) unique brand code - `data.brands.name` (string, required) brand name - `data.productFlags` (array,null, required) discount parameters. - `data.productFlags.code` (string, required) parameter code - `data.productFlags.title` (string, required) parameter name - `data.productFlags.condition` (string, required) or - `errors` (array,null) - `errors.errorCode` (string, required) Short text error identification - `errors.message` (string, required) Descriptive error message - `errors.instance` (string, required) Identification of the entity referenced