Skip to content

商品详情 ​

GET /products/{productId}

权限范围幂等operationId
catalog:read只读Catalog_productDetail

参数 ​

名称位置类型必填说明
productId路径string是商品 ID(prd_…)

示例 ​

js
const res = await client.get("/products/prd_109i0QtQIDMt0qCKdVjF8CL");
http
GET /open/v1/products/prd_109i0QtQIDMt0qCKdVjF8CL HTTP/1.1
Host: api.sybb.pw
Authorization: SY-HMAC-SHA256 Credential=ak_…, Timestamp=1796035200, Nonce=…, Signature=…

响应 200:

json
{
  "productId": "prd_109i0QtQIDMt0qCKdVjF8CL",
  "categoryId": "cat_1Yrxlo5gHYwz6FCJlUWBjrD",
  "name": "周末双排体验券",
  "unitPriceCents": 10000,
  "durationHours": 1,
  "description": "说明文字",
  "iconUrl": "https://example.com/icon.png",
  "enabled": true,
  "standardServiceCount": 1,
  "forceAnonymous": false,
  "additionalServices": [
    {
      "serviceId": "as_1yj4IvwV7CZNvkbED2pDqa8",
      "name": "周末双排体验券",
      "unitPriceCents": 10000,
      "chargeMode": "fixed",
      "ratioPercent": 20,
      "quantityRelation": "follow_order",
      "description": "说明文字"
    }
  ]
}

响应 ​

ProductView ​

字段类型必填说明
productIdstring商品 ID(prd_…)
categoryIdstring商品分类 ID(cat_…)
namestring名称
unitPriceCentsinteger是金额(分)
durationHoursnumber单份服务时长(小时)
descriptionstring说明
iconUrlstring图标 URL
enabledboolean是是否启用
standardServiceCountinteger标准服务数量(如时长、局数)
forceAnonymousboolean是商品要求必须匿名
additionalServicesAdditionalServiceView[]

AdditionalServiceView ​

字段类型必填说明
serviceIdstring附加服务 ID(as_…)
namestring名称
unitPriceCentsinteger金额(分)
chargeModestringfixed 按单价 / ratio 按主订单金额比例
ratioPercentnumber附加服务加价比例(%)
quantityRelationstringfollow_order 随订单数量 / one_per_order 一单一个 / custom 下单者自定义
descriptionstring说明

错误 ​

HTTP错误码含义
404NOT_FOUND资源不存在或不属于本店

签名、权限、限流等通用错误见错误处理。

ByteForge · 神运开放平台接口地址 https://api.sybb.pw/open/v1