Bbili-open-mcpMCP
★

添加商品定制信息

POST#77api SHOP_COMMODITY_INFO
https://member.bilibili.com/arcopen/fn/common/market_add_customization_product

开放能力 / 交易电商 / 电商 / 接口 / 商品模块接口

调用该接口可添加商品定制信息

body 参数

名称类型必填说明
item_idLong是B站商品id
priceLong是商品价格,单位分
ext_propertystruct是扩展属性,字符长度限制2000字符
extrastruct是额外信息列表
nameString是名称
valueString是值
keyString是键 其中key为outItemId和outItemName是必传
typeString是类型(text/image等)

响应字段

名称类型必填说明
tokenstring是返回唯一token,通过uuid生成返回

调用方式

javascript
// 让 AI 直接调(需要开放平台凭据)
bili_api_call { "ref": "77", "query": {…}, "body": {…} }

// 只看将要发出的请求(不需要凭据)
bili_api_call { "ref": "77", "dryRun": true }

// 生成完整调用代码
bili_codegen { "ref": "77", "lang": "python" }

官方请求示例

bash
curl --location --request POST 'https://member.bilibili.com/arcopen/fn/common/market_add_customization_product' \
--header 'Accept: application/json' \
--header 'Access-Token: a24e56a0fc0093668bca0f3a15410ea2' \
--header 'Content-Type: application/json' \
--header 'x-bili-timestamp: 1712473117' \
--header 'x-bili-signature-method: HMAC-SHA256' \
--header 'x-bili-signature-version: 2.0' \
--header 'Authorization: afdf0ddc6dd8f5af9c7f25cf3115a03142e67df99e15f909a17c11e4c82ad4f9' \
--header 'x-bili-signature-nonce: 1712473117993237000' \
--header 'x-bili-accesskeyid: 8ca079bc20ce433d' \
--header 'x-bili-content-md5: 795a2d7e13f989cee460801379fe543c' \
--header 'Connection: keep-alive' \
--data-raw '{
  "item_id": 100001,
  "price": 100,
  "ext_property": {
    "extra": [
      {
        "name": "商品编号",
        "value": "test202010144569186",
        "key": "outItemId",
        "type": "text"
      },
      {
        "name": "商品名称",
        "value": "测试商品",
        "key": "outItemName",
        "type": "text"
      },
      {
        "name": "订单编号",
        "value": "6954283700013",
        "key": "orderId",
        "type": "text"
      },
      {
        "name": "图片",
        "value": "https://i0.hdslb.com/bfs/mall/mall/1a/7c/2f4f4f5f5d6e4e8e8e8e8e8e8e8e8.png",
        "key": "img",
        "type": "image"
      }
    ]
  }
}'

原始文档:077_添加商品定制信息.md(3267 字节)。用 bili_docs_get { "ref": "77" } 读全文,或用 bili_api_spec { "ref": "77" } 取结构化规格。