Parameters for all requests
- companyid - The companyid is a unique code that is given as part of your subscription to access the API. This code must be supplied as part of the header for each API request.
Refer to the Documentation page for each specific request and the supported Parameters
Generate
Format
/api/[design component]/Generate?
Design component can be Lettering, a design,
a template, a compound or an AutoDigitize.
Requests can be made using GET or POST methods for "Designs" and "Templates".
For POST method, the parameters must be passed in the body of the request, as a JSON object containing key/value pairs.
The key/value pairs must be double-quoted strings with decoded text, following the same format from the query parameters of GET requests, as shown in the examples below:
- &Personalizations[1].TextColour=1000+-+Black --> "Personalizations[1].TextColour": "1000 - Black"
- &Personalizations[1].IsRainbowText=False --> "Personalizations[1].IsRainbowText": "False"
Description
Generates a design component and returns the production file.
Parameters
-
Format - Format of the returned production file. Valid values are:
Default is "PXF".
-
Recipe - Recipe to use when generating the final design which will apply a recipe on top of any existing. Default is "Normal".
See list of available recipes.
-
ElementRecipe[] - Array of recipes to be applied per element.
See arrays for more information about specifying array values.
-
Reflect - The ability to mirror a design with additional options on where the mirror will occur. Valid values are:
- rtRight
- rtCenterX
- rtLeft
- rtTop
- rtCenterY
- rtBottom
Default is no reflect.
-
SewingMessageBefore - Message to display on machine screen before sewing begins.
-
SewingMessageAfter - Message to display on machine screen after sewing completes.
-
MaximumRpm - The maximum allowed value the rpm can be set to on the machine for the design.
-
DesignStartPosition - When sending a stitch file to a machine you can specify where the frame will move offset from the center of the design. Parameters are:
Only supported for "TCF and "TBF" files.
-
Filename - The name of the file that will be saved on disk. Default is a 16 character name based on the Date/Time at the moment of generation.
-
SaveToFiles - Based on a configuration option in the config of the site will save a file to a path. Valid values are:
Default is false
- Requires a value be set in the config file of the site to a valid path where files will be saved
- Output.EmbroideryFolder
- When this value is set and the SaveToFiles is set to true the result will return a Json response indicating Success or fail
- Message = "File saved", Success = 1, FileName = "FileName.ext"
- Message = "There was a problem saving the file. Error message", Success = 0
-
SubfolderPath - Specifies the subfolder in which the generated file should be saved.
-
SubfolderPath is used only when SaveToFiles is set to true. When provided, the generated file will be stored inside the specified subfolder.
Example
/api/Lettering/Generate?Text=ABC&Format=DST
DST file of the lettering "ABC".
Example for Templates
/api/Templates/Generate?Path=EmojiBubble.PXF&Personalizations[0].Name=Mascot&Personalizations[0].Design=Emoji.PXF&Personalizations[1].Name=Text1&Personalizations[1].Text=PULSE&Personalizations[1].TextColour=1146 - Flame+Red&Personalizations[1].IsRainbowText=False&Personalizations[2].Name=Text2&Personalizations[2].Text=MICRO&Personalizations[2].TextColour=1460 - Ecru&Personalizations[2].IsRainbowText=False&Format=PCF
PXF template file "EmojiBubble.PXF" with the named element Mascot replaced with "Emoji.PXF" and the Text1 element replaced with "PULSE" and Texit1 colour replaced with "1146 - Flame Red" and the Text2 element replaced with "MICRO" and Texit2 colour replaced with "1460 - Ecru"