With the /designs endpoint user can get the designs, designs info and thumbnail.
GET
/api/Designs/GetDesigns
Get a Designs List filtered by optional parameters.
Request Example
/api/Designs/GetDesigns
/api/Designs/GetDesigns?designCategory=Category 1&template=Temp&designPricingSku=Pricing&keywords=design&location=loc
All the parameters are optional.
Response Example
[
{
"DesignName": "string",
"DesignPricingSKU": "string",
"DesignPreviewURL": "string",
"DesignCategory": "string",
"FGuid": "string",
"MinScaleFactor": 0,
"MaxScaleFactor": 0
}
]
GET
/api/Designs/GetDesignInfo/{id}
Get information about a specified design.
Request Example
The id parameter will be the Unique Design Name
/api/Designs/GetDesignInfo/Design 1
Response Example
{
"Name": "string",
"File": "string",
"HeightIn": 0,
"WidthIn": 0,
"DesignPricingSKU": "string",
"DesignCategories": [
"string"
],
"DefaultColours": [
{
"NeedleIndex": 0,
"Name": "string",
"Code": "string",
"Red": 0,
"Green": 0,
"Blue": 0
},
...
],
"DefaultColoreelSwatches": [
"#ED1212(Coloreel Large)",
....
],
"AvailableColours": [
{
"Name": "string",
"Code": "string",
"Red": 0,
"Green": 0,
"Blue": 0
},
...
],
"AvailableColoreelLibraries": [
"Coloreel Large",
"Coloreel Small"
...
],
"Origin": "string",
"FGuid": "string",
"MinScaleFactor": 0,
"MaxScaleFactor": 0,
"DesignType": "string",
"CustomerId": 0,
"ImageType": "string",
"HasColoreelEffects": false,
"IsSingleDesign": false,
"IsLockColors": false,
"CompanyId": 0,
"Id": 0
}
GET
/api/Designs/GetThumbnail/{id}
Get a url to design image.
Request Example
The id parameter will be the Unique Design Name
The threadPalette is optional
/api/Designs/GetThumbnail/Design 1?threadPalette=string
Response Example
Returns a string with the url for the design image.
GET
/api/Designs/GetCategories
Get categories.
Request Example
/api/Designs/GetCategories
Response Example
[
"Animals",
"Food",
"Outdoors",
"States",
"Holiday",
"Canada",
"Shapes and Letters",
"World Cultures",
"Other Sports",
"Laser Test"
]
GET
/api/Designs/ListDesigns/{id}
Get a Designs List filtered by order-type.
Request Example
The id parameter is required and specifies the desired order type eg embroidery-template or print-template
If a non-valid order-type is asked, all designs are returned
/api/Designs/ListDesigns/embroidery-template
Response Example
[
{
"Name": "string",
"File": "string",
"HeightIn": 0.0,
"WidthIn": 0.0,
"DesignPricingSKU": "string",
"DesignCategories": [
"string", "string", ...
],
"DefaultColours": [
{
"NeedleIndex": 0,
"Name": "string",
"Code": "string",
"Red": 0,
"Green": 0,
"Blue": 0
},
...
],
"DefaultColoreelSwatches": [
"#ED1212(Coloreel Large)",
....
],
"AvailableColours": [
{
"Name": "string",
"Code": "string",
"Red": 0,
"Green": 0,
"Blue": 0
},
...
],
"AvailableColoreelLibraries": [
"Coloreel Large",
"Coloreel Small"
...
],
"Origin": "string",
"FGuid": "string",
"MinScaleFactor": 0,
"MaxScaleFactor": 0,
"DesignType": "string",
"CustomerId": 0,
"ImageType": "string",
"HasColoreelEffects": false,
"IsSingleDesign": false,
"IsLockColors": false,
"CompanyId": 0,
"Id": 0
}
]
GET
/api/Designs/Render/{id}
Get a design as a byte array image.
Request Example
The id parameter is required and represents either the design name or design file name
/api/Designs/Render/Design 1
Response Example
Returns a byte array of the design's image
{
"Content": "[]",
"ContentEncoding": null,
"ContentType": "application/json"
}
GET
/api/Designs/RenderPNG/{id}
Get a design as image.
Request Example
The id parameter is required and represents either the design name or design file name
/api/Designs/RenderPNG/Design 1
Response Example
Returns an image.
POST
/api/Designs/Create
Create/Upload a design.
Model Request Example
1. Using Form Data
/api/Designs/Create
Request Content will be of type multipart/form-data with following keys
file - (Required) The design file
OrderType - Select one from the following.
• embroidery-template
• embroidery-design
• print-template
• rotary-engraving-template
• laser-engraving-template
• laser-engraving-free-form
• gravotech-rotary-engraving-template
• gravotech-laser-engraving-template
• thinkLaser
• transfer
• hand-print
• dtg
• co2-engraving-template
• embroidery-free-form
• print-free-form
• dtg-free-form
• transfer-free-form
• print-design
Name - (Optional) Name to use for the design
SubFolder - (Optional) Sub Folder for the design file
DesignCategories - (Optional) Name of design category. If multiple, separated by comma(,) [Only the one(s) matching existing design category names in the database are inserted]
ReplaceFile - (Optional) true/false: defines the bahavior in case a design file with the same name and subfolder already exists in the company's designs. Default is true
MinScaleFactor - (Optional) number greater than 0.2
MaxScaleFactor - (Optional) number greater than MinScaleFactor
DesignPricingSKU - (Optional) string
Origin - (Optional) string
NotIncludeInAllDesign - (Optional) boolean, defaults to false
IsAllColors - (Optional) boolean, defaults to false
DesignType (Optional) string, one of "Distress" or "Clipping"
DesignKeywords - (Optional) string. Separated by comma(,) keyword(s)
DesignLocations - (Optional) string. Separated by comma(,) location(s)
DesignAvailableColours - (Optional) string. Separated by comma(,) colour name(s) or code(s) [Only the one(s) matching existing colour names or codes in the database are inserted]
2. Using Json object
/api/Designs/Create + json object
{
"File" : "string" (Required - The design file),
"FileFormat" : "string" (Required only if the File paramter is in base64 string. Example - .PXF),
"OrderType" : "string" (Required - Select one from the following.
• embroidery-template
• embroidery-design
• print-template
• rotary-engraving-template
• laser-engraving-template
• laser-engraving-free-form
• gravotech-rotary-engraving-template
• gravotech-laser-engraving-template
• thinkLaser
• transfer
• hand-print
• dtg
• co2-engraving-template
• embroidery-free-form
• print-free-form
• dtg-free-form
• transfer-free-form
• print-design),
"Name" : "string" (Optional - Name to use for the design),
"SubFolder" : "string" (Optional - Sub Folder for the design file),
"DesignCategories" : "string" (Optional - Name of design category. If multiple, separated by comma(,) [Only the one(s) matching existing design category names in the database are inserted]),
"ReplaceFile" : "string" (Optional - true/false: defines the bahavior in case a design file with the same name and subfolder already exists in the company's designs. Default is true),
"MinScaleFactor" : number (Optional - number greater than 0.2),
"MaxScaleFactor" : number (Optional - number greater than MinScaleFactor),
"DesignPricingSKU" : "string" (Optional),
"Origin" : "string" (Optional),
"NotIncludeInAllDesign" : "string" (Optional - boolean, defaults to false),
"IsAllColors" : "string" (Optional - boolean, defaults to false),
"DesignType" : "string" (Optional, one of "Distress" or "Clipping"),
"DesignKeywords" : "string" (Optional - Separated by comma(,) keyword(s)),
"DesignLocations" : "string" (Optional - Separated by comma(,) location(s)),
"DesignAvailableColours" : "string" (Optional - Separated by comma(,) colour name(s) or code(s) [Only the one(s) matching existing colour names or codes in the database are inserted])
}
Response Example
If the operation is successful a response with an empty error will be returned with status code 200
Otherwise an error will be returned with status code 409
{
"error": ""
}
PATCH
/api/Designs/Update
Update/Upload a new file for a design.
Request Example
/api/Designs/Update?Name=name&InUseBehavior=1
Name parameter is required to identify the design to update
InUseBehavior is optional: it controls the behavior if the action attempts to update the designs's name 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 design exist (please have in mind that they may be affected)
Model Request Example
1. Using Form data
Request Content will be of type multipart/form-data with following keys
All keys are optional and only the given ones are updated
DesignCategories, DesignKeywords, DesignLocations, DesignAvailableColours, when provided, they fully override the existing ones(s) if any
file - The new design file
OrderType - Select one from the following.
• embroidery-template
• embroidery-design
• print-template
• rotary-engraving-template
• laser-engraving-template
• laser-engraving-free-form
• gravotech-rotary-engraving-template
• gravotech-laser-engraving-template
• thinkLaser
• transfer
• hand-print
• dtg
• co2-engraving-template
• embroidery-free-form
• print-free-form
• dtg-free-form
• transfer-free-form
• print-design
NewName - (Optional) Design Name
SubFolder - (Optional) Sub Folder for the design file
DesignCategories - (Optional) Name of design category. If multiple, separated by comma(,) [Only the one(s) matching existing design category names in the database are inserted]
ReplaceFile - (Optional) true/false: defines the bahavior in case a design file with the same name and subfolder already exists in the company's designs. Default is true
Active - (Optional) true/false
MinScaleFactor - (Optional) number greater than 0.2
MaxScaleFactor - (Optional) number greater than MinScaleFactor
DesignPricingSKU - (Optional) string
Origin - (Optional) string
NotIncludeInAllDesign - (Optional) boolean, defaults to false
IsAllColors - (Optional) boolean, defaults to false
DesignType - (Optional) string, one of "Distress" or "Clipping"
DesignKeywords - (Optional) string. Separated by comma(,) keyword(s)
DesignLocations - (Optional) string. Separated by comma(,) location(s)
DesignAvailableColours - (Optional) string. Separated by comma(,) colour name(s) or code(s) [Only the one(s) matching existing colour names or codes in the database are inserted]
RemoveExistingFiles - (Optional) true/false, indicate if the previous design file and cached preview will be deleted in case of a file upload (this is done only if there are no other designs that use this file). Default is false
2. Using Json Object
All keys are optional and only the given ones are updated
{
"File" : "string" (Optional - The design file),
"FileFormat" : "string" (Required only if the File paramter is in base64 string. Example - .PXF),
"OrderType" : "string" (Optional - Select one from the following.
• embroidery-template
• embroidery-design
• print-template
• rotary-engraving-template
• laser-engraving-template
• laser-engraving-free-form
• gravotech-rotary-engraving-template
• gravotech-laser-engraving-template
• thinkLaser
• transfer
• hand-print
• dtg
• co2-engraving-template
• embroidery-free-form
• print-free-form
• dtg-free-form
• transfer-free-form
• print-design),
"Name" : "string" (Optional - Name to use for the design),
"SubFolder" : "string" (Optional - Sub Folder for the design file),
"DesignCategories" : "string" (Optional - Name of design category. If multiple, separated by comma(,) [Only the one(s) matching existing design category names in the database are inserted]),
"ReplaceFile" : "string" (Optional - true/false: defines the bahavior in case a design file with the same name and subfolder already exists in the company's designs. Default is true),
"Active" : "string" (Optional - true/false)
"MinScaleFactor" : number (Optional - number greater than 0.2),
"MaxScaleFactor" : number (Optional - number greater than MinScaleFactor),
"DesignPricingSKU" : "string" (Optional),
"Origin" : "string" (Optional),
"NotIncludeInAllDesign" : "string" (Optional - boolean, defaults to false),
"IsAllColors" : "string" (Optional - boolean, defaults to false),
"DesignType" : "string" (Optional, one of "Distress" or "Clipping"),
"DesignKeywords" : "string" (Optional - Separated by comma(,) keyword(s)),
"DesignLocations" : "string" (Optional - Separated by comma(,) location(s)),
"DesignAvailableColours" : "string" (Optional - Separated by comma(,) colour name(s) or code(s) [Only the one(s) matching existing colour names or codes in the database are inserted]),
"RemoveExistingFiles" : "string" (Optional - true/false, indicate if the previous design file and cached preview will be deleted in case of a file upload (this is done only if there are no other designs that use this file). Default is false)
}
Response Example
If the operation is successful a response with an empty error will be returned with status code 200
Otherwise an error will be returned with status code 409
{
"error": ""
}
DELETE
/api/Designs/Delete
Delete a design.
Request Example
/api/Designs/Delete?Name=name&InUseBehavior=0&RemoveExistingFiles=true (or) /api/Designs/Delete + json object
1. Using Query String,
Name parameter is required in order to identify the design to delete
InUseBehavior is optional: it controls the behavior if the action attempts to delete a design 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 design exist (please have in mind that they may be affected)
RemoveExistingFiles parameter is optional, it specifies if the related design files will be deleted from the company's designs folder.
(this is done only if there are no other designs that use this file) Default is true
2. Using Json Object,
{
"Name": "Design Name"
}
Response Example
If the operation is successful an empty response will be returned with status code 200
Otherwise an error will be returned with status code 409
POST
/api/Designs/GetStitches
Get stitches data for a specified design.
Request Example
/api/Designs/GetStitches
{
"DesignName": "Fire", // Required. The Design name
"Recipe": "Normal" // Optional
}
Response Example
{
"Data":
{
"Elements": [
{
"Name": "Fire", // The Element name inside the embroidery file. If there are no Elements, its value is the same as "Filename"
"Filename": "Fire", // The Design name
"IsText": false,
"IsTemplate": true,
"Height": 0.0, // Unit: mm / 10
"Stitches":
[
{
"X": 484, // Unit: mm / 10
"Y": 1349, // Unit: mm / 10
"X1": 475, // Unit: mm / 10
"Y1": 1354, // 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": 477, // Unit: mm / 10
"Y": 1349, // Unit: mm / 10
"X1": 484, // Unit: mm / 10
"Y1": 1348, // 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": 0,
"Red": 0,
"Green": 0,
"Alpha": 0,
"Code": "1000 - Black",
"Name": "Black",
"Manufacturer": "RGB",
"RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette
"Value": null
},
...
{
"Blue": 255,
"Red": 255,
"Green": 255,
"Alpha": 0,
"Code": "1010 - White",
"Name": "White",
"Manufacturer": "RGB",
"RelColor": 0, // Used for drawing stitches, The index of the needle (color) in the palette
"Value": null
}
],
"AssetType": "Design", // Possible values: "Design" for Text, Design or Digitize, "Template" for Templates
"MinScale": 0,
"MaxScale": 0,
"ArcFactor": 0 // The value of text property Arc
}
]
},
"Success": true,
"Errors": null
}
POST
/api/Designs/UploadPrintFromCustomer
Upload a print design from customer.
Model Request Example
Request Content will be of type multipart/form-data with following keys
file - (Required) The design file
customer - (Required) The customer id(we can get it from Shopify)
Filename - (Optional) The design name
width - (Optional) The maximum design width(in px) saved in PulseiD
height - (Optional) The maximum design height(in px) saved in PulseiD
OrderType // Required, "print-template" or "print-design"
Response Example
If the operation is successful a response with the following model will be returned with status 200
Success model:
{
"designName": "My design", // The design name saved in database
"id": 15, // The design id
"dpi": 72, // The dpi of the design. This property will have value only for .jpeg,.png,.tiff design uploads
"width": 500, // In px. his property will have value only for .jpeg,.png,.tiff design uploads
"height": 500 // In px. his property will have value only for .jpeg,.png,.tiff design uploads
}
Otherwise an error will be returned with status code 409
{
"error": ""
}
POST
/api/Designs/UploadPrintFromUser
Upload a print design from user.
Model Request Example
Request Content will be of type multipart/form-data with following keys:
File, // Required, The design file, Allowed file extensions: .ai, .jpeg, .jpg, .pdf, .png, .pv, .tif, .tiff, .svg (the corresponding PulseID settings must be enabled)
height, // Optional, Unit: pixels, The maximum design height
width, // Optional, Unit: pixels, The maximum design width
OrderType // Required, "print-template" or "print-design"
Response Example
If the operation is successful a response with the following model will be returned with status 200
Success model:
{
"success": true,
"designName": "My design",
"id": 15,
"dpi": 72, // This property will have value only for .jpeg, .png, .tif, .tiff design uploads
"height": 500, // Unit: pixels, his property will have value only for .jpeg, .png, .tif, .tiff design uploads
"width": 500 // Unit: pixels, his property will have value only for .jpeg, .png, .tif, .tiff design uploads
}
Otherwise an error will be returned with status code 409
{
"success": false,
"error": ""
}
POST
/api/Designs/GetFreeFormPvData
Get free form pv data for a specified design.
Request Example
/api/Designs/GetFreeFormPvData
{
"DesignName":"Fire",
"TemplateColourOverride":"1000 - Black" // Optional
}
Response Example
{
"Data": {
"DPI": 0.0,
"DesignerMode": null, // Possible values: "Basic", "Advanced"
"Elements": [
{
"Elements": [
{
"Identity": {
"AssetFguid": "File 1", // The Design name
"AssetType": 1, // Possible values: 0 = None, 1 = Design, 2 = Template
"ElementName": "Path"
},
"PaintingWays": [ // Color information
{
"Color": {
"Type": 1, // Possible values: 0 = Rgb, 1 = Cmyk, 2 = SpotRgb, 3 = SpotCmyk, 4 = Gray, 5 = SpotGray
"Name": null,
"Values": [0.0, 0.4, 1.0, 0.0],
"RGBDisplayValues": [0.981063545, 0.650385261, 0.100587472] // Used for displaying the Color values on the client in RGB format
},
"FillMode": 1, // Possible values: 0 = Alternate, 1 = Winding
"FillType": 0, // Possible values: 0 = Solid, 1 = Gradient, 2 = Pattern
"PaintingWayType": 0 // Possible values: 0 = Fill, 1 = Stroke
},
...
{
"Color": {
"Type": 0, // Possible values: 0 = Rgb, 1 = Cmyk, 2 = SpotRgb, 3 = SpotCmyk, 4 = Gray, 5 = SpotGray
"Name": null,
"Values": [0.0, 0.0, 1.0],
"RGBDisplayValues": [0.981063545, 0.650385261, 0.100587472] // Used for displaying the Color values on the client in RGB format
},
"StrokeType": 0, // Possible values: 0 = Solid, 1 = Pattern
"PaintingWayType": 1, // Possible values: 0 = Fill, 1 = Stroke
"Width": 2 // Unit: pixels, Range: min = 0, max = 5
}
],
"Properties": {
"Opacity": 1.0
},
"Shape": {
"SvgData": "M 219.81 -118.41C 213.45 -186.19 200.75 -257.14 141.44 -257.14C 82.13 -257.14 69.43 -186.19 63.07 -118.41C 56.72 -50.63 94.84 -26.27 141.44 -26.27C 188.04 -26.27 226.16 -50.63 219.81 -118.41"
},
"Transformation": {
"CenterX": 141.439453125, // Unit: pixels
"CenterY": -141.70703125, // Unit: pixels
"Rotation": 0.0, // Unit: degrees
"ScaleX": 1.0,
"ScaleY": 1.0
},
"Type": 1 // Possible values: 0 = Group, 1 = Shape, 2 = Text, 3 = Bitmap
}
],
"Identity": {
"AssetFguid": "File 1", // The Design name
"AssetType": 1, // Possible values: 0 = None, 1 = Design, 2 = Template
"ElementName": "Path"
},
"Properties": {
"Colors": [
{
"Color": {
"Type": 1, // Possible values: 0 = Rgb, 1 = Cmyk, 2 = SpotRgb, 3 = SpotCmyk, 4 = Gray, 5 = SpotGray
"Name": null,
"Values": [0.0, 0.4, 1.0, 0.0],
"RGBDisplayValues": [0.981063545, 0.650385261, 0.100587472] // Used for displaying the Color values on the client in RGB format
},
"FillMode": 1, // Possible values: 0 = Alternate, 1 = Winding
"FillType": 0, // Possible values: 0 = Solid, 1 = Gradient, 2 = Pattern
"PaintingWayType": 0 // Possible values: 0 = Fill, 1 = Stroke
},
...
{
"Color": {
"Type": 0, // Possible values: 0 = Rgb, 1 = Cmyk, 2 = SpotRgb, 3 = SpotCmyk, 4 = Gray, 5 = SpotGray
"Name": null,
"Values": [0.0, 0.0, 1.0],
"RGBDisplayValues": [0.981063545, 0.650385261, 0.100587472] // Used for displaying the Color values on the client in RGB format
},
"StrokeType": 0, // Possible values: 0 = Solid, 1 = Pattern
"PaintingWayType": 1, // Possible values: 0 = Fill, 1 = Stroke
"Width": 2 // Unit: pixels, Range: min = 0, max = 5
}
],
"Opacity": 1.0
},
"Transformation": {
"CenterX": 141.439453125, // Unit: pixels
"CenterY": -141.70703125, // Unit: pixels
"Rotation": 0.0 // Unit: degrees,
"ScaleX": 1.0,
"ScaleY": 1.0
},
"Type": 0, // Possible values: 0 = Group, 1 = Shape, 2 = Text, 3 = Bitmap
}
]
},
"Success": true,
"Errors": null
}