Developers access the functionality of the API by sending http request to the API URL with POST parameters and the API returns response with status ok (200) and result. The data is exchanged by using XML data packages.
All APIs return an XML string and take App Id and App Key as mandatory parameter and an XML string as an optional parameter. The content of the input XML and output XML strings is specific for each function. The root element of all input XML and output XML strings in the API is xml.
The set of parameters in an XML data package which specify how to construct an embroidery design is referred to as a design recipe, or simply recipe. Refer to details in the XML Data Packages section of this document.
All the files used by or produced by the API are also supplied as part of the input or output XML string in their own files element. The files are uniquely identified by a filename (much like on a file system) and can be referenced by that name in other parts of the input or output.
The Embroidery Web API provides functionality to:
- Obtain design information existing embroidery Design files or from a recipe. For efficiency reasons this design information is always available upon return from any API method that creates a TrueView.
- Obtain all the EMB Colorway TrueView images from an existing EMB Design file or from a recipe.
- Create a complete (lettering + decorations) design TrueView from a recipe. This method is not recommended for near real time use cases.
- Create Lettering with a simple preview view for one lettering decoration.
- Create Lettering with TrueView from a given recipe.
- Create Monogram with TrueView from a given recipe.
- Create a ready for production embroidery data file in Wilcom .EMB file from a given recipe, and/or create a machine stitch file format to be used directly in production.
- Edit lettering objects and monogram objects in an existing design with Trueview and product embroidery data file.
- Obtain information about the Web API including version information and the Wilcom Alphabets that are supported.
- Convert graphic files to include a transparent background.
Design Information and Images
The EWA provides information about existing designs including stitch count, height, width, number of colors and other embroidery metadata. This feature is implemented by the api/designInfo method.
Clients can also obtain TrueView™ (realistic simulation of embroidery stitching) images of all design colorways from the EWA together with the metadata. This is implemented by the api/designTrueview method and is useful for batch upload use cases.
Create Embroidery Design Production Data
The EWA allow clients to produce an embroidery design (.EMB) and its TrueView™ using a simple set of components, such as other designs, lettering, team lettering and monogram. Certain properties of the components can be changed, and the components themselves can be positioned within a given location. This feature is implemented by api/newDesign method.
This API will be used to create the EMB file for a specific location. This EMB file is then used by the fulfilment centre for the sewing out of the embroidery into that specific location on the apparel.
The metadata for the generated design is also obtained by this API.
Create Embroidery Design TrueView™ Image
The metadata for the generated design is also obtained by this method.
Some of the APIs return TrueView™ images. Those images will be 1:1 scale at 96 dpi with a transparent background if the image file size is less than a threshold. They will be in the PNG format.
The TrueView image file size threshold is 4M by default. The dpi will reduce to half repeatedly until file size of TrueView image equal or less than threshold.
Create Fast Lettering Preview Image
The EWA allow clients to produce a fast preview of a single Lettering decoration, or a single Team Name Lettering decoration with a single team name. This feature is implemented by api/newLetteringPreview method.
Note that for performance reasons, the metadata for the lettering preview design obtained by this API is an estimate.
The EWA allow clients to modify the lettering and monogram properties like text, font, colour etc. for an existing design. Client can choose to generate TrueView or embroidery design production data. This feature is implemented by api/editDesign and api/editDesignTrueview. Also, the lettering properties like index, text and font are embedded in design info.
Get API information
The EWA’s version information is returned by the api/info method. This method returns API information such as version and the available list of alphabets.
Bitmap Art Preview and Vector Art Preview
The EWA allows clients to preview a graphic file or PDF/EPS with a transparent background. This feature is implemented by api/bitmapArtPreview or api/vectorArtPreview method. Supported bitmap formats are listed in section 6 below.
The EWA allows clients to produce an embroidery design (.EMB) and its TrueView™ based on a provided graphic file or PDF/EPS. This feature is implemented by api/bitmapArtTrueview, api/bitmapArtDesign, api/vectorArtTrueview and api/vectorArtDesign method. Supported bitmap formats are listed in section Supported formats.