EWA API getting started

EWA API getting started

These notes guide developers through the initial setup, authentication, API calling structure, and development tools available for integrating the Wilcom Embroidery Web API into web applications.


βœ… Step 1: Sign up and get API credentials

  1. Visit the Wilcom Developer Portal: πŸ‘‰ https://developer.wilcom.com
  2. Register your company and select an appropriate API plan.
  3. Once approved, go to Applications in the Developer Portal to:
    1. View your default Application ID.
    2. Click View to retrieve your Application Key.
  4. Optionally, restrict access via IP addresses or edit application metadata.

πŸ“– Step 2: Read the documentation

After signing in, read the documentation carefully, starting with...

  1. EWA API methods overview
  2. EWA data packages overview
  3. EWA design recipe

Info
These documents explain API structure, supported operations, and expected XML formats.


πŸ” Step 3: Authentication

Every API call must include:

  1. appId β€” Your Application ID
  2. appKey β€” Your Application Key
Info
These are passed as POST parameters or HTTP headers depending on the implementation.

🌍 Step 4: API endpoints

Base URLs

Function
URL
All API calls

Common API methods

Method
Purpose
api/info
Get API version and available fonts.
api/designInfo
Get metadata β€” stitch count, size, etc.
api/designTrueview
Generate TrueView of existing design.
api/newDesign
Create full design from a recipe.
api/newDesignTrueview
Preview new design as TrueView.
api/newLetteringPreview
Quick preview of simple lettering.
api/editDesign
Modify text/monogram in existing EMB file.
api/bitmapArtDesign
Auto-digitize bitmap artwork to embroidery.
api/vectorArtDesign
Auto-digitize vector artwork to embroidery.
api/bitmapArtPreview
Generate preview from bitmap art.

πŸ’‘Step 5: Calling the API

Basic example with curl

curl -X POST "https://public.ewa.wilcomapps.com/api/designInfo" \
-H "Authorization: AppKey YOUR_APP_KEY" \
-d '<xml><design><filename>sample.emb</filename></design></xml>'

Response

The API returns an XML string with result metadata or an error block if something fails.


🧰 Step 6: .NET integration with RestSharp

Use the Wilcom-modified RestSharp library (for .NET 4)

Download from the Developer Portal:
  1. Wilcom.EWAEntity.dll
  2. Wilcom.GeneralEntity.dll
  3. RestSharp.dll
Info
If using a different .NET version, download the Visual Studio 2010 source and rebuild the solution.

Sample code snippet (C#)

XmlEWARecipe recipe = new XmlEWARecipe
{
recipe = new XmlKioskDocument
{
decorations = new List<decoration>
{
new lettering
{
simple_lettering = new simple_lettering
{
alphabet_name = "Block2",
text = "My Lettering",
height = 20f
},
thread = new thread
{
color = Color.Red.R | Color.Red.G << 8 | Color.Red.B << 16
}
}
},
output = new output
{
trueview_file = "ResultImage.png"
}
}
};

string xmlString = StringXmlSerializer.FastSerialize<XmlEWARecipe>(recipe, StaticXmlSerializers.GetSerializer<XmlEWARecipe>(null));

var client = new RestClient("https://public.ewa.wilcomapps.com/");
var request = new RestRequest("api/newdesigntrueview", Method.POST);

request.AddParameter("appId", YOUR_APP_ID);
request.AddParameter("appKey", YOUR_APP_KEY);
request.AddParameter("RequestXml", xmlString);

var response = client.Execute(request);

if (response.StatusCode == HttpStatusCode.OK)
{
XmlEWAResponse result = StringXmlSerializer.FastDeserialize<XmlEWAResponse>(
response.Content, StaticXmlSerializers.GetSerializer<XmlEWAResponse>());

byte[] imageBytes = Convert.FromBase64String(result.files[0].filecontents);
File.WriteAllBytes("Result.png", imageBytes);
}

πŸ“š Developer resources

Resource
Details
Developer portal
Saleshttps://wilcom.com/web-api
Docs & specs
Detailed schema and examples provided via the Developer Portal
Sample apps
Available in Node.js, Python, PHP

πŸ§ͺ Testing & trial

  • A free trial is available via the Developer Portal.
  • You can test API calls and preview results using your App ID & Key.

  1. EWA API capabilities
  2. EWA API technical notes
  3. Error information
  4. Supported file formats