MethodPathSummaryAuth
GET/v1/admin/traffic-packages/grantsList grants for one explicit tenantSession
POST/v1/admin/traffic-packages/grants/{grant_id}/disablePause deduction without changing remaining bytes or expirySession
POST/v1/admin/traffic-packages/grants/{grant_id}/enableResume deduction for an unexpired active grantSession
GET/v1/admin/traffic-packages/grants/{grant_id}/reconciliationCompare one grant's cached and ledger-recomputed balanceSession
GET/v1/admin/traffic-packages/optionsSearch base or traffic product names for management selectorsSession
GET/v1/admin/traffic-packages/productsList current product revisionsSession
GET/v1/admin/traffic-packages/products/{product_id}Get the current revision of one productSession
POST/v1/admin/traffic-packages/products/{product_id}/archiveRemove a product from sale while preserving sold entitlements and historySession
POST/v1/admin/traffic-packages/products/{product_id}/disableDisable a productSession
POST/v1/admin/traffic-packages/products/{product_id}/enableEnable a productSession
GET/v1/admin/traffic-packages/products/{product_id}/revisionsList immutable product revision historySession
POST/v1/admin/traffic-packages/products/{product_id}/revisionsCreate an immutable product revisionSession
GET/v1/admin/traffic-packages/soldList sold grants across tenants with server-side filters and countSession

Contract file:api/control-traffic-packages.openapi.yaml

Operation details

GET /v1/admin/traffic-packages/grants

List grants for one explicit tenant

operationId
listTenantTrafficPackageGrants
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

All of:traffic_packages.read

Parameters

listTenantTrafficPackageGrants Parameters
NameInTypeRequiredDescription
tenant_idquerystring(uuid)YesExplicit access-scope UUID of the target tenant.
limitqueryintegerNo—
cursorquerystringNoOpaque 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.

Responses

listTenantTrafficPackageGrants Responses
StatusDescription
200Grants visible under the derived or explicit tenant scope.

Fields:items: array<Grant> next_cursor?: string total?: integer(int64)

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
408Read context was cancelled.
502Stored or core facts did not satisfy the public response contract.
503Read storage is unavailable.
504Read deadline expired.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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/traffic-packages/grants/{grant_id}/disable

Pause deduction without changing remaining bytes or expiry

operationId
disableSoldTrafficPackage
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

All of:traffic_packages.manage

Parameters

disableSoldTrafficPackage Parameters
NameInTypeRequiredDescription
grant_idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Responses

disableSoldTrafficPackage Responses
StatusDescription
200Immutable audited command receipt; identical retries return the same fact.

Fields:id: string(uuid) target_id: string(uuid) operation: string: archive_product / enable_grant / disable_grant revision: integer replayed: boolean

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
404Resource is absent or not visible in the authorized scope.
409Idempotency, 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.
503The 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.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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.
  • 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.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.

↑ Back to list

POST /v1/admin/traffic-packages/grants/{grant_id}/enable

Resume deduction for an unexpired active grant

operationId
enableSoldTrafficPackage
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

All of:traffic_packages.manage

Parameters

enableSoldTrafficPackage Parameters
NameInTypeRequiredDescription
grant_idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Responses

enableSoldTrafficPackage Responses
StatusDescription
200Immutable audited command receipt; identical retries return the same fact.

Fields:id: string(uuid) target_id: string(uuid) operation: string: archive_product / enable_grant / disable_grant revision: integer replayed: boolean

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
404Resource is absent or not visible in the authorized scope.
409Idempotency, 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.
503The 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.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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.
  • 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.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.

↑ Back to list

GET /v1/admin/traffic-packages/grants/{grant_id}/reconciliation

Compare one grant's cached and ledger-recomputed balance

operationId
reconcileTenantTrafficPackageGrant
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

All of:traffic_packages.read

Parameters

reconcileTenantTrafficPackageGrant Parameters
NameInTypeRequiredDescription
grant_idpathstring(uuid)Yes—
tenant_idquerystring(uuid)YesExplicit access-scope UUID of the target tenant.

Responses

reconcileTenantTrafficPackageGrant Responses
StatusDescription
200Cached and recomputed grant balance comparison.

