A AuthMS API Wiki API Reference iam.tianv.com →

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

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

计费服务 `bearerAuth` application/json

Request Parameters

NameInTypeRequiredDefaultExampleConstraintsDescription
tenant_id path string Yes 租户ID
app_id path string Yes 应用ID

Request Body

Schema: dto.ConfigureAppPricingRequest

FieldTypeRequiredExampleConstraintsDescription
pricings array of

See dto.AppResourcePricingInputDTO

Yes

Responses

StatusDescriptionSchema
200应用定价配置成功dto.AppSubscriptionDetailResponse
400请求参数错误object
401未授权object
403无权限object
500服务器内部错误object

Referenced Schemas

dto.AppResourcePricingInputDTO

FieldTypeRequiredExampleConstraintsDescription
resource_type string Yes api_calls
included_units integer No 10000
overage_unit_price number No 0.05
unit_label string No
unit_price number No 0.01

dto.AppResourcePricingResponse

FieldTypeRequiredExampleConstraintsDescription
id string No arp_001
included_units integer No 10000
overage_unit_price number No 0.05
resource_type string No api_calls
subscription_app_id string No sa_001
unit_label string No
unit_price number No 0.01

dto.AppSubscriptionDetailResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.SubscriptionAppResponse No
message string No
timestamp string No

dto.SubscriptionAppResponse

FieldTypeRequiredExampleConstraintsDescription
app_id string No app_001
created_at string No 2026-04-01T00:00:00Z
id string No sa_001
pricings array of

See dto.AppResourcePricingResponse

No
status string No active
subscription_id string No sub_001
tenant_id string No tnt_xyz789