MethodPathSummaryAuth
GET/v1/admin/package-commerce/ordersList all package orders for one explicit tenantSession
GET/v1/admin/package-commerce/orders/{order_id}Get one order in an explicit tenant scopeSession
GET/v1/admin/package-commerce/orders/{order_id}/eventsList sanitized events for one tenant orderSession
POST/v1/admin/package-commerce/orders/{order_id}/refundApply an approved partial or cumulative refundSession
POST/v1/admin/package-commerce/orders/{order_id}/voidVoid an eligible order using a one-time approval factSession
GET/v1/admin/package-commerce/soldList sold packages across tenantsSession
POST/v1/admin/package-commerce/sold/commands—Session
GET/v1/admin/package-commerce/sold/{subscription_id}—Session
GET/v1/admin/package-commerce/sold/{subscription_id}/sync—Session
GET/v1/admin/package-commerce/subscriptionsList effective sold subscriptions for one explicit tenantSession
POST/v1/admin/package-commerce/subscriptionsOpen a package subscription for an active tenant member without an orderSession
POST/v1/admin/package-commerce/subscriptions/{subscription_id}/cancelCancel a tenant subscription as administratorSession
POST/v1/admin/package-commerce/subscriptions/{subscription_id}/suspendSuspend one package subscription as an administratorSession
POST/v1/admin/package-commerce/subscriptions/{subscription_id}/unsuspendUnsuspend one package subscription as an administratorSession
GET/v1/admin/package-commerce/traffic-purchases/{order_id}Get one sanitized traffic-purchase result for an explicit tenantSession

Contract file:api/control-package-commerce.openapi.yaml api/control-package-sold.openapi.yaml

Operation details

GET /v1/admin/package-commerce/orders

List all package orders for one explicit tenant

operationId
listTenantPackageOrdersAsPlatform
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:billing.adjustments.manage

Parameters

listTenantPackageOrdersAsPlatform Parameters
NameInTypeRequiredDescription
tenant_idquerystring(uuid)YesTarget tenant access-scope UUID; platform routes never infer it.
limitqueryintegerNo—
cursorquerystringNoVersioned base64url HMAC-SHA256 envelope bound to endpoint, target tenant, and owner user where applicable. Tampering or cross-scope reuse returns package_commerce_validation_error.
operationquerystring: upgrade / downgradeNoOptional platform-only filter for package upgrade or downgrade orders.
product_kindquerystring: package_subscription / traffic_packageNoOptional order product filter shared by tenant and platform order reads.
statequerystring: created / paid / fulfilled / cancelled / refund_applied / void_applied / failedNoOptional latest order state filter shared by tenant and platform order reads.
request_idquerystringNoOptional X-Request-ID the order was created with, so a buyer can confirm the outcome of the original command.

Responses

listTenantPackageOrdersAsPlatform Responses
StatusDescription
200Stable keyset page ordered by created_at and order UUID descending.

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

400Invalid JSON, UUID, enum, amount, time zone, query, cursor, or required header.
401Authentication is absent or invalid.
403Current scope or live permission does not authorize the operation.
408Caller cancelled the query.
502Stored facts or encoded response violate the public response contract.
503Query storage or required callback verification is unavailable.
504Query deadline elapsed.

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/package-commerce/orders/{order_id}

Get one order in an explicit tenant scope

operationId
getTenantPackageOrderAsPlatform
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:billing.adjustments.manage

Parameters

getTenantPackageOrderAsPlatform Parameters
NameInTypeRequiredDescription
order_idpathstring(uuid)Yes—
tenant_idquerystring(uuid)YesTarget tenant access-scope UUID; platform routes never infer it.

Responses

getTenantPackageOrderAsPlatform Responses
StatusDescription
200Sanitized visible order.

