The Product API requires the Frosmo Recommendations add-on for the Frosmo Control Panel. To get the add-on, if you do not already have it, contact Frosmo support.
For an introduction to recommendations and an overview of creating recommendations, see the recommendations user guide.
Product API vs. Graniitti API
You can retrieve product data through both the Product API and the Graniitti API. Here's how the two APIs differ:
- The Product API returns the full data for a product. The Graniitti API only returns the main details for a product, namely its ID, name, and type.
- The Product API does not require authentication. The Graniitti API uses token-based authentication.
- The Product API requires the ID of each product whose data to return. The Graniitti API can retrieve all products for a site (no product IDs required) or a single product based on its ID.
- The Product API only cares about product data. The Graniitti API can additionally retrieve and manage relevant products for a modification.
In a nutshell:
- If you want to retrieve the full data for a product, use the Product API.
- If you want to find out the IDs of products, or if you want to map products to modifications, use the Graniitti API.
For more information about the Graniitti API, see the Graniitti API guide.
Product API vs. Frosmo data layer
The Product API returns the exact same product data you send to the Frosmo back end through the Frosmo data layer. However, the product object properties and structure differ between the data layer and the API:
- Data layer uses the
frosmoProductprefix for all product object properties. For example:
- Product API omits the prefix in the returned product data. For example:
frosmoProductCategoryin the data layer maps to
typein the Product API.
- Data layer uses a flat object structure. The Product API nests all product data under the
type, which are returned in the