An ACE request is a POST to https://<ZSKAddress>/StitchJob with a JSON body (see Overview). It needs "Client": "ACE", a valid WebApiLicense, one image source and the ACE parameter objects. The supported input formats are listed in Automated Computed Embroidery (ACE).
Request types
| RequestType | Result in RequestData (Base64) | Further response fields |
|---|---|---|
CreateTC | Embroidery data in TC (Z00) format | Info (size, stitches), NeedleColor, NeedleSequence. With "WithPreview": true also PreviewData: a TrueView preview PNG from the same request, billed only once. |
CreatePNG, CreateStatPNG | TrueView preview of the embroidery as PNG | Info, NeedleColor, NeedleSequence. CreatePNG is handled as CreateStatPNG. |
CreateACEVector | The vectorized design as DXF | – |
CreateACEPng | The image after the color reduction of the embroidery step (ACEParaBitmapOptimize) as PNG | – |
OptimizePng | The optimized PNG, without creating embroidery data | Info. See Optimize. |
RasterizeVector | The SVG or AI file from VectorBase64/VectorType as PNG, without optimization and without creating embroidery data: rasterized at 300 DPI with smooth edges, longer side between 512 and 4096 pixels, background kept. Needs no ACEPara objects and is not billed. | – |
The response is a JobResponseType. Info, NeedleColor and NeedleSequence are JSON strings; parse them a second time.
Before the embroidery is created
- For PNG, SVG and AI input, the server first runs the optimization with
ACEParaOptimize(color reduction, thread table, background detection, scaling). It also runs with the defaults ifACEParaOptimizeis left out. Check the settings withOptimizePngfirst. - For thread numbers in the embroidery file, send the thread series in
ACEParaOptimize.ThreadTableor inACEParaBitmapToPunch.UseThreadCones; the server copies it to the other field if that one is empty. If you send both, use the same name. See Color reduction. - The embroidery parameters are described in ACEParaBitmapOptimize, ACEParaBitmapToVector and ACEParaBitmapToPunch. Send all three objects in every Create request. Values in these objects may be sent as strings, as in the example.
TrueViewsets the look of the PNG preview (CreatePNG,CreateStatPNG,WithPreview); see TrueView. Without it, default values are used.
Billing and errors
- Every successful Create request uses license quota. How many units depend on your license type.
- Input errors (missing source, unsupported format, missing parameter objects) return HTTP 400; see Automated Computed Embroidery (ACE).
No licence token found.andInvalid licence token.also return HTTP 400. - If the embroidery step fails, the response is HTTP 503 with
Communication with GiS ASPWebService failed!orNo data received from GiS ASPWebService. Failed requests are not billed.
The example creates TC embroidery data plus a preview from a PNG logo on a plain background, with the thread series Amann-Isacord 40 and a width of 100 mm.