Fields:id: string(uuid) display_id: string tenant_scope_id: string(uuid) user_id: string(uuid) user_display_id: string operation: string: purchase / renew / upgrade / downgrade / traffic_package_purchase subscription_id?: string(uuid) product_kind: string: package_subscription / traffic_package product_id: string(uuid) product_revision: integer(int64) protection?: object traffic_product_snapshot_id?: string(uuid) package_period?: string: month / quarter / year currency: string original_amount_minor: integer(int64) discount_amount_minor: integer(int64) payable_amount_minor: integer(int64) settlement_direction: string: debit / credit / hold funding_source: string: balance / provider / reseller effective_mode: string: immediate / next_cycle effective_at: string(date-time) state: string: created / paid / fulfilled / cancelled / refund_applied / void_applied / failed revision: integer(int64) created_at: string(date-time) seller_scope_id?: object wholesale_minor?: integer(int64) product_name?: string

400Invalid JSON, UUID, enum, amount, time zone, query, cursor, or required header.
401Authentication is absent or invalid.
403Current scope or live permission does not authorize the operation.
404Resource is absent or outside the caller's visible tenant/owner scope.
408Caller cancelled the query.
502Stored facts or encoded response violate the public response contract.
503Query storage or required callback verification is unavailable.
504Query deadline elapsed.

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/package-commerce/orders/{order_id}/events

List sanitized events for one tenant order

operationId
listTenantPackageOrderEventsAsPlatform
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:billing.adjustments.manage

Parameters

listTenantPackageOrderEventsAsPlatform Parameters
NameInTypeRequiredDescription
order_idpathstring(uuid)Yes—
tenant_idquerystring(uuid)YesTarget tenant access-scope UUID; platform routes never infer it.
limitqueryintegerNo—
cursorquerystringNoVersioned base64url HMAC-SHA256 envelope bound to endpoint, target tenant, and owner user where applicable. Tampering or cross-scope reuse returns package_commerce_validation_error.

Responses

listTenantPackageOrderEventsAsPlatform Responses
StatusDescription
200Stable event page ordered by revision ascending.

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

400Invalid JSON, UUID, enum, amount, time zone, query, cursor, or required header.
401Authentication is absent or invalid.
403Current scope or live permission does not authorize the operation.
404Resource is absent or outside the caller's visible tenant/owner scope.
408Caller cancelled the query.
502Stored facts or encoded response violate the public response contract.
503Query storage or required callback verification is unavailable.
504Query deadline elapsed.

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/package-commerce/orders/{order_id}/refund

Apply an approved partial or cumulative refund

operationId
refundPackageOrder
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:billing.adjustments.manage

Description (from the contract)

Requires a platform principal with billing.adjustments.manage and an explicit tenant_id. The core requires a matching unexpired, unused two-person approval fact; this endpoint neither creates nor weakens that approval. gross_amount_minor is the gross amount for this refund action.

Parameters

refundPackageOrder Parameters
NameInTypeRequiredDescription
order_idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYesOne bounded business-action key. Exact retries preserve the original payload, target, principal, and If-Match precondition. Reuse with changed input returns idempotency_conflict.
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Request body

application/json · Required:Yes

refundPackageOrder Request body
NameTypeRequiredDescription
tenant_idstring(uuid)Yes—
gross_amount_minorinteger(int64)Yes—
revoke_entitlementbooleanYes—
approval_idstring(uuid) | stringNoOptional. Refunds no longer require a second administrator's approval. When supplied it must be a canonical UUID of an unexpired, unused manual approval for this order and operation; it is then validated and consumed as before. An empty string is treated as absent.

Responses

refundPackageOrder Responses
StatusDescription
200Applied command result or identical committed replay.

Fields:order: Order fulfillment?: Fulfillment replayed: boolean

400Invalid JSON, UUID, enum, amount, time zone, query, cursor, or required header.
401Authentication is absent or invalid.
403Current scope or live permission does not authorize the operation.
404Resource is absent or outside the caller's visible tenant/owner scope.
409Idempotency, provider event, state, approval, refund, or traffic-use conflict.
422Funding, promotion, arithmetic, or fulfillment policy rejected the command.
408The write outcome is unknown. Retry only the exact original request with the same Idempotency-Key and If-Match value where present.
502Stored facts or encoded response violate the public response contract.
503The write outcome is unknown. Retry only the exact original request with the same Idempotency-Key and If-Match value where present.
504The write outcome is unknown. Retry only the exact original request with the same Idempotency-Key and If-Match value where present.

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/package-commerce/orders/{order_id}/void

