接口详情
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_list | query | string | 否 | — |
|---|
响应
listResellerWholesalePrices 响应| 状态码 | 说明 |
|---|
200 | Prices ordered by list, line group name and period. 字段:items: array<ResellerWholesalePrice> |
|---|
400 | The request body or parameters are invalid. |
|---|
401 | Authentication failed or the session is invalid. |
|---|
403 | The authenticated principal is not allowed to perform the action. |
|---|
500 | The request could not be completed because of an internal failure. |
|---|
失败时怎么办
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_list | path | string | 是 | — |
|---|
line_group_id | path | string(uuid) | 是 | — |
|---|
period | path | string: month / quarter / year | 是 | — |
|---|
请求体
application/json · 必填:是
putResellerWholesalePrice 请求体| 名称 | 类型 | 必填 | 说明 |
|---|
price_minor | integer(int64) | 是 | — |
|---|
expected_updated_at | string(date-time) | 是 | updated_at of the row the caller read; null = create. |
|---|
响应
putResellerWholesalePrice 响应| 状态码 | 说明 |
|---|
200 | The 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 | The request body or parameters are invalid. |
|---|
401 | Authentication failed or the session is invalid. |
|---|
403 | The authenticated principal is not allowed to perform the action. |
|---|
404 | The requested resource was not found. |
|---|
409 | The requested state conflicts with an existing resource or idempotency fact. |
|---|
500 | The request could not be completed because of an internal failure. |
|---|
失败时怎么办
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_list | path | string | 是 | — |
|---|
line_group_id | path | string(uuid) | 是 | — |
|---|
period | path | string: month / quarter / year | 是 | — |
|---|
expected_updated_at | query | string(date-time) | 是 | — |
|---|
响应
deleteResellerWholesalePrice 响应| 状态码 | 说明 |
|---|
204 | Removed. |
|---|
400 | The request body or parameters are invalid. |
|---|
401 | Authentication failed or the session is invalid. |
|---|
403 | The authenticated principal is not allowed to perform the action. |
|---|
404 | The requested resource was not found. |
|---|
409 | The requested state conflicts with an existing resource or idempotency fact. |
|---|
500 | The request could not be completed because of an internal failure. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。500 结果未知:先按资源 ID 或列表回读确认,再决定是否用原 Idempotency-Key 重试。
↑ 回到列表