With the /Styles endpoint user can manage styles from the database.
                GET
                /api/Styles/ListStyles
                Get all styles from database
            
        
            Request Example
            
        
    /api/Styles/ListStyles
                
            
                Response Example
            
            
    A list of Styles
    [
        {
        "Id": 0,
        "Name": "string",
        "Code": "string",
        "Description": "string",
        "TemplatePreviewURL": "string",
        "FontName": "string",
        "TextHeight": 0,
        "Recipe": "string",
        "FontName2": "string",
        "TextHeight2": 0,
        "Recipe2": "string",
        "WidthCompression": 0,
        "LineSpacing": 0,
        "TextType": "string", 
        "MaxHeight": 0,
        "MaxWidth": 0,
        "Orientation": 0,   [0 Vertical, 1 Horizontal]
        "DefaultText": "string",
        "PricingSKU": "string",
        "Colors": [
            {
                "label": "string",
                "value": "string",
                "Red": 0,
                "Green": 0,
                "Blue": 0
            },
            {
                "label": "string",
                "value": "string",
                "Red": 0,
                "Green": 0,
                "Blue": 0
            },
            {
                ...
            }
        ],
        "Fonts": [
            {
                "id": 0,
                "label": "string",
                "value": "string",
                "IsMultiColour": false,
                "FontPath": "string",
                "ForceCapitalization": false,
                "MinLength": 0,
                "MaxLength": 0,
                "IsUppercase": false,
                "IsLowercase": false,
                "IsNumbers": false,
                "IsRaised": false,
                "Recipe": "string",
                "PricingSKU": "string"
            },
            {
                ...
            }
        ],
        "IsDefault": false
        },
        {...}
    ]
                
        
                GET
                /api/Styles/GetStyleByCode
                Get style By Code
            
        
            Request Example
            
        
    /api/Styles/GetStyleByCode?Code=code
    Code parameter is required
            
            
                Response Example
            
            
    If found, a style is returned with status code 200. Otherwise an error with code and message is returned with status code 404  
        {
        "Id": 0,
        "Name": "string",
        "Code": "string",
        "Description": "string",
        "TemplatePreviewURL": "string",
        "FontName": "string",
        "TextHeight": 0,
        "Recipe": "string",
        "FontName2": "string",
        "TextHeight2": 0,
        "Recipe2": "string",
        "WidthCompression": 0,
        "LineSpacing": 0,
        "TextType": "string",
        "MaxHeight": 0,
        "MaxWidth": 0,
        "Orientation": 0,   [0 Vertical, 1 Horizontal]
        "DefaultText": "string",
        "PricingSKU": "string",
        "Colors": [
            {
                "label": "string",
                "value": "string",
                "Red": 0,
                "Green": 0,
                "Blue": 0
            },
            {
                "label": "string",
                "value": "string",
                "Red": 0,
                "Green": 0,
                "Blue": 0
            },
            {
                ...
            }
        ],
        "Fonts": [
            {
                "id": 0,
                "label": "string",
                "value": "string",
                "IsMultiColour": false,
                "FontPath": "string",
                "ForceCapitalization": false,
                "MinLength": 0,
                "MaxLength": 0,
                "IsUppercase": false,
                "IsLowercase": false,
                "IsNumbers": false,
                "IsRaised": false,
                "Recipe": "string",
                "PricingSKU": "string"
            },
            {
                ...
            }
        ],
        "IsDefault": false
        }
    
                
        
                POST
                /api/Styles/Create
                Create a style
            
        
            Model Request Example
            
        
    {
        "Name": "string",
        "Code": "string",
        "Description": "string",
        "FontName": "string",
        "TextHeight": 0, [required, if not provided default value is applied: 1]
        "Recipe": "string",
        "FontName2": "string",
        "TextHeight2": 0,
        "Recipe2": "string",
        "WidthCompression": 0, [required, if not provided default value is applied: 100]
        "LineSpacing": 0,
        "TextType": "string", [possible values: "text"(the default), "traditional-monogram","modern-monogram","arc"]]
        "MaxHeight": 0,
        "MaxWidth": 0,
        "Orientation": "vertical",  [required, possible values: "vertical" or 0, "horizontal" or 1]
        "DefaultText": "string",
        "PricingSKU": "string",
        "Colors": ["string", "string", ...],
        "Fonts": ["string", "string", ...],
        "IsAllColors":true,
        "IsAllFonts":true,
        "CreateBoundary":false,
        "BorderDistance":0,
        "BorderSteilThickness":0,
        "BorderColor":"string",
        "BoundaryShape":"string"
    }
    
    If CreateBoundary is provided and set to true and no BoundaryShape is provided then the default value of Rectangle is given 
    Colors and Fonts lists: if provided, only matching colors and embroidery style fonts db names are inserted
                
            
                Response Example
            
            
If the operation is successful an empty response will be returned with status code 201
Otherwise an error with code and message will be returned with status code 409
           
            
        
                PATCH
                /api/Styles/Update
                Update a style
            
        Request Example
            
    /api/Styles/Update?Code=code&InUseBehavior=1
            Code parameter is required to identify the style to update
            InUseBehavior is optional: it controls the behavior if the action attempts to update the style's code while it is being used by other entities
        Default value is 0 or UpdateIfNotUsed (the safest option) 
        Set to 1 or UpdateAlways in order to allow the update even if other entities pointing to the style exist (please have in mind that they may be affected)
            
            Model Request Example
            
    Only provided attributes are updated
    {
        "Code": "string",
        "Name": "string",
        "Description": "string",
        "FontName": "string",
        "TextHeight": 0,
        "Recipe": "string",
        "FontName2": "string",
        "TextHeight2": 0,
        "Recipe2": "string", 
        "WidthCompression": 0,
        "LineSpacing": 0,
        "TextType": "string", [possible values: "text", "traditional-monogram","modern-monogram","arc"]
        "MaxHeight": 0,
        "MaxWidth": 0,
        "Orientation": "vertical",  [possible values: "vertical" or 0, "horizontal" or 1]
        "DefaultText": "string",
        "PricingSKU": "string",
        "Colors": ["string", "string", ...],    [if provided they fully override the existing ones if any]
        "Fonts": ["string", "string", ...],     [if provided they fully override the existing ones if any]
        "IsAllColors":true,
        "IsAllFonts":true,
        "CreateBoundary":false,
        "BorderDistance":0,
        "BorderSteilThickness":0,
        "BorderColor":"string",
        "BoundaryShape":"string"
    }
    If CreateBoundary is provided and set to true and no BoundaryShape is provided and a value did not already exist either, then the default value of Rectangle is given 
    Colors and Fonts lists: if provided, only matching colors and embroidery style fonts db names are inserted
                
            
                Response Example
            
            
If the operation is successful an empty response will be returned with status code 200
Otherwise an error with code and message will be returned with status code 409
           
            
        
                DELETE
                /api/Styles/Delete
                Delete a style
            
        
            Request Example
            
    
/api/Styles/Delete?Code=code&InUseBehavior=0
Code parameter is required in order to identify the style to delete
InUseBehavior is optional: it controls the behavior if the action attempts to delete a style which is being used by other entities.
        Default value is 0 or DeleteIfNotUsed (the safest option) 
        Set to 1 or DeleteAlways in order to allow the deletion even if other entities pointing to the style exist (please have in mind that they may be affected)
                
            
                Response Example
            
            
If the operation is successful an empty response will be returned with status code 200
Otherwise an error with code and message will be returned with status code 409