Design area limits
Limit design surface areas using SmartLink global and per-print-area limits, including saved limits and validation.
Set limits for your production requirements
Use maxDesignArea to keep your customers’ designs within the surface area your production process supports—for example, the maximum embroidery area your equipment can produce. Include it at the top level of your Create SmartLink request. FastEditor then prevents your customers from exceeding the limit in the editor. The example below sets a general limit of 40,000 mm², with smaller limits of 20,000 mm² for the front and 15,000 mm² for the back. Replace the example SKU and print-area identifiers with those for your product.
{
"sku": "EMBROIDERED-POLO",
"maxDesignArea": {
"metricUnits": "mm",
"global": 40000,
"printAreas": [
{
"code": "front",
"max": 20000
},
{
"name": "Back",
"max": 15000
}
]
}
}Choose a general limit, individual limits, or both
Set global to apply a limit to every print area, or use printAreas to set individual limits. You can combine them: an individual area’s max takes precedence over global, and other areas use the general limit. If you do not set a general limit, only the areas you list are limited. There is no default limit: omit maxDesignArea or send null when creating a project to leave it unrestricted. When you provide this object, include global or a non-empty printAreas list. Null fields and an empty list count as omitted. Enter limits as positive JSON numbers, not quoted strings; decimals are accepted. Use metricUnits: "mm" for mm² or metricUnits: "in" for in². These are surface areas, not width or height measurements. If you omit the units or send null, FastEditor uses mm².
Matching print areas
For each entry in printAreas, provide the print area’s code or name and its required max value. Use the identifiers for your selected product, as you would with supplierPrintAreaCodes or supplierPrintAreaNames. FastEditor first matches the code or name defined on the product’s pages, then the supplier’s identifiers. If you provide both code and name, only the code is used: an unmatched code is rejected without falling back to the name. List each print area only once. A limit on an area your customer cannot edit is accepted but has no effect. If your product uses an older FastEditor product configuration, or your SmartLink does not select a product, use a global limit instead of individual print-area limits.
Reopening a project
When you reopen a customer’s project using projectId, you can keep its existing limits or update them. Omit maxDesignArea or send null to keep all saved limits. To update them, send a new global value and/or entries for the print areas you want to change; any limits you leave out stay unchanged. Use print-area identifiers from the product the project was originally created with. Changing units replaces the entire saved limit, so include every limit you want to keep if you switch between mm² and in². If you work in inches, always include "metricUnits": "in" when updating limits on a reopened project. Otherwise, FastEditor assumes mm² and replaces the previous inches-based limits.
Read the limits returned by FastEditor
You do not need to add the limits to the editor URL: FastEditor associates them with your SmartLink. If you retrieve the SmartLink using GET /api/smartlink/token/{token}, you will find the limits in data.maxDesignArea. This includes metricUnits and the global and/or printAreas limits you supplied. Unlike the request list, the returned printAreas is an object keyed by zero-based print-area index: "0" refers to the first print area, "2" to the third. Its values are the corresponding area limits, as shown below.
{
"maxDesignArea": {
"metricUnits": "mm",
"global": 40000,
"printAreas": {
"0": 20000,
"2": 15000
}
}
}Resolve an unsuccessful request
If your limits are invalid, FastEditor returns HTTP 400 and does not create a SmartLink or change your customer’s details. Check the error message to identify what to correct before sending your request again. For example, maxDesignArea.printAreas[1].max must be a positive number means the second entry needs a numeric limit greater than zero. Other causes include missing limits, unsupported units, incorrect field types, missing or empty print-area identifiers, duplicate or unmatched print areas, or a product that does not support individual limits. When you reopen a project with individual print-area limits, HTTP 404 means the project no longer exists or its original product is unavailable. The messages are projectId does not match an existing project and Could not find the offering of this project, respectively. Older product configurations return HTTP 400 for individual limits; use a global limit instead. See the Create SmartLink request properties for the full field requirements.