Fields:grant_id: string(uuid) cached_remaining: integer(int64) recomputed_remaining: integer(int64) cached_revision: integer(int64) entry_count: integer(int64) consistent: boolean

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
404Resource is absent or not visible in the authorized scope.
408Read context was cancelled.
502Stored or core facts did not satisfy the public response contract.
503Read storage is unavailable.
504Read deadline expired.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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.
  • 404 The resource does not exist or belongs to another tenant.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.

↑ Back to list

GET /v1/admin/traffic-packages/options

Search base or traffic product names for management selectors

operationId
listTrafficPackageManagementOptions
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

All of:traffic_packages.read

Parameters

listTrafficPackageManagementOptions Parameters
NameInTypeRequiredDescription
kindquerystring: base / trafficYes—
searchquerystringNo—

Responses

listTrafficPackageManagementOptions Responses
StatusDescription
200Up to 100 matching names; traffic options include archived products for historical sold filters.

Fields:items: array<object>

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
503The 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.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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

GET /v1/admin/traffic-packages/products

List current product revisions

operationId
listCurrentTrafficPackageProducts
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

All of:traffic_packages.read

Parameters

listCurrentTrafficPackageProducts Parameters
NameInTypeRequiredDescription
limitqueryintegerNo—
cursorquerystringNoOpaque 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.

Responses

listCurrentTrafficPackageProducts Responses
StatusDescription
200Current products or immutable revision history.

Fields:items: array<Product> next_cursor?: string

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
408Read context was cancelled.
502Stored or core facts did not satisfy the public response contract.
503Read storage is unavailable.
504Read deadline expired.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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

GET /v1/admin/traffic-packages/products/{product_id}

Get the current revision of one product

operationId
getCurrentTrafficPackageProduct
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

All of:traffic_packages.read

Parameters

getCurrentTrafficPackageProduct Parameters
NameInTypeRequiredDescription
product_idpathstring(uuid)Yes—

Responses

getCurrentTrafficPackageProduct Responses
StatusDescription
200Current product revision.

Fields: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

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
404Resource is absent or not visible in the authorized scope.
408Read context was cancelled.
502Stored or core facts did not satisfy the public response contract.
503Read storage is unavailable.
504Read deadline expired.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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.
  • 404 The resource does not exist or belongs to another tenant.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.

↑ Back to list

POST /v1/admin/traffic-packages/products/{product_id}/archive

Remove a product from sale while preserving sold entitlements and history

operationId
archiveTrafficPackageProduct
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

All of:traffic_packages.manage

Parameters

archiveTrafficPackageProduct Parameters
NameInTypeRequiredDescription
product_idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Responses

archiveTrafficPackageProduct Responses
StatusDescription
200Immutable audited command receipt; identical retries return the same fact.

Fields:id: string(uuid) target_id: string(uuid) operation: string: archive_product / enable_grant / disable_grant revision: integer replayed: boolean

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
404Resource is absent or not visible in the authorized scope.
409Idempotency, 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.
503The 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.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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.
  • 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.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.

↑ Back to list

POST /v1/admin/traffic-packages/products/{product_id}/disable

Disable a product

operationId
disableTrafficPackageProduct
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

All of:traffic_packages.manage

Description (from the contract)

Appends a disabled lifecycle fact. Disabled products disappear from tenant current-product lists and cannot receive new grants; immutable revision history remains readable.

Parameters

disableTrafficPackageProduct Parameters
NameInTypeRequiredDescription
product_idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Responses

disableTrafficPackageProduct Responses
StatusDescription
200Appended lifecycle fact or identical committed replay.

Fields:product_id: string(uuid) product_revision: integer(int64) revision: integer(int64) sequence: integer(int64) enabled: boolean replayed: boolean

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
404Resource is absent or not visible in the authorized scope.
409Idempotency, 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.
503The 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.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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.
  • 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.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.

↑ Back to list

POST /v1/admin/traffic-packages/products/{product_id}/enable

Enable a product

operationId
enableTrafficPackageProduct
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

All of:traffic_packages.manage

Description (from the contract)

Appends an enabled lifecycle fact. Reusing the same idempotency key and payload returns the original receipt; a changed payload returns 409.

