接口详情
GET /v1/admin/traffic-packages/grants
List grants for one explicit tenant
- operationId
listTenantTrafficPackageGrants- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.read
参数
listTenantTrafficPackageGrants 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
tenant_id | query | string(uuid) | 是 | Explicit access-scope UUID of the target tenant. |
|---|
limit | query | integer | 否 | — |
|---|
cursor | query | string | 否 | Opaque HMAC-signed cursor bound to endpoint, principal scope, target tenant, owner user, UTC-microsecond snapshot_at, and the applicable migration-066 catalog/usage snapshot_version or grant-state watermark. |
|---|
响应
listTenantTrafficPackageGrants 响应| 状态码 | 说明 |
|---|
200 | Grants visible under the derived or explicit tenant scope. 字段:items: array<Grant> next_cursor?: string total?: integer(int64) |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
408 | Read context was cancelled. |
|---|
502 | Stored or core facts did not satisfy the public response contract. |
|---|
503 | Read storage is unavailable. |
|---|
504 | Read deadline expired. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
POST /v1/admin/traffic-packages/grants/{grant_id}/disable
Pause deduction without changing remaining bytes or expiry
- operationId
disableSoldTrafficPackage- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.manage
参数
disableSoldTrafficPackage 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
grant_id | path | string(uuid) | 是 | — |
|---|
Idempotency-Key | header | string | 是 | — |
|---|
X-Request-ID | header | string | 是 | — |
|---|
traceparent | header | string | 是 | — |
|---|
响应
disableSoldTrafficPackage 响应| 状态码 | 说明 |
|---|
200 | Immutable audited command receipt; identical retries return the same fact. 字段:id: string(uuid) target_id: string(uuid) operation: string: archive_product / enable_grant / disable_grant revision: integer replayed: boolean |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
404 | Resource is absent or not visible in the authorized scope. |
|---|
409 | Idempotency, refund amount, grant-state, or bounded automatic-expiry backlog conflict. For traffic_package_expiry_backlog the original key replays the frozen result and a new caller-generated key advances at most the next 100 due grants. |
|---|
503 | The stable error code distinguishes an unavailable dependency or authenticator (no write attempted) from an unknown or committed result. Unknown results require same-key, identical-payload recovery. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
POST /v1/admin/traffic-packages/grants/{grant_id}/enable
Resume deduction for an unexpired active grant
- operationId
enableSoldTrafficPackage- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.manage
参数
enableSoldTrafficPackage 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
grant_id | path | string(uuid) | 是 | — |
|---|
Idempotency-Key | header | string | 是 | — |
|---|
X-Request-ID | header | string | 是 | — |
|---|
traceparent | header | string | 是 | — |
|---|
响应
enableSoldTrafficPackage 响应| 状态码 | 说明 |
|---|
200 | Immutable audited command receipt; identical retries return the same fact. 字段:id: string(uuid) target_id: string(uuid) operation: string: archive_product / enable_grant / disable_grant revision: integer replayed: boolean |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
404 | Resource is absent or not visible in the authorized scope. |
|---|
409 | Idempotency, refund amount, grant-state, or bounded automatic-expiry backlog conflict. For traffic_package_expiry_backlog the original key replays the frozen result and a new caller-generated key advances at most the next 100 due grants. |
|---|
503 | The stable error code distinguishes an unavailable dependency or authenticator (no write attempted) from an unknown or committed result. Unknown results require same-key, identical-payload recovery. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
GET /v1/admin/traffic-packages/grants/{grant_id}/reconciliation
Compare one grant's cached and ledger-recomputed balance
- operationId
reconcileTenantTrafficPackageGrant- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.read
参数
reconcileTenantTrafficPackageGrant 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
grant_id | path | string(uuid) | 是 | — |
|---|
tenant_id | query | string(uuid) | 是 | Explicit access-scope UUID of the target tenant. |
|---|
响应
reconcileTenantTrafficPackageGrant 响应| 状态码 | 说明 |
|---|
200 | Cached and recomputed grant balance comparison. 字段:grant_id: string(uuid) cached_remaining: integer(int64) recomputed_remaining: integer(int64) cached_revision: integer(int64) entry_count: integer(int64) consistent: boolean |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
404 | Resource is absent or not visible in the authorized scope. |
|---|
408 | Read context was cancelled. |
|---|
502 | Stored or core facts did not satisfy the public response contract. |
|---|
503 | Read storage is unavailable. |
|---|
504 | Read deadline expired. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
GET /v1/admin/traffic-packages/options
Search base or traffic product names for management selectors
- operationId
listTrafficPackageManagementOptions- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.read
参数
listTrafficPackageManagementOptions 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
kind | query | string: base / traffic | 是 | — |
|---|
search | query | string | 否 | — |
|---|
响应
listTrafficPackageManagementOptions 响应| 状态码 | 说明 |
|---|
200 | Up to 100 matching names; traffic options include archived products for historical sold filters. 字段:items: array<object> |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
503 | The stable error code distinguishes an unavailable dependency or authenticator (no write attempted) from an unknown or committed result. Unknown results require same-key, identical-payload recovery. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
GET /v1/admin/traffic-packages/products
List current product revisions
- operationId
listCurrentTrafficPackageProducts- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.read
参数
listCurrentTrafficPackageProducts 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
limit | query | integer | 否 | — |
|---|
cursor | query | string | 否 | Opaque HMAC-signed cursor bound to endpoint, principal scope, target tenant, owner user, UTC-microsecond snapshot_at, and the applicable migration-066 catalog/usage snapshot_version or grant-state watermark. |
|---|
响应
listCurrentTrafficPackageProducts 响应| 状态码 | 说明 |
|---|
200 | Current products or immutable revision history. 字段:items: array<Product> next_cursor?: string |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
408 | Read context was cancelled. |
|---|
502 | Stored or core facts did not satisfy the public response contract. |
|---|
503 | Read storage is unavailable. |
|---|
504 | Read deadline expired. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
GET /v1/admin/traffic-packages/products/{product_id}
Get the current revision of one product
- operationId
getCurrentTrafficPackageProduct- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.read
参数
getCurrentTrafficPackageProduct 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
product_id | path | string(uuid) | 是 | — |
|---|
响应
getCurrentTrafficPackageProduct 响应| 状态码 | 说明 |
|---|
200 | Current product revision. 字段:id: string(uuid) product_id: string(uuid) revision: integer(int64) audience: string: global / tenant owner_tenant_scope_id?: string(uuid) name: string remark?: string allowed_package_ids?: array<string(uuid)> quota_bytes: integer(int64) validity_days: integer expiry_timezone: string priority: integer currency: string price_minor: integer(int64) metering_scope: string metering_version: string created_at: string(date-time) enabled: boolean |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
404 | Resource is absent or not visible in the authorized scope. |
|---|
408 | Read context was cancelled. |
|---|
502 | Stored or core facts did not satisfy the public response contract. |
|---|
503 | Read storage is unavailable. |
|---|
504 | Read deadline expired. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
POST /v1/admin/traffic-packages/products/{product_id}/archive
Remove a product from sale while preserving sold entitlements and history
- operationId
archiveTrafficPackageProduct- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.manage
参数
archiveTrafficPackageProduct 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
product_id | path | string(uuid) | 是 | — |
|---|
Idempotency-Key | header | string | 是 | — |
|---|
X-Request-ID | header | string | 是 | — |
|---|
traceparent | header | string | 是 | — |
|---|
响应
archiveTrafficPackageProduct 响应| 状态码 | 说明 |
|---|
200 | Immutable audited command receipt; identical retries return the same fact. 字段:id: string(uuid) target_id: string(uuid) operation: string: archive_product / enable_grant / disable_grant revision: integer replayed: boolean |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
404 | Resource is absent or not visible in the authorized scope. |
|---|
409 | Idempotency, refund amount, grant-state, or bounded automatic-expiry backlog conflict. For traffic_package_expiry_backlog the original key replays the frozen result and a new caller-generated key advances at most the next 100 due grants. |
|---|
503 | The stable error code distinguishes an unavailable dependency or authenticator (no write attempted) from an unknown or committed result. Unknown results require same-key, identical-payload recovery. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
POST /v1/admin/traffic-packages/products/{product_id}/disable
Disable a product
- operationId
disableTrafficPackageProduct- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.manage
说明(契约原文)
Appends a disabled lifecycle fact. Disabled products disappear from tenant current-product lists and cannot receive new grants; immutable revision history remains readable.
参数
disableTrafficPackageProduct 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
product_id | path | string(uuid) | 是 | — |
|---|
Idempotency-Key | header | string | 是 | — |
|---|
X-Request-ID | header | string | 是 | — |
|---|
traceparent | header | string | 是 | — |
|---|
响应
disableTrafficPackageProduct 响应| 状态码 | 说明 |
|---|
200 | Appended lifecycle fact or identical committed replay. 字段:product_id: string(uuid) product_revision: integer(int64) revision: integer(int64) sequence: integer(int64) enabled: boolean replayed: boolean |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
404 | Resource is absent or not visible in the authorized scope. |
|---|
409 | Idempotency, refund amount, grant-state, or bounded automatic-expiry backlog conflict. For traffic_package_expiry_backlog the original key replays the frozen result and a new caller-generated key advances at most the next 100 due grants. |
|---|
503 | The stable error code distinguishes an unavailable dependency or authenticator (no write attempted) from an unknown or committed result. Unknown results require same-key, identical-payload recovery. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
POST /v1/admin/traffic-packages/products/{product_id}/enable
Enable a product
- operationId
enableTrafficPackageProduct- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.manage
说明(契约原文)
Appends an enabled lifecycle fact. Reusing the same idempotency key and payload returns the original receipt; a changed payload returns 409.
参数
enableTrafficPackageProduct 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
product_id | path | string(uuid) | 是 | — |
|---|
Idempotency-Key | header | string | 是 | — |
|---|
X-Request-ID | header | string | 是 | — |
|---|
traceparent | header | string | 是 | — |
|---|
响应
enableTrafficPackageProduct 响应| 状态码 | 说明 |
|---|
200 | Appended lifecycle fact or identical committed replay. 字段:product_id: string(uuid) product_revision: integer(int64) revision: integer(int64) sequence: integer(int64) enabled: boolean replayed: boolean |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
404 | Resource is absent or not visible in the authorized scope. |
|---|
409 | Idempotency, refund amount, grant-state, or bounded automatic-expiry backlog conflict. For traffic_package_expiry_backlog the original key replays the frozen result and a new caller-generated key advances at most the next 100 due grants. |
|---|
503 | The stable error code distinguishes an unavailable dependency or authenticator (no write attempted) from an unknown or committed result. Unknown results require same-key, identical-payload recovery. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
GET /v1/admin/traffic-packages/products/{product_id}/revisions
List immutable product revision history
- operationId
listTrafficPackageProductRevisions- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.read
参数
listTrafficPackageProductRevisions 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
product_id | path | string(uuid) | 是 | — |
|---|
limit | query | integer | 否 | — |
|---|
cursor | query | string | 否 | Opaque HMAC-signed cursor bound to endpoint, principal scope, target tenant, owner user, UTC-microsecond snapshot_at, and the applicable migration-066 catalog/usage snapshot_version or grant-state watermark. |
|---|
响应
listTrafficPackageProductRevisions 响应| 状态码 | 说明 |
|---|
200 | Current products or immutable revision history. 字段:items: array<Product> next_cursor?: string |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
408 | Read context was cancelled. |
|---|
502 | Stored or core facts did not satisfy the public response contract. |
|---|
503 | Read storage is unavailable. |
|---|
504 | Read deadline expired. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
POST /v1/admin/traffic-packages/products/{product_id}/revisions
Create an immutable product revision
- operationId
createTrafficPackageProductRevision- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.manage
说明(契约原文)
Publishes the next immutable revision with transactional platform IAM. The quoted If-Match value is the expected current revision (zero creates a new product). Reusing the same Idempotency-Key with the same canonical payload returns the original 201 receipt and Idempotency-Replayed: true; different input returns 409 and a stale expected revision returns 412.
参数
createTrafficPackageProductRevision 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
product_id | path | string(uuid) | 是 | — |
|---|
If-Match | header | string | 是 | — |
|---|
Idempotency-Key | header | string | 是 | — |
|---|
X-Request-ID | header | string | 是 | — |
|---|
traceparent | header | string | 是 | — |
|---|
请求体
application/json · 必填:是
createTrafficPackageProductRevision 请求体| 名称 | 类型 | 必填 | 说明 |
|---|
audience | string: global / tenant | 是 | — |
|---|
owner_tenant_scope_id | string(uuid) | 否 | — |
|---|
name | string | 是 | — |
|---|
remark | string | 否 | Maximum 1024 UTF-8 bytes; no control characters. |
|---|
allowed_package_ids | array<string(uuid)> | 否 | Empty means all base packages. Restrictions are captured per immutable revision and checked for purchase and consumption. |
|---|
quota_bytes | integer(int64) | 是 | — |
|---|
validity_days | integer | 是 | — |
|---|
expiry_timezone | string | 是 | — |
|---|
priority | integer | 是 | — |
|---|
currency | string | 是 | — |
|---|
price_minor | integer(int64) | 是 | — |
|---|
metering_scope | string | 是 | — |
|---|
metering_version | string | 是 | — |
|---|
enabled | boolean | 否 | Omit to retain current status; defaults to enabled for new products. |
|---|
响应
createTrafficPackageProductRevision 响应| 状态码 | 说明 |
|---|
201 | New immutable revision or the identical committed replay. 字段:product_snapshot_id: string(uuid) product_id: string(uuid) revision: integer(int64) replayed: boolean |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
404 | Resource is absent or not visible in the authorized scope. |
|---|
408 | Write result is unknown. Retry only with the same Idempotency-Key and identical payload. |
|---|
409 | Idempotency, refund amount, grant-state, or bounded automatic-expiry backlog conflict. For traffic_package_expiry_backlog the original key replays the frozen result and a new caller-generated key advances at most the next 100 due grants. |
|---|
412 | The quoted If-Match revision is stale. |
|---|
502 | The command committed but its bounded receipt could not be delivered. Recover only by retrying the same Idempotency-Key and identical payload. |
|---|
503 | The stable error code distinguishes an unavailable dependency or authenticator (no write attempted) from an unknown or committed result. Unknown results require same-key, identical-payload recovery. |
|---|
504 | Write result is unknown. Retry only with the same Idempotency-Key and identical payload. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。404 资源不存在或不属于当前租户。409 先回读资源当前状态;同一操作重试保持原 Idempotency-Key 和原请求内容。412 版本已变:回读最新 ETag 后重新判断,再带新的 If-Match 提交。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表
GET /v1/admin/traffic-packages/sold
List sold grants across tenants with server-side filters and count
- operationId
listSoldTrafficPackages- 认证
- 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
- 所需权限
全部需要:traffic_packages.read
参数
listSoldTrafficPackages 参数| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|
page | query | integer | 否 | — |
|---|
limit | query | integer | 否 | — |
|---|
search | query | string | 否 | User name |
|---|
product_id | query | string(uuid) | 否 | — |
|---|
status | query | string: active / disabled / exhausted / expired / reversed | 否 | — |
|---|
响应
listSoldTrafficPackages 响应| 状态码 | 说明 |
|---|
200 | Count and items use one database statement snapshot; pages reflect live state. 字段:items: array<SoldItem> total: integer page: integer limit: integer |
|---|
400 | Malformed headers, query, JSON, UUID, cursor, unit, or range. |
|---|
401 | Ordinary session authentication is required. |
|---|
403 | Principal scope or required permission is absent. |
|---|
503 | The stable error code distinguishes an unavailable dependency or authenticator (no write attempted) from an unknown or committed result. Unknown results require same-key, identical-payload recovery. |
|---|
失败时怎么办
400 按字段说明修正参数或请求体再发;不要原样重试。401 检查凭据格式、是否过期或被轮换。403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。503 依赖暂不可用:稍后用原 Idempotency-Key 重试。
↑ 回到列表