Dexwize Subscription Service
Catalogue (plans, tiers and add-ons as versioned data), subscriptions, entitlements, invoice data, and the Azure Marketplace landing page and webhook, and the AWS, Google Cloud and Oracle marketplace endpoints (ADR-0040). Customer endpoints use Dexwize bearer tokens and always act on the token's tenant; cross-tenant ids return 404. Admin endpoints need PlatformOperate (a non-JIT platform-tenant session). Marketplace endpoints are authenticated by Entra tokens instead (see ADR-0015).
Version 1.0.0. Download the OpenAPI specification.
Authentication: bearer, entraBuyer, marketplaceWebhook, googlePubSub.
Operations
| Method | Path | Summary |
|---|---|---|
GET | /v1/admin/invoices/{month} | Invoices already generated for a month; generates nothing (operator) |
POST | /v1/admin/invoices/{month} | Generate invoice data for a completed month (idempotent; operator) |
GET | /v1/admin/marketplace/leads | Oracle Cloud Marketplace sales leads (operator) |
POST | /v1/admin/marketplace/leads/{leadId}/convert | Activate the pending subscription once the Oracle order is agreed (idempotent; operator) |
POST | /v1/admin/metering/run | Run hourly overage metering now (operator) |
GET | /v1/admin/partner-usage/{month} | Billed usage per tenant and partner for commissions (operator) |
POST | /v1/admin/reconciliation | Compare marketplace and internal state; optionally heal (operator) |
GET | /v1/admin/subscriptions | All subscriptions (operator) |
POST | /v1/admin/subscriptions | Create an active direct subscription (operator) |
GET | /v1/admin/tenants/{tenantId}/entitlement-overrides | Every override of the tenant, including expired and revoked ones, newest first (platform operator) |
POST | /v1/admin/tenants/{tenantId}/entitlement-overrides | Grant a time-boxed trial / proof-of-concept override (platform operator; audited entitlement.override.granted) |
DELETE | /v1/admin/tenants/{tenantId}/entitlement-overrides/{overrideId} | Revoke an active override (platform operator; audited entitlement.override.revoked) |
GET | /v1/admin/tenants/{tenantId}/entitlements | Any tenant's entitlement document, unredacted (platform operator) |
GET | /v1/admin/tenants/{tenantId}/invoices | One tenant's stored invoices, oldest month first (operator; vendor portal) |
GET | /v1/admin/tenants/{tenantId}/subscriptions | One tenant's subscriptions, newest first (operator; vendor portal) |
GET | /v1/catalog | The published catalogue |
GET | /v1/catalog/versions | All catalogue versions (operator) |
POST | /v1/catalog/versions | Add the next catalogue version as a draft (operator) |
POST | /v1/catalog/versions/{version}/publish | Publish a draft; the previously published version is retired (operator) |
GET | /v1/entitlements/me | The caller's tenant entitlement document (ADR-0053; any signed-in user of the tenant, for lock badges) |
GET | /v1/internal/entitlements/{tenantId} | Any tenant's entitlement document for services enforcing features (platform-level service token, entitlement_reader) |
POST | /v1/internal/partner-subscriptions | Create the partner-sold subscription of a customer a partner onboarded (partner-service only) |
POST | /v1/internal/partner-subscriptions/validate | Check a partner-sold subscription without creating it (partner-service only) |
GET | /v1/internal/partner-usage/{month} | Partner-sold billed usage for commission statements (partner-service only) |
GET | /v1/internal/revenue-facts | Month-end revenue facts for platform KPIs (operator-console only) |
GET | /v1/invoices | The caller's tenant invoices (ReportsRead) |
POST | /v1/marketplace/aws/fulfilment | AWS Marketplace fulfilment URL; redirects the buyer to the landing page with the registration token |
POST | /v1/marketplace/aws/landing/confirm | Provision the tenant and record the AWS subscription (idempotent) |
POST | /v1/marketplace/aws/landing/resolve | Resolve an AWS registration token for the signed-in buyer |
POST | /v1/marketplace/aws/sns | AWS Marketplace SNS notifications (subscription and entitlement topics) |
POST | /v1/marketplace/azure/landing/confirm | Provision the tenant and activate the purchase (idempotent) |
POST | /v1/marketplace/azure/landing/resolve | Resolve a purchase token for the signed-in buyer |
POST | /v1/marketplace/azure/webhook | Azure Marketplace operation notifications |
POST | /v1/marketplace/gcp/landing/confirm | Provision the tenant and approve the Google account and entitlement (idempotent) |
POST | /v1/marketplace/gcp/landing/resolve | Verify a Google signup JWT and show the pending entitlement to the signed-in buyer |
POST | /v1/marketplace/gcp/pubsub | Google Cloud Marketplace procurement events (Pub/Sub push) |
POST | /v1/marketplace/gcp/signup | Google Cloud Marketplace signup URL; redirects the buyer to the landing page with the signup JWT |
POST | /v1/marketplace/oracle/signup | Oracle Cloud Marketplace signup; creates a pending tenant and a sales lead (no billing) |
GET | /v1/partner/tenants/{tenantId}/entitlements | A customer's entitlement document for the partner that sold it (partner admin, PartnerTenantsRead) |
GET | /v1/subscriptions/{id} | A subscription visible to the caller |
GET | /v1/subscriptions/me | The caller's tenant subscriptions (TenantRead) |
GET /v1/admin/invoices/{month}
Invoices already generated for a month; generates nothing (operator)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
month | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | Invoices for the month | Invoice[] |
| 400 | Malformed month | |
| 403 | Not a platform-scope operator |
POST /v1/admin/invoices/{month}
Generate invoice data for a completed month (idempotent; operator)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
month | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | Invoices for the month | Invoice[] |
| 400 | Malformed month or month not yet ended |
GET /v1/admin/marketplace/leads
Oracle Cloud Marketplace sales leads (operator)
| Status | Description | Body |
|---|---|---|
| 200 | OK | MarketplaceLead[] |
POST /v1/admin/marketplace/leads/{leadId}/convert
Activate the pending subscription once the Oracle order is agreed (idempotent; operator)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
leadId | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | Converted lead | MarketplaceLead |
| 404 | Unknown lead |
POST /v1/admin/metering/run
Run hourly overage metering now (operator)
| Status | Description | Body |
|---|---|---|
| 200 | Run summary | MeteringRunResult |
GET /v1/admin/partner-usage/{month}
Billed usage per tenant and partner for commissions (operator)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
month | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | BilledUsage[] |
| 400 | Malformed month |
POST /v1/admin/reconciliation
Compare marketplace and internal state; optionally heal (operator)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
heal | query | boolean | no |
| Status | Description | Body |
|---|---|---|
| 200 | Discrepancy report | ReconciliationReport |
GET /v1/admin/subscriptions
All subscriptions (operator)
| Status | Description | Body |
|---|---|---|
| 200 | OK | Subscription[] |
POST /v1/admin/subscriptions
Create an active direct subscription (operator)
Request body: object (JSON).
| Status | Description | Body |
|---|---|---|
| 201 | Created | Subscription |
| 400 | Unknown plan or add-on, below minimums, or quote-only item without a negotiated price |
GET /v1/admin/tenants/{tenantId}/entitlement-overrides
Every override of the tenant, including expired and revoked ones, newest first (platform operator)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
tenantId | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | EntitlementOverride[] |
POST /v1/admin/tenants/{tenantId}/entitlement-overrides
Grant a time-boxed trial / proof-of-concept override (platform operator; audited entitlement.override.granted)
One module (all its features; not a core or partner-agreement module) or single sellable features, until the expiry (days or expiresAt; at most 90 days). Overrides only add features; they do not apply while the tenant is read-only.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
tenantId | path | string | yes |
Request body: GrantOverrideRequest (JSON).
| Status | Description | Body |
|---|---|---|
| 201 | Granted | EntitlementOverride |
| 400 | Invalid override (unknown or core module, unknown feature, both or neither, expiry, reason) | |
| 409 | No published catalogue, or the installation runs on an offline licence (error offline_licence) |
DELETE /v1/admin/tenants/{tenantId}/entitlement-overrides/{overrideId}
Revoke an active override (platform operator; audited entitlement.override.revoked)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
tenantId | path | string | yes | |
overrideId | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | Revoked | EntitlementOverride |
| 404 | No active override with that id for the tenant |
GET /v1/admin/tenants/{tenantId}/entitlements
Any tenant's entitlement document, unredacted (platform operator)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
tenantId | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | Entitlements |
| 403 | Not a platform-scope operator |
GET /v1/admin/tenants/{tenantId}/invoices
One tenant's stored invoices, oldest month first (operator; vendor portal)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
tenantId | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | Invoice[] |
| 403 | Not a platform-scope operator |
GET /v1/admin/tenants/{tenantId}/subscriptions
One tenant's subscriptions, newest first (operator; vendor portal)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
tenantId | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | Subscription[] |
| 403 | Not a platform-scope operator |
GET /v1/catalog
The published catalogue
| Status | Description | Body |
|---|---|---|
| 200 | OK | Catalog |
| 404 | No catalogue published yet |
GET /v1/catalog/versions
All catalogue versions (operator)
| Status | Description | Body |
|---|---|---|
| 200 | OK | Catalog[] |
| 403 | Not a platform-scope operator |
POST /v1/catalog/versions
Add the next catalogue version as a draft (operator)
Request body: Catalog (JSON).
| Status | Description | Body |
|---|---|---|
| 201 | Draft stored | Catalog |
| 400 | Catalogue failed validation | |
| 409 | Version is not the next one |
POST /v1/catalog/versions/{version}/publish
Publish a draft; the previously published version is retired (operator)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
version | path | integer | yes |
| Status | Description | Body |
|---|---|---|
| 200 | Published | Catalog |
| 409 | Unknown version or not a draft |
GET /v1/entitlements/me
The caller's tenant entitlement document (ADR-0053; any signed-in user of the tenant, for lock badges)
Plan, modules (enabled or not, with source and upgrade path), effective features, devices, term, source and active overrides. Vendor operator identities on overrides are redacted ("operator").
| Status | Description | Body |
|---|---|---|
| 200 | OK | Entitlements |
GET /v1/internal/entitlements/{tenantId}
Any tenant's entitlement document for services enforcing features (platform-level service token, entitlement_reader)
Read by the Dexwize.BuildingBlocks.Entitlements policy in each enforcing service, with the service's own token. The role inside a tenant-scoped token is refused. No device usage (critical path).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
tenantId | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | Entitlements |
| 403 | Not a platform-level service token holding entitlement_reader |
POST /v1/internal/partner-subscriptions
Create the partner-sold subscription of a customer a partner onboarded (partner-service only)
Platform-level service token with the service-only role subscription_provisioner (partner-service, ADR-0014 amendment 2026-11-21); while building-blocks does not yet define that role, a deployment may set PartnerProvisioning:AcceptCommissionReaderBridge=true to accept partner-service's commission_reader token instead. Creates a direct subscription sold by partnerId: the plan (per-device plans only), quantity = the devices drawn, term = the published catalogue's minimum term from termStart (default: first day of the current UTC month), monthly, not prepaid, no add-ons; it is Active at once and audited as subscription.partner_sold.created on the tenant's chain. Idempotent on the tenant: if the tenant already has a live (pending, active or suspended) subscription sold by the same partner it is returned with 200 and nothing is written; concurrent calls are serialized. Not routed through the gateway.
Request body: PartnerSubscriptionRequest (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | The tenant already has a live subscription sold by this partner (idempotent replay) | Subscription |
| 201 | Created | Subscription |
| 400 | Missing tenant or partner, unknown or quote-only plan, or below the catalogue minimums (key subscription) | |
| 403 | Not a platform-level service token with subscription_provisioner | |
| 409 | tenant_has_subscription (a live subscription the partner did not sell; the seller is not disclosed) or no_published_catalogue |
POST /v1/internal/partner-subscriptions/validate
Check a partner-sold subscription without creating it (partner-service only)
The same checks as POST /v1/internal/partner-subscriptions, without a tenant (tenantId may be omitted) and without writing anything. partner-service calls it before it draws devices or creates the tenant.
Request body: PartnerSubscriptionRequest (JSON).
| Status | Description | Body |
|---|---|---|
| 204 | Acceptable | |
| 400 | The reason it would be refused (key subscription) | |
| 403 | Not a platform-level service token with subscription_provisioner | |
| 409 | no_published_catalogue |
GET /v1/internal/partner-usage/{month}
Partner-sold billed usage for commission statements (partner-service only)
Platform-level service token with the service-only role commission_reader (partner-service, ADR-0014). Returns only rows with a selling partner. Not routed through the gateway.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
month | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | BilledUsage[] |
| 400 | Malformed month | |
| 403 | Not a platform-level service token with commission_reader |
GET /v1/internal/revenue-facts
Month-end revenue facts for platform KPIs (operator-console only)
Platform-level service token with the service-only role revenue_kpi_reader (operator-console, ADR-0050). One row per Active or Suspended subscription at each month end (the first instant of the next UTC month), valued as in docs/operations/kpis.md (definitions v1). Identifiers and amounts only; no names or contacts. Not routed through the gateway.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
from | query | string | yes | |
to | query | string | yes | Last month (inclusive); must have ended. At most 36 months per request. |
| Status | Description | Body |
|---|---|---|
| 200 | OK | RevenueFacts |
| 400 | Malformed or open month, or more than 36 months | |
| 403 | Not a platform-level service token with revenue_kpi_reader |
GET /v1/invoices
The caller's tenant invoices (ReportsRead)
| Status | Description | Body |
|---|---|---|
| 200 | OK | Invoice[] |
POST /v1/marketplace/aws/fulfilment
AWS Marketplace fulfilment URL; redirects the buyer to the landing page with the registration token
| Status | Description | Body |
|---|---|---|
| 302 | Redirect to the landing page | |
| 400 | Missing token | |
| 404 | AWS Marketplace is not enabled |
POST /v1/marketplace/aws/landing/confirm
Provision the tenant and record the AWS subscription (idempotent)
Request body: LandingConfirmRequest (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | Active subscription | Subscription |
| 400 | Invalid company name or plan not offered | |
| 401 | No valid Entra sign-in | |
| 502 | AWS refused the token | |
| 503 | AWS temporarily unavailable |
POST /v1/marketplace/aws/landing/resolve
Resolve an AWS registration token for the signed-in buyer
Request body: LandingTokenRequest (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | Purchase details | LandingView |
| 400 | Missing token or marketplace not enabled | |
| 401 | No valid Entra sign-in | |
| 502 | AWS refused the token | |
| 503 | AWS temporarily unavailable or the contract entitlement is not visible yet |
POST /v1/marketplace/aws/sns
AWS Marketplace SNS notifications (subscription and entitlement topics)
Authenticated by the SNS message signature: allow-listed topic, HTTPS SNS certificate URL and RSA signature over the canonical string.
| Status | Description | Body |
|---|---|---|
| 200 | Outcome: Applied, Duplicate, Stale, Refused or UnknownSubscription | MarketplaceOutcome |
| 400 | Malformed message or unknown action or product | |
| 403 | Signature, certificate URL, topic or timestamp not verified | |
| 404 | AWS Marketplace is not enabled | |
| 413 | Body over 64 KB | |
| 503 | AWS unavailable while re-reading the entitlement; SNS retries |
POST /v1/marketplace/azure/landing/confirm
Provision the tenant and activate the purchase (idempotent)
Request body: object (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | Active subscription | Subscription |
| 400 | Invalid company name or plan not offered | |
| 401 | No valid Entra sign-in | |
| 403 | Not the buyer |
POST /v1/marketplace/azure/landing/resolve
Resolve a purchase token for the signed-in buyer
Request body: object (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | Purchase details | LandingView |
| 401 | No valid Entra sign-in | |
| 403 | Signed-in user is not the purchaser or in the beneficiary directory | |
| 502 | Marketplace refused the request | |
| 503 | Marketplace temporarily unavailable |
POST /v1/marketplace/azure/webhook
Azure Marketplace operation notifications
| Status | Description | Body |
|---|---|---|
| 200 | Outcome: Applied, Duplicate, Stale, NotVerified, Refused or UnknownSubscription | object |
| 400 | Malformed or unknown action | |
| 401 | Token rejected | |
| 413 | Body over 64 KB | |
| 503 | Marketplace unavailable while verifying; the marketplace retries |
POST /v1/marketplace/gcp/landing/confirm
Provision the tenant and approve the Google account and entitlement (idempotent)
Request body: LandingConfirmRequest (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | Active subscription | Subscription |
| 400 | Invalid company name or plan not offered | |
| 401 | No valid Entra sign-in | |
| 403 | Signup JWT is not valid for Dexwize | |
| 503 | Google temporarily unavailable |
POST /v1/marketplace/gcp/landing/resolve
Verify a Google signup JWT and show the pending entitlement to the signed-in buyer
Request body: LandingTokenRequest (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | Purchase details | LandingView |
| 400 | Missing token or marketplace not enabled | |
| 401 | No valid Entra sign-in | |
| 403 | Signup JWT is not valid for Dexwize | |
| 503 | Google temporarily unavailable or the entitlement is not visible yet |
POST /v1/marketplace/gcp/pubsub
Google Cloud Marketplace procurement events (Pub/Sub push)
Request body: PubSubPush (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | Outcome: Applied, Duplicate, Stale, Refused, Ignored or UnknownSubscription | MarketplaceOutcome |
| 400 | Malformed envelope or event | |
| 401 | Push token rejected | |
| 404 | Google Cloud Marketplace is not enabled | |
| 413 | Body over 64 KB | |
| 503 | Google unavailable while re-reading the entitlement; Pub/Sub redelivers |
POST /v1/marketplace/gcp/signup
Google Cloud Marketplace signup URL; redirects the buyer to the landing page with the signup JWT
| Status | Description | Body |
|---|---|---|
| 302 | Redirect to the landing page | |
| 400 | Missing token | |
| 404 | Google Cloud Marketplace is not enabled |
POST /v1/marketplace/oracle/signup
Oracle Cloud Marketplace signup; creates a pending tenant and a sales lead (no billing)
Request body: OracleSignupRequest (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | Lead recorded (idempotent per signed-in user) | LeadReceipt |
| 400 | Invalid details or unknown listing | |
| 401 | No valid Entra sign-in | |
| 404 | Oracle Cloud Marketplace is not enabled |
GET /v1/partner/tenants/{tenantId}/entitlements
A customer's entitlement document for the partner that sold it (partner admin, PartnerTenantsRead)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
tenantId | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | Entitlements |
| 403 | Caller lacks PartnerTenantsRead | |
| 404 | The caller's partner is not the reseller on the tenant's governing subscription (or JIT session) |
GET /v1/subscriptions/{id}
A subscription visible to the caller
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | Subscription |
| 404 | Not found or not visible |
GET /v1/subscriptions/me
The caller's tenant subscriptions (TenantRead)
| Status | Description | Body |
|---|---|---|
| 200 | OK | Subscription[] |