方法路径摘要认证
GET/v1/admin/reseller-wholesale-pricesList wholesale prices登录会话
PUT/v1/admin/reseller-wholesale-prices/{price_list}/{line_group_id}/{period}Set one wholesale price (audited reseller.wholesale_price.put)登录会话
DELETE/v1/admin/reseller-wholesale-prices/{price_list}/{line_group_id}/{period}Remove one wholesale price (audited reseller.wholesale_price.delete)登录会话

契约文件:api/openapi/v1/control.yaml

接口详情

GET /v1/admin/reseller-wholesale-prices

List wholesale prices

operationId
listResellerWholesalePrices
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:identity.users.manage

说明(契约原文)

Prices per (price list, platform line group, period) in fen. A reseller's order costs the main line group's price plus the backup's (where priced) for the order's period; a package whose main line group has no price for a period cannot be sold for it.

参数

listResellerWholesalePrices 参数
名称位置类型必填说明
price_listquerystring否—

响应

listResellerWholesalePrices 响应
状态码说明
200Prices ordered by list, line group name and period.

字段:items: array<ResellerWholesalePrice>

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

PUT /v1/admin/reseller-wholesale-prices/{price_list}/{line_group_id}/{period}

Set one wholesale price (audited reseller.wholesale_price.put)

operationId
putResellerWholesalePrice
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:identity.users.manage

说明(契约原文)

Conditional write. expected_updated_at is the updated_at of the row the caller read, or null to create a row that does not exist yet; if the current row differs (changed, deleted or created by someone else) the write is refused with 409 wholesale_price_conflict and nothing changes. Every write moves updated_at forward. The line group must be one of the platform's own line groups (404 reseller_not_found otherwise).

参数

putResellerWholesalePrice 参数
名称位置类型必填说明
price_listpathstring是—
line_group_idpathstring(uuid)是—
periodpathstring: month / quarter / year是—

请求体

application/json · 必填:是

putResellerWholesalePrice 请求体
名称类型必填说明
price_minorinteger(int64)是—
expected_updated_atstring(date-time)是updated_at of the row the caller read; null = create.

响应

putResellerWholesalePrice 响应
状态码说明
200The price after the write.

字段:price_list: string line_group_id: string(uuid) line_group_name: string period: string: month / quarter / year price_minor: integer(int64) currency: string updated_at: string(date-time)

400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
409请求的状态与已有资源或幂等记录冲突。
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表

DELETE /v1/admin/reseller-wholesale-prices/{price_list}/{line_group_id}/{period}

Remove one wholesale price (audited reseller.wholesale_price.delete)

operationId
deleteResellerWholesalePrice
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:identity.users.manage

说明(契约原文)

Conditional delete: removes the row only if its updated_at still equals expected_updated_at (409 wholesale_price_conflict otherwise; 404 when there is no row).

参数

deleteResellerWholesalePrice 参数
名称位置类型必填说明
price_listpathstring是—
line_group_idpathstring(uuid)是—
periodpathstring: month / quarter / year是—
expected_updated_atquerystring(date-time)是—

响应

deleteResellerWholesalePrice 响应
状态码说明
204Removed.
400请求体或参数不合法。
401认证失败或会话已失效。
403当前身份没有执行该操作的权限。
404请求的资源不存在。
409请求的状态与已有资源或幂等记录冲突。
500服务内部故障,请求未完成。

失败时怎么办

  • 400 按字段说明修正参数或请求体再发;不要原样重试。
  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。
  • 404 资源不存在或不属于当前租户。
  • 409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。
  • 500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。

↑ 回到列表