Void an eligible order using a one-time approval fact

operationId
voidPackageOrder
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:billing.adjustments.manage

Description (from the contract)

Requires billing.adjustments.manage and an explicit tenant_id. The approval must match the order, tenant, operation, executor, and validity window. Existing refunds or a consumed approval remain hard failures.

Parameters

voidPackageOrder Parameters
NameInTypeRequiredDescription
order_idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYesOne bounded business-action key. Exact retries preserve the original payload, target, principal, and If-Match precondition. Reuse with changed input returns idempotency_conflict.
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Request body

application/json · Required:Yes

voidPackageOrder Request body
NameTypeRequiredDescription
tenant_idstring(uuid)Yes—
approval_idstring(uuid) | stringNoOptional. Voids no longer require a second administrator's approval. When supplied it is validated and consumed as before; an empty string is treated as absent.

Responses

voidPackageOrder Responses
StatusDescription
200Applied command result or identical committed replay.

Fields:order: Order fulfillment?: Fulfillment replayed: boolean

400Invalid JSON, UUID, enum, amount, time zone, query, cursor, or required header.
401Authentication is absent or invalid.
403Current scope or live permission does not authorize the operation.
404Resource is absent or outside the caller's visible tenant/owner scope.
409Idempotency, provider event, state, approval, refund, or traffic-use conflict.
408The write outcome is unknown. Retry only the exact original request with the same Idempotency-Key and If-Match value where present.
502Stored facts or encoded response violate the public response contract.
503The write outcome is unknown. Retry only the exact original request with the same Idempotency-Key and If-Match value where present.
504The write outcome is unknown. Retry only the exact original request with the same Idempotency-Key and If-Match value where present.

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/package-commerce/sold

List sold packages across tenants

operationId
listAdminSoldPackages
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:billing.adjustments.manage

Description (from the contract)

Requires a platform-scope principal. Empty optional parameters must be omitted; duplicate and unknown parameters are rejected. Product options include all sold products independent of filters, without a 100-item cap. Names come from the effective immutable product snapshot. User display IDs come from users.display_id. A subscription ID is its actual UUID, never its revision. Expiry week is the next 7 days; month is the next calendar month, both excluding already expired records. Expired includes ends_at equal to the query time. Status is the stored lifecycle status; an expired active subscription still has lifecycle_status active. Usage is currently null because the commerce read model has no authoritative settled per-cycle counter; unknown usage matches neither exhausted nor remaining. A traffic limit of -1 means unlimited. CNAME searches current and last-known-good hostname claims associated with the subscription or one of its sites. Search values are literal case-insensitive substrings, not SQL patterns.

Parameters

listAdminSoldPackages Parameters
NameInTypeRequiredDescription
pagequeryintegerNo—
limitqueryintegerNo—
expiryquerystring: all / month / week / expiredNo—
product_idquerystring(uuid)No—
sortquerystring: created_at_desc / ends_at_ascNo—
statusquerystring: all / enabled / disabled / active / cancelledNo—
usagequerystring: all / exhausted / remainingNo—
user_idquerystringNoExact owner UUID or positive decimal user display ID.
qquerystringNoLiteral substring of the package snapshot name or (when not all digits) of the subscription UUID; a positive decimal also matches the package display ID exactly.
cnamequerystringNo—

Responses

listAdminSoldPackages Responses
StatusDescription
200Globally filtered page with count and complete sold-product options.

Fields:items: array<SoldPackage> count: integer(int64) products: array<object>

400Invalid parameters (package_commerce_validation_error).
401Authentication required.
403Platform scope and billing.adjustments.manage required.
408Request cancelled.
502Invalid stored facts or oversized response.
503Read store unavailable.
504Query deadline exceeded.

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/package-commerce/sold/commands

operationId
administerSoldPackages
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:package_subscriptions.manage

Description (from the contract)

