With the /EmbroideryFreeForm endpoint user can render text stitches and submit orders for embroidery free form clients.
POST
/api/EmbroideryFreeForm/GetStitches
Render stitches for a given model
Request Example
Parameters
Common
"AssetType": "Design", // Optional, Possible values: "Design" for Text, Design or Digitize, "Template" for Templates
"Recipe": "Normal", // Optional
"ScaleX": 1, // Required
"ScaleY": 1, // Required
"Type": "TEXT" // Required, Possible values: "TEXT", "DESIGN"
Text
"ArcFactor": 0, // Optional, The value of text property Arc
"EnvelopeType": "Rectangle", // Optional, Possible values: "Rectangle", "BridgeConcaveTop", "BridgeConcaveBottom", "BridgeConvexTop", "DoubleConvexBridges", "ConcaveTopConvexBottom", "ConvexTopConcaveBottom"
"IsDefault": false, // Required, (true for Add Text, false for Edit Text)
"Font": "Block", // Required
"FontHeight": 101.6, // Required, The Font height in mm / 10
"Text": "MY TEXT", // Required
"TextType": "TextTypeRectangle" // Required, Possible values: "TextTypeRectangle", "TextTypeArc"
Design
"Filename": "", // Required, The Design name
"IsTemplate": true, // Required
"Name": "" // Required, The Element name inside the embroidery file. If there are no Elements, its value is the same as "Filename". Get its value from the response of the /api/Designs/GetStitches endpoint
Add Text
[{
"IsDefault": true,
"Properties":
{
"ArcFactor": 0,
"AssetType": "Design",
"EnvelopeType": "Rectangle",
"Font": "Block 2 New",
"FontHeight": 101.6, // Unit: mm / 10
"Recipe": "Normal",
"ScaleX": 1,
"ScaleY": 1,
"Text": "MY TEXT",
"TextType": "TextTypeRectangle"
},
"Type": "TEXT"
}]
Edit Text
[{
"IsDefault": false,
"Properties":
{
"ArcFactor": 0,
"AssetType": "Design",
"EnvelopeType": "Rectangle",
"Font": "Block 2 New",
"FontHeight": 203.2, // Unit: mm / 10
"Recipe": "Normal",
"ScaleX": 2,
"ScaleY": 2,
"Text": "Tajima",
"TextType": "TextTypeRectangle"
},
"Type": "TEXT"
}]
Edit Design
[{
"Properties":
{
"AssetType": "Design",
"Filename": "DesignName",
"IsTemplate": true,
"Name": "ElementName",
"Recipe": "Normal",
"ScaleX": 1,
"ScaleY": 1
},
"Type": "DESIGN"
}]
Response Example
{
"Data":{
"Elements":
[
{
"Name": null,
"Filename": null,
"Text": "MY TEXT",
"TextType": null,
"EnvelopeType": "Rectangle",
"IsText": true,
"IsTemplate": false,
"Fonts": [
{
"Name": "Block"
}
],
"Height": 323.0, // Unit: mm / 10
"Stitches":
[
{
"X": -540, // Unit: mm / 10
"Y": -36, // Unit: mm / 10
"X1": -540, // Unit: mm / 10
"Y1": -30, // Unit: mm / 10
"RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette
"Code": 4, // Used for drawing stitches, 0 = sewing, 4 = changing needle (color)
"Jump": 0 // Used for drawing stitches, 0 = sewing, 1 = no sewing
},
...
{
"X": 609, // Unit: mm / 10
"Y": -237, // Unit: mm / 10
"X1": 614, // Unit: mm / 10
"Y1": -240, // Unit: mm / 10
"RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette
"Code": 0, // Used for drawing stitches, 0 = sewing, 4 = changing needle (color)
"Jump": 0 // Used for drawing stitches, 0 = sewing, 1 = no sewing
}
],
"Palette": // Available embroidery palette colors
[
{
"Blue": 85,
"Red": 23,
"Green": 52,
"Alpha": 0,
"Code": "1242",
"Name": "Midnight Blue",
"Manufacturer": "MADEIRA CL40 CV_VI",
"RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette
"Value": null
},
...
{
"Blue": 43,
"Red": 100,
"Green": 60,
"Alpha": 0,
"Code": "1058",
"Name": "Chocolate",
"Manufacturer": "Madeira Classic Rayon 40",
"RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette
"Value": null
}
],
"AssetType": null,
"MinScale": 0.0,
"MaxScale": 0.0,
"ArcFactor": 0
}
]
},
"Success": true,
"Errors": []
}
POST
/api/EmbroideryFreeForm/Submit
Submit order for embroidery free form clients
Request Example
{
"Category":"Flexfit Delta",
"Language":"GB",
"Price":0,
"ProductId":"HS1001144",
"ProductViews":
[
{
"DPI":85.50844277673545,
"Location":
{
"x":525.3198874296436,
"y":151.01500938086303,
"width":488.9230769230769,
"height":201.51969981238273
},
"Preview":"",
"ProductViewId":"front",
"ProductLocationId" : null,
"FObjectsInfo":
[
{
"Scale":1.1151087086347056,
"Angle":0,
"FromTemplate":true,
"Top":-1.7748592870543973,
"Left":119.71857410881796,
"FabricTop":-1.311859287054375,
"FabricLeft":120.66472210881795,
"Width":171.5,
"Height":147.5,
"Palette":
[
{
"Blue":0,
"Red":0,
"Green":0,
"Alpha":255,
"Code":"[000,000,000]",
"Name":"Black",
"Manufacturer":"RGB",
"RelColor":0,
"Value":null
}
],
"FileFGUID":"4yH1ias3ykeigcUhrj9G6w",//- Embroidery file guid identifier
"Recipe":"Normal",
"ObjectType":"DESIGN",
"FileName":"Diamond", //- One embroidery file may have multiple elements
"Name":"Diamond" //- Is the element's name inside embroidery file
},
{
"Scale":0.504194288096727,
"Angle":0,
"FromTemplate":false,
"Top":-20.774859287054397,
"Left":-135.28142589118204,
"FabricTop":-20,
"FabricLeft":-135,
"Width":180.5,
"Height":47.5,
"Palette":
[
{
"Blue":42,
"Red":40,
"Green":41,
"Alpha":255,
"Code":"1000",
"Name":"1000 - Black",
"Manufacturer":"Madeira Classic Rayon 40",
"RelColor":0,
"Value":null
}
],
"FileFGUID":"",
"Recipe":"Normal",
"ObjectType":"TEXT",
"ArcFactor":0,
"FontHeight":275,
"Text":"Write something here",
"Justification":0,
"Font":"Argentia"
}
]
}
],
"SessionId":"",
"SiteId":"hsse",
"Sizes":[
],
"Version":3,
"EasifyApiPath":"APIUrl"
}
Response Example
{
"Data":true,
"Success":true,
"Errors":null
}
POST
/api/EmbroideryFreeForm/SaveOrder
Save an order (for later use) for embroidery free form clients. Request parameters are same as Submit
Request Example
{
"Category":"Flexfit Delta",
"Language":"GB",
"Price":0,
"ProductId":"HS1001144",
"ProductViews":
[
{
"DPI":85.50844277673545,
"Location":{
"x":525.3198874296436,
"y":151.01500938086303,
"width":488.9230769230769,
"height":201.51969981238273
},
"Preview":"",
"ProductViewId":"front",
"FObjectsInfo":
[
{
"Scale":1.1151087086347056,
"Angle":0,
"FromTemplate":true,
"Top":-1.7748592870543973,
"Left":119.71857410881796,
"FabricTop":-1.311859287054375,
"FabricLeft":120.66472210881795,
"Width":171.5,
"Height":147.5,
"Palette":
[
{
"Blue":0,
"Red":0,
"Green":0,
"Alpha":255,
"Code":"[000,000,000]",
"Name":"Black",
"Manufacturer":"RGB",
"RelColor":0,
"Value":null
}
],
"FileFGUID":"4yH1ias3ykeigcUhrj9G6w",//- Embroidery file guid identifier
"Recipe":"Normal",
"ObjectType":"DESIGN",
"FileName":"Diamond", //- One embroidery file may have multiple elements
"Name":"Diamond" //- Is the element's name inside embroidery file
},
{
"Scale":0.504194288096727,
"Angle":0,
"FromTemplate":false,
"Top":-20.774859287054397,
"Left":-135.28142589118204,
"FabricTop":-20,
"FabricLeft":-135,
"Width":180.5,
"Height":47.5,
"Palette":
[
{
"Blue":42,
"Red":40,
"Green":41,
"Alpha":255,
"Code":"1000",
"Name":"1000 - Black",
"Manufacturer":"Madeira Classic Rayon 40",
"RelColor":0,
"Value":null
}
],
"FileFGUID":"",
"Recipe":"Normal",
"ObjectType":"TEXT",
"ArcFactor":0,
"FontHeight":275,
"Text":"TEXT",
"Justification":0,
"Font":"Argentia"
},
{
"Scale":1,
"Angle":0,
"FromTemplate":false,
"Top":-3,
"Left":-117,
"FabricTop":-3,
"FabricLeft":-117,
"Width":177.93902439024396,
"Height":177.93902439024396,
"Palette":[
{
"Blue":0,
"Red":0,
"Green":0,
"Alpha":255,
"Code":"001010",
"Name":"Black",
"Manufacturer":null,
"RelColor":0,
"Value":null
},
...
...
{
"Blue":150,
"Red":0,
"Green":87,
"Alpha":255,
"Code":"1076",
"Name":"1076 - Sapphire",
"Manufacturer":null,
"RelColor":0,
"Value":null
}
],
"FileFGUID":"",
"Recipe":"Normal",
"ObjectType":"graphic",
"DgModel":{
"Colors":
[
{
"DesignColor":
{
"Blue":0,
"Red":0,
"Green":0,
"Alpha":255,
"Code":null,
"Name":null,
"Manufacturer":null,
"RelColor":0,
"Value":"000000"
},
"PaletteColor":
{
"Blue":0,
"Red":0,
"Green":0,
"Alpha":255,
"Code":"001010",
"Name":"Black",
"Manufacturer":null,
"RelColor":0,
"Value":null
},
"NumPixels":104022,
"NumPixelsPercentage":41.6088
},
...
...
{
"DesignColor":
{
"Blue":255,
"Red":255,
"Green":255,
"Alpha":255,
"Code":null,
"Name":null,
"Manufacturer":null,
"RelColor":0,
"Value":"FFFFFF"
},
"PaletteColor":
{
"Blue":255,
"Red":255,
"Green":255,
"Alpha":255,
"Code":"000",
"Name":"White",
"Manufacturer":null,
"RelColor":0,
"Value":null
},
"NumPixels":62936,
"NumPixelsPercentage":25.1744
}
],
"Filename":"FTDvPM6fFkao7LGJGo29jg_status0"
}
}//-FObjectsInfo end
]
}
],
"SessionId":"",
"SiteId":"hsse",
"Sizes":[
],
"Version":3,
"EasifyApiPath":"APIUrl"
}
Response Example
Result can be used in /api/EmbroideryFreeForm/EditOrder
Result can be used in /api/EmbroideryFreeForm/EditOrder
{
"Data":"T2luI2Yo4ECbZl_W_ohaQg", //- Saved order guid.
"Success":true,
"Errors":null}
}
GET
/api/EmbroideryFreeForm/EditOrder/{uniqueIdentifier}
Return data and stitches for a saved order. Can be used from client to load saved orders
Request Example
/api/EmbroideryFreeForm/EditOrder/?uniqueIdentifier = xD5jKUO8-0-8yfknRDLciQ (string returned by SaveOrder call)
Response Example
{
"Data":
{
"ProductId":"790",
"ProductViews":
[
{
"DPI":85.50844277673545,
"Location":
{
"x":519.38180112570353,
"y":154.577861163227,
"width":488.92307692307691,
"height":201.51969981238273
},
"ProductViewId":"front",
"Elements":
[
{
"FPath":
{
"Palette":
[
{
"Blue":42,
"Red":40,
"Green":41,
"Alpha":255,
"Code":"1000",
"Name":"1000 - Black",
"Manufacturer":"Madeira Classic Rayon 40",
"RelColor":0,
"Value":null
}
],
"FromTemplate":false,
"Scale":0.79919533041484292,
"Recipe":"Normal",
"Angle":0.0,
"FontHeight":275.0,
"Text":"TEXT",
"Top":-46.337711069418361,
"Left":-83.843339587241985,
"FabricTop":-46.0,
"FabricLeft":-83.0,
"ObjectType":"TEXT",
"FileName":null,
"FileFGUID":"",
"Name":null,
"Justification":0,
"Font":"Argentia",
"Width":284.5,
"Height":74.5,
"ArcFactor":0.0,
"DgModel":null
},
"StitchData":
{
"Elements":
[
{
"Name":null,
"Filename":null,
"Text":"TEXT",
"TextType":null,
"PositionX":0.0,
"PositionY":0.0,
"IsText":true,
"IsTemplate":false,
"Fonts":
[
{
"Name":"Argentia"
}
],
"Height":220.0,
"Stitches":
[
{
"X":-368,
"Y":-25,
"X1":-368,
"Y1":-19,
"RelColor":0,
"Code":4,
"Jump":0
},
...
...
{
"X":-368,
"Y":-19,
"X1":-368,
"Y1":-13,
"RelColor":0,
"Code":0,
"Jump":0
}
],
"Palette":
[
{
"Blue":255,
"Red":244,
"Green":249,
"Alpha":0,
"Code":"1002",
"Name":"Snow White",
"Manufacturer":"Madeira Classic Rayon 40",
"RelColor":0,
"Value":null
},
...
...
{
"Blue":187,
"Red":190,
"Green":192,
"Alpha":0,
"Code":"1087",
"Name":"Silver",
"Manufacturer":"Madeira Classic Rayon 40",
"RelColor":0,
"Value":null
}
],
"ClientId":null,
"tempId":"HgDg-pelaUav0mCcLUrVuw"
}
]
},
"tempId":"HgDg-pelaUav0mCcLUrVuw"
},
{
"FPath":
{
"Palette":
[
{
"Blue":0,
"Red":0,
"Green":0,
"Alpha":255,
"Code":"[000,000,000]",
"Name":"Black",
"Manufacturer":"RGB",
"RelColor":0,
"Value":null
}
],
"FromTemplate":true,
"Scale":1.0,
"Recipe":"Normal",
"Angle":0.0,
"FontHeight":0.0,
"Text":null,
"Top":10.662288930581639,
"Left":130.65666041275801,
"FabricTop":10.999999999999972,
"FabricLeft":131.0,
"ObjectType":"DESIGN",
"FileName":"Fire",
"FileFGUID":"KMwmeHaNXUSthilqTJ0_jQ",
"Name":"Fire",
"Justification":0,
"Font":null,
"Width":103.5,
"Height":132.5,
"ArcFactor":0.0,
"DgModel":null
},
"StitchData":
{
"Elements":
[
{
"Name":"Fire",
"Filename":"Fire",
"Text":null,
"TextType":null,
"PositionX":0.0,
"PositionY":0.0,
"IsText":false,
"IsTemplate":true,
"Fonts":[],
"Height":0.0,
"Stitches":
[
{
"X":484,
"Y":1349,
"X1":475,
"Y1":1354,
"RelColor":0,
"Code":4,
"Jump":0
},
{
"X":477,
"Y":1349,
"X1":484,
"Y1":1348,
"RelColor":0,
"Code":0,
"Jump":0
}
],
"Palette":
[
{
"Blue":0,
"Red":0,
"Green":0,
"Alpha":0,
"Code":"[000,000,000]",
"Name":"Black",
"Manufacturer":"RGB",
"RelColor":0,
"Value":null
}
],
"ClientId":null,
"tempId":"3OmK2mEKbEOWFi96kU5x4g"
}
]
},
"tempId":"3OmK2mEKbEOWFi96kU5x4g"
}
]
}
],
"Sizes":[]
},
"Success":true,
"Errors":[]
}