Get the Creator widget embedding snippet for a shop. Returns the embedding payload for the widget: the HTML block (a mount element plus the preloader <script> tag) that the host page injects, together with the preloader script URL. All start-up state is supplied through the query parameters below and is baked into the returned snippet. Inject the returned HTML into a sized container on your page, then drive the widget through its JavaScript API and receive the persisted ordered-product ids via the addToBasketCallback you name here.

This endpoint is a thin proxy to the Creator widget service, which hosts the widget, preloader and design assets. It is a legacy but functional integration path; other integration methods exist and are documented separately through shirtplatform support.

GET /accounts/{accountId}/shops/{shopId}/creator/snippet
Deprecated. The snippet-based embedding is a legacy integration path. It remains functional, but new integrations should confirm the preferred embedding method with shirtplatform support, as other integration methods are documented separately.

Get the Creator widget embedding snippet for a shop. Returns the embedding payload for the widget: the HTML block (a mount element plus the preloader <script> tag) that the host page injects, together with the preloader script URL. All start-up state is supplied through the query parameters below and is baked into the returned snippet. Inject the returned HTML into a sized container on your page, then drive the widget through its JavaScript API and receive the persisted ordered-product ids via the addToBasketCallback you name here.

This endpoint is a thin proxy to the Creator widget service, which hosts the widget, preloader and design assets. It is a legacy but functional integration path; other integration methods exist and are documented separately through shirtplatform support.

Parameters
Name In Default Constraints Description
x-auth-token header     The authentication token
accountId required path   int the unique identifier of the account
shopId required path   int the unique identifier of the shop
addToBasketCallback query     the name of the global JavaScript function the widget calls after the customer adds an item to the basket; it receives the persisted ordered-product ids. Must be alphanumeric — a non-alphanumeric name causes a runtime error (error 2155)
amount query 0 int the pre-filled quantity for the starting product; 0 for the default
assignedColorId query 0 int the assigned color id selected at start; 0 for the product default
assignedSizeId query 0 int the assigned size id selected at start; 0 for the product default
countryId query 0 int the country id used for pricing and tax; 0 uses the shop default
creatorDesignMode query SHOP "SHOP" or "TEMPLATE" the design mode the widget starts in: SHOP (customer personalisation, the default) or TEMPLATE (design-template authoring)
creatorStartCallback query     the name of the global JavaScript function the widget calls once its JavaScript API is ready. Must be alphanumeric (see error 2155)
editOrderedProductId query 0 int the id of an existing ordered product to reload for editing; it is removed once the edited item is re-added. The server appends a tamper-proof HMAC signature for this id. 0 for none
height query 100%   the widget content height as a CSS length in percent or pixels, e.g. 100% or 600px
langId query 0 int the localization (language) id the widget starts in; 0 uses the shop default
orderedProductId query 0 int the id of an existing ordered product to reload into the widget at start; 0 for none
priceInfoLabelType query 10 int the price-info label variant to display; defaults to 10
productChangeCallback query     the name of the global JavaScript function the widget calls after the customer changes the product. Must be alphanumeric (see error 2155)
productId query 0 int the id of the product loaded when the widget starts; 0 for none
sharedProductId query     the UUID of a shared product to load at start (products shared by link, email, or social); must be a valid UUID when present
showPriceDetails query false boolean whether to show the detailed price breakdown; defaults to false
templateProductId query 0 int the id of a design template loaded at start; 0 for none
width query 100%   the widget content width as a CSS length in percent or pixels, e.g. 100% or 800px
Response Codes
Code Condition
200 the snippet was generated; the response body is the widget embedding payload (snippet HTML plus the preloader script URL)
400 a supplied parameter is invalid (e.g. sharedProductId is not a valid UUID)
Response Body
Media Type Data Type Description
application/json object