MethodPathSummaryAuth
GET/v1/admin/tcp-billing读取 TCP 流量计费策略与不可变结算快照Session
POST/v1/admin/tcp-billing/factor-revisions新建仅在目标结算周期开始时生效的 TCP 系数修订Session
POST/v1/admin/tcp-billing/settlements使用已冻结的最终计量证据结算一个 TCP 流量周期Session
POST/v1/admin/tcp-billing/settlements/{settlement_id}/adjustments追加退款或全额撤销事实,不修改原结算Session

Contract file:api/control-tcp-billing.openapi.yaml

Operation details

GET /v1/admin/tcp-billing

读取 TCP 流量计费策略与不可变结算快照

operationId
getTCPBillingOverview
Auth
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Responses

getTCPBillingOverview Responses
StatusDescription
200TCP 计费概览

Fields:current: PolicyRevision scheduled: array<PolicyRevision> history: array<PolicyRevision> settlements: array<Settlement>

401会话无效
403权限不足
503服务暂不可用

What to do on failure

  • 401 Check the credential format and whether it expired or was rotated.
  • 403 Check the key scopes, the owner’s current permissions and the tenant scope; never switch to a more privileged account.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.

↑ Back to list

POST /v1/admin/tcp-billing/factor-revisions

新建仅在目标结算周期开始时生效的 TCP 系数修订

operationId
scheduleTCPBillingFactorRevision
Auth
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Parameters

scheduleTCPBillingFactorRevision Parameters
NameInTypeRequiredDescription
If-MatchheaderstringYesexpected_head_revision 的强 ETag,例如 "1"
Idempotency-KeyheaderstringYes—
X-Request-IDheaderstringYes—

Request body

application/json · Required:Yes

scheduleTCPBillingFactorRevision Request body
NameTypeRequiredDescription
factorstring: 1.0 / 1.1Yes—
effective_atstring(date-time)Yes—
reasonstringYes—

Responses

scheduleTCPBillingFactorRevision Responses
StatusDescription
201已建立新修订;相同请求重放通过 Idempotency-Replayed 标识

Fields:policy: PolicyRevision replayed: boolean

400输入无效
409tcp_billing_revision_conflict 或 tcp_billing_idempotency_conflict

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list

POST /v1/admin/tcp-billing/settlements

使用已冻结的最终计量证据结算一个 TCP 流量周期

operationId
settleTCPBillingCycle
Auth
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Parameters

settleTCPBillingCycle Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringYes—
X-Request-IDheaderstringYes—

Request body

application/json · Required:Yes

settleTCPBillingCycle Request body
NameTypeRequiredDescription
tenant_scope_idstring(uuid)Yes—
subscription_idstring(uuid)Yes—
cycle_keystringYes—
cycle_starts_atstring(date-time)Yes—
cycle_ends_atstring(date-time)Yes—
timezonestringYes—
metric_versionintegerYes—
source_watermarkstringYes—
finalized_throughstring(date-time)Yes—
evidence_sha256stringYes—
raw_tcp_bytesinteger(int64)Yes—

Responses

settleTCPBillingCycle Responses
StatusDescription
201已写入不可变结算快照

Fields:settlement: Settlement replayed: boolean

400输入无效
409tcp_billing_revision_conflict 或 tcp_billing_idempotency_conflict

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list

POST /v1/admin/tcp-billing/settlements/{settlement_id}/adjustments

追加退款或全额撤销事实,不修改原结算

operationId
adjustTCPBillingSettlement
Auth
  • Session: the Bearer session of a signed-in control plane user, used by the customer in their own control plane; a plugin must never ask for it.
Required permissions

The contract has no separate permission annotation; see the description below and the 403 response.

Parameters

adjustTCPBillingSettlement Parameters
NameInTypeRequiredDescription
settlement_idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
X-Request-IDheaderstringYes—

Request body

application/json · Required:Yes

adjustTCPBillingSettlement Request body
NameTypeRequiredDescription
operationstring: refund / voidYes—
amount_bytesinteger(int64)Yes—
reasonstringYes—

Responses

adjustTCPBillingSettlement Responses
StatusDescription
201已追加调整事实

Fields:adjustment: Adjustment settlement: Settlement replayed: boolean

400输入无效
404资源不存在
409tcp_billing_revision_conflict 或 tcp_billing_idempotency_conflict

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 404 The resource does not exist or belongs to another tenant.
  • 409 Read the current state first; a retry of the same operation keeps the original Idempotency-Key and body.

↑ Back to list