简化开放下单幂等参数
This commit is contained in:
@@ -201,7 +201,7 @@ export const endpoints: EndpointSpec[] = [
|
||||
summary: '幂等创建订单并扣款(成功返回 201,重复请求返回 200 且 idempotent=true)',
|
||||
scope: 'orders:write',
|
||||
bodyParams: [
|
||||
{ name: 'client_order_no', type: 'string', required: true, desc: '调用方幂等单号,需与 Idempotency-Key 一致', example: 'shop-10001' },
|
||||
{ name: 'client_order_no', type: 'string', required: true, desc: '调用方幂等单号,同一商户下唯一', example: 'shop-10001' },
|
||||
{ name: 'sku', type: 'string', required: true, desc: '商品标识,取自商品列表', example: 'suit_pink_sheep' },
|
||||
{ name: 'quantity', type: 'int', desc: '数量,默认 1', example: '1' },
|
||||
{ name: 'buyer_reference', type: 'string', desc: '买家标识/备注', example: 'buyer-001' },
|
||||
@@ -233,7 +233,7 @@ export const endpoints: EndpointSpec[] = [
|
||||
{ name: 'order', type: 'object', desc: '订单对象,字段见「订单字段说明」' },
|
||||
],
|
||||
notes: [
|
||||
'Header 需带 Idempotency-Key,且必须与 client_order_no 一致。',
|
||||
'client_order_no 是唯一幂等单号,请保证同一商户下不重复。',
|
||||
'下单即扣款(payment_status=paid),余额不足返回 400。',
|
||||
'同一 client_order_no 重复请求不会重复扣款,返回 idempotent=true。',
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user