Executes all selected items in one transaction. The live session and RBAC are rechecked, including replay. A changed body under an existing key is rejected. Editing appends an entitlement snapshot without rewriting the purchased catalog version or historical prices. Enable/disable is independent of cancellation. Safe deletion rejects live resources; cascade deletion uses audited resource deletion and edge publication. Neither mode refunds money; unsettled orders, held balances and scheduled entitlements block deletion. Sync copies only selected fields to bound websites and L4 forwarding resources, then persists signed edge publication, rollout and node command outbox. Publication receipts are polled separately and command success does not imply every node has applied it.

Parameters

administerSoldPackages Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringYes—
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Request body

application/json · Required:Yes

administerSoldPackages Request body
NameTypeRequiredDescription
actionstring: edit / enable / disable / delete / syncYes—
itemsarray<object>Yes—
configSoldConfigNo—
ends_atstring(date-time)No—
delete_modestring: safe / cascadeNo—
sync_fieldsarray<string: line_group / cname_domain / cname_mode>No—

Responses

administerSoldPackages Responses
StatusDescription
200Persisted command or exact idempotent replay.

Fields:items: array<SoldDetail> publications: array<SoldPublication> replayed: boolean

400Invalid or duplicate fields/items; edit requires one item and a full config.
401A live platform session is required.
403Required package/resource/DNS/publication permission denied.
409package_sold_dependencies, package_sold_financial_dependencies, package_sold_setting_unsupported, package_sold_invalid_state or idempotency_conflict.
412revision_conflict; no item was modified.
503package_sold_runtime_unavailable; no item was modified.

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.
  • 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/package-commerce/sold/{subscription_id}

operationId
getAdminSoldPackage
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:billing.adjustments.manage

Parameters

getAdminSoldPackage Parameters
NameInTypeRequiredDescription
subscription_idpathstring(uuid)Yes—

Responses

getAdminSoldPackage Responses
StatusDescription
200Effective sold snapshot and complete authorized reference options.

Fields:id: string(uuid) tenant_scope_id: string(uuid) owner_user_id: string(uuid) revision: integer enabled: boolean deleted: boolean ends_at: string(date-time) config: SoldConfig options: object

403Platform read permission required.
404Subscription not found.

What to do on failure

  • 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.

↑ Back to list

GET /v1/admin/package-commerce/sold/{subscription_id}/sync

operationId
getAdminSoldPackageSync
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:billing.adjustments.manage

Parameters

getAdminSoldPackageSync Parameters
NameInTypeRequiredDescription
subscription_idpathstring(uuid)Yes—

Responses

getAdminSoldPackageSync Responses
StatusDescription
200Latest 20 publications with authoritative rollout and latest node attempt counts.

Fields:publications: array<object>

403Platform read permission required.
404Subscription not found.

What to do on failure

  • 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.

↑ Back to list

GET /v1/admin/package-commerce/subscriptions

List effective sold subscriptions for one explicit tenant

operationId
listSoldPackageSubscriptionsAsPlatform
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:billing.adjustments.manage

Description (from the contract)

Uses the fixed-time effective entitlement projection. Each subsequent page reuses all three values from the endpoint- and tenant-bound signed cursor, so later entitlement backfills, renewals, or cancellations cannot create mixed facts.

Parameters

listSoldPackageSubscriptionsAsPlatform Parameters
NameInTypeRequiredDescription
tenant_idquerystring(uuid)YesTarget tenant access-scope UUID; platform routes never infer it.
limitqueryintegerNo—
cursorquerystringNoVersioned base64url HMAC-SHA256 envelope bound to endpoint, target tenant, and owner user where applicable. Tampering or cross-scope reuse returns package_commerce_validation_error.
statusquerystring: active / expired / cancelledNoEffective status at the frozen snapshot. active ends after snapshot_at; expired ends at or before snapshot_at; cancelled always follows the immutable cancelled lifecycle fact regardless of end_at.
end_at_fromquerystring(date-time)NoInclusive canonical UTC microsecond lower bound for end_at.
end_at_toquerystring(date-time)NoExclusive canonical UTC microsecond upper bound for end_at.
include_product_namequerystring: true / falseNoAccepts exactly one lowercase true or false. Empty, repeated, or other values return 400. Omitted or false preserves the legacy response shape. true includes product_name only when the selected effective entitlement's immutable product_snapshot.name is a JSON string, preserved without normalization. Missing, null, or non-string names are omitted. The current product catalog is never used. This projection does not change subscription membership, ordering, or the cursor's tenant, owner, time, and high-water bounds.