Parameters

enableTrafficPackageProduct Parameters
NameInTypeRequiredDescription
product_idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYes—
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Responses

enableTrafficPackageProduct Responses
StatusDescription
200Appended lifecycle fact or identical committed replay.

Fields:product_id: string(uuid) product_revision: integer(int64) revision: integer(int64) sequence: integer(int64) enabled: boolean replayed: boolean

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
404Resource is absent or not visible in the authorized scope.
409Idempotency, 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.
503The 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.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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.
  • 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.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.

↑ Back to list

GET /v1/admin/traffic-packages/products/{product_id}/revisions

List immutable product revision history

operationId
listTrafficPackageProductRevisions
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

All of:traffic_packages.read

Parameters

listTrafficPackageProductRevisions Parameters
NameInTypeRequiredDescription
product_idpathstring(uuid)Yes—
limitqueryintegerNo—
cursorquerystringNoOpaque 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.

Responses

listTrafficPackageProductRevisions Responses
StatusDescription
200Current products or immutable revision history.

Fields:items: array<Product> next_cursor?: string

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
408Read context was cancelled.
502Stored or core facts did not satisfy the public response contract.
503Read storage is unavailable.
504Read deadline expired.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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/traffic-packages/products/{product_id}/revisions

Create an immutable product revision

operationId
createTrafficPackageProductRevision
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

All of:traffic_packages.manage

Description (from the contract)

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.

Parameters

createTrafficPackageProductRevision Parameters
NameInTypeRequiredDescription
product_idpathstring(uuid)Yes—
If-MatchheaderstringYes—
Idempotency-KeyheaderstringYes—
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Request body

application/json · Required:Yes

createTrafficPackageProductRevision Request body
NameTypeRequiredDescription
audiencestring: global / tenantYes—
owner_tenant_scope_idstring(uuid)No—
namestringYes—
remarkstringNoMaximum 1024 UTF-8 bytes; no control characters.
allowed_package_idsarray<string(uuid)>NoEmpty means all base packages. Restrictions are captured per immutable revision and checked for purchase and consumption.
quota_bytesinteger(int64)Yes—
validity_daysintegerYes—
expiry_timezonestringYes—
priorityintegerYes—
currencystringYes—
price_minorinteger(int64)Yes—
metering_scopestringYes—
metering_versionstringYes—
enabledbooleanNoOmit to retain current status; defaults to enabled for new products.

Responses

createTrafficPackageProductRevision Responses
StatusDescription
201New immutable revision or the identical committed replay.

Fields:product_snapshot_id: string(uuid) product_id: string(uuid) revision: integer(int64) replayed: boolean

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
404Resource is absent or not visible in the authorized scope.
408Write result is unknown. Retry only with the same Idempotency-Key and identical payload.
409Idempotency, 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.
412The quoted If-Match revision is stale.
502The command committed but its bounded receipt could not be delivered. Recover only by retrying the same Idempotency-Key and identical payload.
503The 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.
504Write result is unknown. Retry only with the same Idempotency-Key and identical payload.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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.
  • 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.
  • 412 The revision changed: read the latest ETag, decide again, then send the new If-Match.
  • 503 A dependency is unavailable: retry later with the original Idempotency-Key.

↑ Back to list

GET /v1/admin/traffic-packages/sold

List sold grants across tenants with server-side filters and count

operationId
listSoldTrafficPackages
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

All of:traffic_packages.read

Parameters

listSoldTrafficPackages Parameters
NameInTypeRequiredDescription
pagequeryintegerNo—
limitqueryintegerNo—
searchquerystringNoUser name
product_idquerystring(uuid)No—
statusquerystring: active / disabled / exhausted / expired / reversedNo—

Responses

listSoldTrafficPackages Responses
StatusDescription
200Count and items use one database statement snapshot; pages reflect live state.

Fields:items: array<SoldItem> total: integer page: integer limit: integer

400Malformed headers, query, JSON, UUID, cursor, unit, or range.
401Ordinary session authentication is required.
403Principal scope or required permission is absent.
503The 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.

What to do on failure

  • 400 Fix the parameters or body per the field list; do not retry unchanged.
  • 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