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| Status | Description |
|---|
200 | TCP 计费概览 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| Name | In | Type | Required | Description |
|---|
If-Match | header | string | Yes | expected_head_revision 的强 ETag,例如 "1" |
|---|
Idempotency-Key | header | string | Yes | — |
|---|
X-Request-ID | header | string | Yes | — |
|---|
Request body
application/json · Required:Yes
scheduleTCPBillingFactorRevision Request body| Name | Type | Required | Description |
|---|
factor | string: 1.0 / 1.1 | Yes | — |
|---|
effective_at | string(date-time) | Yes | — |
|---|
reason | string | Yes | — |
|---|
Responses
scheduleTCPBillingFactorRevision Responses| Status | Description |
|---|
201 | 已建立新修订;相同请求重放通过 Idempotency-Replayed 标识 Fields:policy: PolicyRevision replayed: boolean |
|---|
400 | 输入无效 |
|---|
409 | tcp_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| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | Yes | — |
|---|
X-Request-ID | header | string | Yes | — |
|---|
Request body
application/json · Required:Yes
settleTCPBillingCycle Request body| Name | Type | Required | Description |
|---|
tenant_scope_id | string(uuid) | Yes | — |
|---|
subscription_id | string(uuid) | Yes | — |
|---|
cycle_key | string | Yes | — |
|---|
cycle_starts_at | string(date-time) | Yes | — |
|---|
cycle_ends_at | string(date-time) | Yes | — |
|---|
timezone | string | Yes | — |
|---|
metric_version | integer | Yes | — |
|---|
source_watermark | string | Yes | — |
|---|
finalized_through | string(date-time) | Yes | — |
|---|
evidence_sha256 | string | Yes | — |
|---|
raw_tcp_bytes | integer(int64) | Yes | — |
|---|
Responses
settleTCPBillingCycle Responses| Status | Description |
|---|
201 | 已写入不可变结算快照 Fields:settlement: Settlement replayed: boolean |
|---|
400 | 输入无效 |
|---|
409 | tcp_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| Name | In | Type | Required | Description |
|---|
settlement_id | path | string(uuid) | Yes | — |
|---|
Idempotency-Key | header | string | Yes | — |
|---|
X-Request-ID | header | string | Yes | — |
|---|
Request body
application/json · Required:Yes
adjustTCPBillingSettlement Request body| Name | Type | Required | Description |
|---|
operation | string: refund / void | Yes | — |
|---|
amount_bytes | integer(int64) | Yes | — |
|---|
reason | string | Yes | — |
|---|
Responses
adjustTCPBillingSettlement Responses| Status | Description |
|---|
201 | 已追加调整事实 Fields:adjustment: Adjustment settlement: Settlement replayed: boolean |
|---|
400 | 输入无效 |
|---|
404 | 资源不存在 |
|---|
409 | tcp_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