Get ingredient sponsored products for a recipe

获取明确关联到特定食谱食材的所有赞助商品。通过定位单个食谱,你可以立即确定用户查看该菜品时应原生展示哪些品牌商品。精准安排零售媒体展示的理想工具。 使用场景: 上下文商品展示 • 用户查看“经典提拉米苏”食谱 → “品牌 Y 马斯卡彭奶酪”作为赞助推荐出现在食材列表旁边。在购买意愿达到峰值时实现高转化。 餐厅——供应商合作 • 餐厅在数字菜单中将供应商商品展示在食谱食材旁边。通过供应商获得广告收入。 一键“购买食谱所需食材” • 使用后台配置的赞助商品为“全部加入购物车”按钮提供支持。打造与食谱匹配且可盈利的购物车。

GET
/recipes/{recipeId}/sponsored-products/ingredients
Recipes
无需积分

响应

200
application/json
object[]

IngredientSponsoredProductArray

object[]

IngredientSponsoredProduct

与赞助产品关联的食谱食材

object

recipeIngredientId

此食材条目的唯一标识符

integer<int32>

recipeId

此食材所属食谱的标识符

integer<int32>

name

食材的显示名称

string

quantity?

所用食材的数量

number<double> | null

measureUnitId?

该数量的计量单位标识符;可通过 GET /definitions/measure-units 解析

integer<int32> | null

unitQuantity

赞助产品的单位数量

integer<int32>

priority

该产品针对该食材的推荐排名,其中数值越低匹配度越高,排名从 1 开始。与 formatScore 一致:优先级越高,分数不会越高;没有分数的产品排在最后。排名可能跳号,因为请求语言没有数据的产品不会包含在响应中。

integer<int16>

formatScore?

格式兼容性评分,范围为 0.01 至 100:你购买的数量中配方实际使用的百分比。100 表示包装规格与所需数量完全匹配,50 表示你购买的数量是所需数量的两倍。分数相同的产品在规格方面同样兼容,因此应使用 priority 在这些产品中进行选择;但在 0.01 时例外,此时刻度已饱和,仅表示包装规格远远过大。当无法评估兼容性时为 Null:产品重量未知、食材数量没有克数等价值(例如适量),或该关联早于此字段且尚未重新计算。体积按 1 毫升 = 1 克处理。

number<double> | null

productId

赞助产品的标识符

integer<int32>

shopProductId?

产品在特定商店中的标识符

string | null

productName

赞助产品的名称

string

brand

赞助产品的品牌

string

ean?

产品的 EAN 条形码

string | null

format?

产品包装规格

string | null

weightGrams?

产品的克数重量

number<double> | null

imageUrl?

产品图片 URL

string | null
401
application/json
object

未授权

ConnectProblemDetails

object

type?

string

title?

string

status?

integer<int32>

detail?

string

instance?

string

requestId?

string

traceId?

string
403
application/json
object

禁止访问

ConnectProblemDetails

object

type?

string

title?

string

status?

integer<int32>

detail?

string

instance?

string

requestId?

string

traceId?

string
406
application/json
object

不可接受

ConnectProblemDetails

object

type?

string

title?

string

status?

integer<int32>

detail?

string

instance?

string

requestId?

string

traceId?

string
422
application/json
object

无法处理的实体

ConnectProblemDetails

object

type?

string

title?

string

status?

integer<int32>

detail?

string

instance?

string

requestId?

string

traceId?

string
429
application/json
object

请求过多(APIM)

ConnectProblemDetails

object

type?

string

title?

string

status?

integer<int32>

detail?

string

instance?

string

requestId?

string

traceId?

string
500
application/json
object

内部服务器错误

ConnectProblemDetails

object

type?

string

title?

string

status?

integer<int32>

detail?

string

instance?

string

requestId?

string

traceId?

string
502
application/json
object

网关错误(APIM)

ConnectProblemDetails

object

type?

string

title?

string

status?

integer<int32>

detail?

string

instance?

string

requestId?

string

traceId?

string
504
application/json
object

网关超时(APIM)

ConnectProblemDetails

object

type?

string

title?

string

status?

integer<int32>

detail?

string

instance?

string

requestId?

string

traceId?

string