POST /admin/billing/subscription/{tenant_id}/apps/{app_id}/pricing

为租户的某个应用单独配置资源定价方案(每个资源类型独立定价),覆盖默认套餐定价。支持设置包含单位数、单价和超额单价。

计费服务 `bearerAuth` application/json

请求参数

名称位置类型必填默认值示例约束描述
tenant_id path string 是 租户ID
app_id path string 是 应用ID

请求体

Schema: service-billing/internal/handler/dto.ConfigureAppPricingRequest

字段类型必填示例约束描述
pricings array of

参见 service-billing/internal/handler/dto.AppResourcePricingInputDTO

是

响应

状态描述Schema
200应用定价配置成功service-billing/internal/handler/dto.AppSubscriptionDetailResponse
400请求参数错误object
401未授权object
403无权限object
500服务器内部错误object

引用的 Schema

service-billing/internal/handler/dto.AppResourcePricingInputDTO

字段类型必填示例约束描述
resource_type string 是 api_calls
included_units integer 否 10000
overage_unit_price number 否 0.05
unit_label string 否 次
unit_price number 否 0.01

service-billing/internal/handler/dto.AppResourcePricingResponse

字段类型必填示例约束描述
id string 否 arp_001
included_units integer 否 10000
overage_unit_price number 否 0.05
resource_type string 否 api_calls
subscription_app_id string 否 sa_001
unit_label string 否 次
unit_price number 否 0.01

service-billing/internal/handler/dto.AppSubscriptionDetailResponse

字段类型必填示例约束描述
code integer 否
data service-billing/internal/handler/dto.SubscriptionAppResponse 否
message string 否
timestamp string 否

service-billing/internal/handler/dto.SubscriptionAppResponse

字段类型必填示例约束描述
app_id string 否 app_001
created_at string 否 2026-04-01T00:00:00Z
id string 否 sa_001
pricings array of

参见 service-billing/internal/handler/dto.AppResourcePricingResponse

否
status string 否 active
subscription_id string 否 sub_001
tenant_id string 否 tnt_xyz789