Responses

listSoldPackageSubscriptionsAsPlatform Responses
StatusDescription
200Stable effective-subscription projection page.

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

400Invalid JSON, UUID, enum, amount, time zone, query, cursor, or required header.
401Authentication is absent or invalid.
403Current scope or live permission does not authorize the operation.
408Caller cancelled the query.
502Stored facts or encoded response violate the public response contract.
503Query storage or required callback verification is unavailable.
504Query deadline elapsed.

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/package-commerce/subscriptions

Open a package subscription for an active tenant member without an order

operationId
openPackageSubscriptionAsPlatform
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:package_subscriptions.manage

Description (from the contract)

Creates the subscription, immutable revision-one state, and active manual_open entitlement atomically. It never fabricates an order, payment, or fulfillment. Unknown outcomes may be retried only with the exact original body and Idempotency-Key.

Parameters

openPackageSubscriptionAsPlatform Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringYesOne bounded business-action key. Exact retries preserve the original payload, target, principal, and If-Match precondition. Reuse with changed input returns idempotency_conflict.
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Request body

application/json · Required:Yes

openPackageSubscriptionAsPlatform Request body
NameTypeRequiredDescription
tenant_idstring(uuid)Yes—
owner_user_idstring(uuid)Yes—
product_idstring(uuid)Yes—
product_revisioninteger(int64)Yes—
site_limitinteger(int64)Yes-1 means unlimited; otherwise 0 through 1,000,000,000.
node_limitinteger(int64)Yes-1 means unlimited; otherwise 0 through 1,000,000,000.
durationstring: month / quarter / yearNo—
end_atstring(date-time)No—
timezonestringYes—
cycle_policyobject | objectYes—
traffic_factorTrafficFactorYes—

Responses

openPackageSubscriptionAsPlatform Responses
StatusDescription
201Subscription and entitlement created, or an identical committed replay returned.

Fields:subscription_id: string(uuid) tenant_scope_id: string(uuid) owner_user_id: string(uuid) product_id: string(uuid) product_revision: integer(int64) starts_at: string(date-time) ends_at: string(date-time) lifecycle_status: string revision: integer(int64) replayed: boolean

400Invalid JSON, UUID, enum, amount, time zone, query, cursor, or required header.
401Authentication is absent or invalid.
403Current scope or live permission does not authorize the operation.
404Resource is absent or outside the caller's visible tenant/owner scope.
409Idempotency, provider event, state, approval, refund, or traffic-use conflict.
408The write outcome is unknown. Retry only the exact original request with the same Idempotency-Key and If-Match value where present.
502Stored facts or encoded response violate the public response contract.
503The write outcome is unknown. Retry only the exact original request with the same Idempotency-Key and If-Match value where present.
504The write outcome is unknown. Retry only the exact original request with the same Idempotency-Key and If-Match value where present.

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/package-commerce/subscriptions/{subscription_id}/cancel

Cancel a tenant subscription as administrator

operationId
cancelPackageSubscriptionAsPlatform
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:package_subscriptions.manage

Description (from the contract)

Physical deletion is not supported by cancellation. Use sold package commands for independent enable/disable and audited deletion.

Parameters

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

Request body

application/json · Required:Yes

cancelPackageSubscriptionAsPlatform Request body
NameTypeRequiredDescription
tenant_idstring(uuid)Yes—

Responses

cancelPackageSubscriptionAsPlatform Responses
StatusDescription
201Cancelled subscription or exact idempotent replay.

Fields:subscription: object intent?: object

400Invalid request.
403Permission denied.
404Subscription not found.
409Invalid subscription state or idempotency conflict.
412Revision conflict.

What to do on failure

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

↑ Back to list

