Skip to main content
Version: v3

Recipe tags

Overview​

The recipe-tags feature lets you display a small label on each product in the user's cart reminding them which recipe that product came from.

A cart page without tags:

Cart without recipe tags

With recipe tags injected next to each product:

Cart with recipe tags
Closed
Cart with recipe tags open
Opened

Call the route below with the product IDs in the basket, then inject each entry's html next to the matching product line on your cart page. The returned markup uses the <mealz-recipe-tag> web component.

The base URL:

GET https://MEALZ_SSR_API_URL/API_VERSION/recipe-tags
warning

Do not forget the mandatory HTTP headers.

Parameters​

  • store_id: string: (Mandatory) The store ID to contextualize the recipe-tag data.

  • product_ids: string[]: (Mandatory) A JSON array of product IDs for which to fetch recipe-tag markup (passed as a query parameter, for example product_ids=["productId1","productId2"]).

Response​

Returns a JSON object with a data array. Each entry corresponds to one product ID:

{
"data": [
{ "productId": "productId1", "html": "<...>" },
{ "productId": "productId2", "html": "<...>" }
]
}

If a product has no associated recipe tag, the html value is an empty string.