Description
The SmartLink endpoint sends users to FastEditor. There are three use cases depending on whether you are creating a new product or reopening an existing project. See the scenarios below to determine which parameters apply to your integration.
To limit the customer’s design size, use the optional maxDesignArea properties below. See the Product Management Design area limits guide for matching print areas, reopening projects, stored limits and validation rules.
Use Cases
- 1
Create new product using product attributes Recommended
Use
suppliertogether withproductAttributesto specify the product by itsbaseSku,printMethod, and optionallyprintColorsand the supplier-specific print method/area properties.Example payload
{ "supplier": "PF Concept", "productAttributes": { "baseSku": "10029601", "printColors": 4, "supplierPrintMethodCode": "1", "supplierPrintAreaCodes": [ "front" ] } } - 2
Create new product using virtual SKUs
Some webshop platforms (e.g. WooCommerce) require a single distinct SKU value for each product variant. Use
suppliertogether withvirtualSkuto encode the product configuration and print area / color constraints in one string. WhenvirtualSkuis provided,productAttributeswill be ignored. See the SKU Concepts guide for the format.Example payload
{ "supplier": "PF Concept", "virtualSku": "10051500#1|$pp=front&$pc=4" } - 3
Open existing project
When a customer has already personalised a product and wants to continue editing, use
projectIdto reopen the project. Thesupplier,virtualSku, andproductAttributesparameters are irrelevant and will be ignored.Example payload
{ "projectId": 146 }
backUrl, cartUrl, country, currency, customAttributes, guestUser, language, maxDesignArea, productOptions, quantity, and userId.Authentication
API Key Required
Pass your API key in the X-Api-Key header
Request Body
Smartlink creation parameters required
| Field | Type | Required | Description |
|---|---|---|---|
backUrl | string | No | The URL where the customer should be sent if they abort project creation before reaching the shopping cart. This is separate from cartUrl, which is used after the customer completes the design. Example: https://my.shop/product |
cartUrl | string | No | The shopping cart URL where the user should be sent after completing the design. This is only required if the cart URL is not set on a global level for this shop. Example: https://my.shopping.cart/url |
country | string | No | The country the user is shopping in. Example: US |
currency | string | No | The currency in which to show pricing information in FastEditor. Example: USD |
customAttributes | object | No | Custom attributes that you want to receive back in the Add to Cart callback. |
guestUser | boolean | No | Only for white labels with the Auth Integration module implemented. When the provided userId parameter belongs to an anonymous or "guest" user, this should be set to true. It will enable the login dialog within FastEditor. |
language | string | No | The language in which to show the FastEditor UI. Example: en |
maxDesignArea | object | No | Optional maximum design surface area. For new projects, omit or send null for no limit. On reopen, omitted/null limits keep the saved values. Supply global and/or a non-empty printAreas list; a null field counts as omitted. See the Design area limits guide for matching, saved limits and validation. |
productAttributes | object | No | Allows deeplinking to a product based on the "baseSku" (usually provided by the supplier) and a set of attributes. If a "sku" is provided in the same payload, this will be ignored. |
productOptions | object | No | Defines if the user can switch between different product options in the editor UI. |
projectId | integer | No | Project unique identifier. Example: 146 |
quantity | integer | No | When provided, after the user finishes creating the project, it will be added to the shopping cart in this quantity. Example: 50 |
sku | string | No | Your internal SKU of the product the user wants to create. Will be ignored in case projectId is set. Example: TSHIRT-100#DTG |
supplier | string | No | Name of the supplier of the product deeplinking to. For a list of available suppliers, see the Connected Suppliers page. Example: PF Concept |
userId | string | No | Your internal unique identifier for the user. If this is provided, we will create a user session linked to this user profile. Example: user_123 |
virtualSku | string | No | A virtual SKU string that encodes both the product configuration and print area / color constraints. When provided, the editor will be pre-configured with the specified print positions and color count. See SKU Concepts for the format and how to discover available virtual SKUs. Will be ignored in case projectId is set. Example: TSHIRT-100#DTG|$pp=Front__Back&$pc=fc |
maxDesignAreafields
| Field | Type | Required | Description |
|---|---|---|---|
metricUnits | string enum | No | Surface-area units: mm² for mm or in² for in. Defaults to mm when omitted or null. Changing units on reopen replaces the entire saved limit. Example: mm mminnull |
global | number | No | Positive JSON number (decimals allowed), used for every print area without its own max. No default. Null counts as omitted. Numeric strings are rejected. Example: 40000 |
printAreas | array | No | Per-print-area limits. Empty or null counts as omitted; at least global or a non-empty list is required. Each entry needs a non-empty code or name and a positive numeric max (decimals allowed). Code takes precedence over name, with no fallback. A per-area max overrides global. For example: [{"code":"front","max":20000},{"name":"Back","max":15000}]. Not supported for legacy products or SmartLinks without a product. |
productAttributesfields
| Field | Type | Required | Description |
|---|---|---|---|
baseSku | string | Yes | The base product SKU from the supplier. |
printMethod | string | No | One of the print methods available in FastEditor. For a list of available print methods, see the Print Methods guide. |
printColors | integer | string enum | No | Number of print colors available to the customer. Either an integer from 1 to 12, or the string "full-color".123456789101112full-color |
supplierPrintMethodName | string | No | Print method name as defined in the original supplier data (non-normalized source data, only for suppliers that offer product feeds). Will be ignored in case supplierPrintMethodCode is sent in the same request. |
supplierPrintMethodCode | string | No | Print method code as defined in the original supplier data (non-normalized source data, only for suppliers that offer product feeds). |
supplierPrintAreaCodes | array | No | Array of print position codes as defined in the original supplier data. Array should hold values of the print positions that should be available for customization in the Editor. |
supplierPrintAreaNames | array | No | Array of print position names as defined by the supplier's provided data. Will be ignored in case supplierPrintAreaCodes is sent in the same request. |
productOptionsfields
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | No | Enable the UI in the editor for changing the product options. |
openOnStart | boolean | No | Do you want to open the UI for selecting the product options when the editor starts? |
Example Request
curl -X POST "https://api.editor.staging.fasteditor.com/api/smartlink" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"backUrl": "https://my.shop/product",
"cartUrl": "https://my.shopping.cart/url",
"country": "US",
"currency": "USD",
"language": "en",
"maxDesignArea": {
"metricUnits": "mm",
"global": 40000,
"printAreas": [
{
"code": "front",
"max": 20000
}
]
},
"productAttributes": {
"baseSku": "10029601",
"printColors": 4,
"supplierPrintMethodCode": "1",
"supplierPrintAreaCodes": [
"front"
]
},
"quantity": 50,
"supplier": "PF Concept",
"userId": "user_123"
}'Example Response
{
"URL": "https://editor.staging.fasteditor.com/app/create/0/10110011?locale=en&countryid=1¤cy=USD&user_token=abcdefghijklmnopqrstuvwxyz"
}