POST /v1/admin/package-commerce/subscriptions/{subscription_id}/suspend

Suspend one package subscription as an administrator

operationId
suspendPackageSubscriptionAsPlatform
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:package_subscriptions.manage

Description (from the contract)

Stops publishing the subscription's sites and forwards (configuration kept) and republishes the scope at once. The term keeps running. Only this subscription is affected. Suspending an already suspended subscription succeeds without a change. reason is required.

Parameters

suspendPackageSubscriptionAsPlatform Parameters
NameInTypeRequiredDescription
subscription_idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYesOne bounded business-action key. Exact retries preserve the original payload, target, principal, and If-Match precondition. Reuse with changed input returns idempotency_conflict.
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Request body

application/json · Required:Yes

suspendPackageSubscriptionAsPlatform Request body
NameTypeRequiredDescription
tenant_idstring(uuid)Yes—
reasonstringYes—

Responses

suspendPackageSubscriptionAsPlatform Responses
StatusDescription
200The subscription after the change (or unchanged when already in that state), or an exact idempotent replay.

Fields:subscription: object

400Invalid JSON, UUID, enum, amount, time zone, query, cursor, or required header.
401Authentication is absent or invalid.
403Current scope or live permission does not authorize the operation.
404Resource is absent or outside the caller's visible tenant/owner scope.
409Idempotency, provider event, state, approval, refund, or traffic-use conflict.

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.

↑ Back to list

POST /v1/admin/package-commerce/subscriptions/{subscription_id}/unsuspend

Unsuspend one package subscription as an administrator

operationId
unsuspendPackageSubscriptionAsPlatform
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:package_subscriptions.manage

Description (from the contract)

Publishes the subscription's sites and forwards again at once. Unsuspending a subscription that is not suspended succeeds without a change.

Parameters

unsuspendPackageSubscriptionAsPlatform Parameters
NameInTypeRequiredDescription
subscription_idpathstring(uuid)Yes—
Idempotency-KeyheaderstringYesOne bounded business-action key. Exact retries preserve the original payload, target, principal, and If-Match precondition. Reuse with changed input returns idempotency_conflict.
X-Request-IDheaderstringYes—
traceparentheaderstringYes—

Request body

application/json · Required:Yes

unsuspendPackageSubscriptionAsPlatform Request body
NameTypeRequiredDescription
tenant_idstring(uuid)Yes—

Responses

unsuspendPackageSubscriptionAsPlatform Responses
StatusDescription
200The subscription after the change (or unchanged when already in that state), or an exact idempotent replay.

Fields:subscription: object

400Invalid JSON, UUID, enum, amount, time zone, query, cursor, or required header.
401Authentication is absent or invalid.
403Current scope or live permission does not authorize the operation.
404Resource is absent or outside the caller's visible tenant/owner scope.
409Idempotency, provider event, state, approval, refund, or traffic-use conflict.

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.

↑ Back to list

GET /v1/admin/package-commerce/traffic-purchases/{order_id}

Get one sanitized traffic-purchase result for an explicit tenant

operationId
getTenantTrafficPackagePurchaseAsPlatform
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:billing.adjustments.manage

Description (from the contract)

The platform principal must name the target tenant. A purchase outside that tenant scope is indistinguishable from an unknown order.

Parameters

getTenantTrafficPackagePurchaseAsPlatform Parameters
NameInTypeRequiredDescription
order_idpathstring(uuid)Yes—
tenant_idquerystring(uuid)YesTarget tenant access-scope UUID; platform routes never infer it.

Responses

getTenantTrafficPackagePurchaseAsPlatform Responses
StatusDescription
200Sanitized traffic order and an optional grant while provider payment is pending.

Fields:order: Order grant?: TrafficGrant

400Invalid JSON, UUID, enum, amount, time zone, query, cursor, or required header.
401Authentication is absent or invalid.
403Current scope or live permission does not authorize the operation.
404Resource is absent or outside the caller's visible tenant/owner scope.
408Caller cancelled the query.
502Stored facts or encoded response violate the public response contract.
503Query storage or required callback verification is unavailable.
504Query deadline elapsed.

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