The Public Shop API only works for shops that are based on the (new) Partner Area, not for legacy User Area-based shops. Terminology:
- an idea represents an image you uploaded in the Partner Area that you gave a name and added other meta data to. In the Partner Area this is loosely referred to as a design.
- a sellable is a representation of an idea printed on a product type. Depending on the product range selected in the Partner Area, one idea might have 100+ sellables associated with it.
A sellable is thus something concrete that a customer can buy, while an idea represents a grouping of content mainly intended to make administration easier.
All requests to the Public Shop API should be made from your server and not from the browser. This allows you to leverage caching, avoids CORS policy interference and keeps your API key secure.
Returns a paginated list of the shop's sellables in a format like this:
The fields are to be interpreted as follows:
|sellableId||Unique identifier for the sellable. Necessary to query the detail resource mentioned below as well as for the add-to-basket request.|
|ideaId||Identifies the uploaded design. Necessary to query the detail resource but also useful to group content by design if desired.|
|productTypeId||Identifies the 'type of garment' used. Can be used to lookup additional meta data from the product type resources described here.|
|price||Always in the currency of the shop. Check this for hints on how to format the price in a user-friendly way.|
|name||The text you entered in the Partner Area.|
|description||The text you entered in the Partner Area (optional).|
|tags||The text you entered in the Partner Area (optional).|
|previewImage||An image we deem best suited to represent the sellable on a list page.|
|previewImage/url||The image url you can embed directly into your page.|
|previewImage/type||Describes the type of image available from the url using one of the following values: PRODUCT, DESIGN, MODEL, ALTERNATIVE_MODEL.|
|appearanceIds||The 'colors' a sellable currently has available for purchase. If you need more information on the colors, the product type resource here is useful.|
|defaultAppearanceId||The default 'color' you can set in the Partner Area. This is the color the previewImage is in. It also provides a good starting point when linking to a detail page.|
Implementation remarks: For advanced implementations, it is usually best to import the content of the sellable list into your own data base in regular intervals (for example once every 24h).
This allows you to implement a custom navigation structure, filters, etc. according to your needs.
Returns detailed information on a specific sellable in a specific appearance in a format like this:
Most of the fields are exactly the same as in the list resource and have the same semantics. Two additional fields are included:
|sizeIds||Describes the sizes available for purchase for the sellable in this appearance. For more information on sizes, check the product type resource here.|
|images||A number of images giving an adequate overview over the sellable and it's properties in this appearance when displayed (ordered from most important to least important image). The exact number and shape of the images depend on your shop settings and the specifications you set when uploading the design. This object has the same structure as previewImage (mentioned in the list resource section).|
Implementation remarks: It is not feasible to import these detail resources into your own data base (because the number of entries can skyrocket quickly).
Instead, it is recommended to request the API dynamically in an ad-hoc manner once a customer visits a detail page.