Skip to main content

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​

MethodPathSummary
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/leadsOracle Cloud Marketplace sales leads (operator)
POST/v1/admin/marketplace/leads/{leadId}/convertActivate the pending subscription once the Oracle order is agreed (idempotent; operator)
POST/v1/admin/metering/runRun hourly overage metering now (operator)
GET/v1/admin/partner-usage/{month}Billed usage per tenant and partner for commissions (operator)
POST/v1/admin/reconciliationCompare marketplace and internal state; optionally heal (operator)
GET/v1/admin/subscriptionsAll subscriptions (operator)
POST/v1/admin/subscriptionsCreate an active direct subscription (operator)
GET/v1/admin/tenants/{tenantId}/entitlement-overridesEvery override of the tenant, including expired and revoked ones, newest first (platform operator)
POST/v1/admin/tenants/{tenantId}/entitlement-overridesGrant 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}/entitlementsAny tenant's entitlement document, unredacted (platform operator)
GET/v1/admin/tenants/{tenantId}/invoicesOne tenant's stored invoices, oldest month first (operator; vendor portal)
GET/v1/admin/tenants/{tenantId}/subscriptionsOne tenant's subscriptions, newest first (operator; vendor portal)
GET/v1/catalogThe published catalogue
GET/v1/catalog/versionsAll catalogue versions (operator)
POST/v1/catalog/versionsAdd the next catalogue version as a draft (operator)
POST/v1/catalog/versions/{version}/publishPublish a draft; the previously published version is retired (operator)
GET/v1/entitlements/meThe 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-subscriptionsCreate the partner-sold subscription of a customer a partner onboarded (partner-service only)
POST/v1/internal/partner-subscriptions/validateCheck 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-factsMonth-end revenue facts for platform KPIs (operator-console only)
GET/v1/invoicesThe caller's tenant invoices (ReportsRead)
POST/v1/marketplace/aws/fulfilmentAWS Marketplace fulfilment URL; redirects the buyer to the landing page with the registration token
POST/v1/marketplace/aws/landing/confirmProvision the tenant and record the AWS subscription (idempotent)
POST/v1/marketplace/aws/landing/resolveResolve an AWS registration token for the signed-in buyer
POST/v1/marketplace/aws/snsAWS Marketplace SNS notifications (subscription and entitlement topics)
POST/v1/marketplace/azure/landing/confirmProvision the tenant and activate the purchase (idempotent)
POST/v1/marketplace/azure/landing/resolveResolve a purchase token for the signed-in buyer
POST/v1/marketplace/azure/webhookAzure Marketplace operation notifications
POST/v1/marketplace/gcp/landing/confirmProvision the tenant and approve the Google account and entitlement (idempotent)
POST/v1/marketplace/gcp/landing/resolveVerify a Google signup JWT and show the pending entitlement to the signed-in buyer
POST/v1/marketplace/gcp/pubsubGoogle Cloud Marketplace procurement events (Pub/Sub push)
POST/v1/marketplace/gcp/signupGoogle Cloud Marketplace signup URL; redirects the buyer to the landing page with the signup JWT
POST/v1/marketplace/oracle/signupOracle Cloud Marketplace signup; creates a pending tenant and a sales lead (no billing)
GET/v1/partner/tenants/{tenantId}/entitlementsA 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/meThe caller's tenant subscriptions (TenantRead)

GET /v1/admin/invoices/{month}​

Invoices already generated for a month; generates nothing (operator)

ParameterInTypeRequiredDescription
monthpathstringyes
StatusDescriptionBody
200Invoices for the monthInvoice[]
400Malformed month
403Not a platform-scope operator

POST /v1/admin/invoices/{month}​

Generate invoice data for a completed month (idempotent; operator)

ParameterInTypeRequiredDescription
monthpathstringyes
StatusDescriptionBody
200Invoices for the monthInvoice[]
400Malformed month or month not yet ended

GET /v1/admin/marketplace/leads​

Oracle Cloud Marketplace sales leads (operator)

StatusDescriptionBody
200OKMarketplaceLead[]

POST /v1/admin/marketplace/leads/{leadId}/convert​

Activate the pending subscription once the Oracle order is agreed (idempotent; operator)

ParameterInTypeRequiredDescription
leadIdpathstringyes
StatusDescriptionBody
200Converted leadMarketplaceLead
404Unknown lead

POST /v1/admin/metering/run​

Run hourly overage metering now (operator)

StatusDescriptionBody
200Run summaryMeteringRunResult

GET /v1/admin/partner-usage/{month}​

Billed usage per tenant and partner for commissions (operator)

ParameterInTypeRequiredDescription
monthpathstringyes
StatusDescriptionBody
200OKBilledUsage[]
400Malformed month

POST /v1/admin/reconciliation​

Compare marketplace and internal state; optionally heal (operator)

ParameterInTypeRequiredDescription
healquerybooleanno
StatusDescriptionBody
200Discrepancy reportReconciliationReport

GET /v1/admin/subscriptions​

All subscriptions (operator)

StatusDescriptionBody
200OKSubscription[]

POST /v1/admin/subscriptions​

Create an active direct subscription (operator)

Request body: object (JSON).

StatusDescriptionBody
201CreatedSubscription
400Unknown 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)

ParameterInTypeRequiredDescription
tenantIdpathstringyes
StatusDescriptionBody
200OKEntitlementOverride[]

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.

ParameterInTypeRequiredDescription
tenantIdpathstringyes

Request body: GrantOverrideRequest (JSON).

StatusDescriptionBody
201GrantedEntitlementOverride
400Invalid override (unknown or core module, unknown feature, both or neither, expiry, reason)
409No 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)

ParameterInTypeRequiredDescription
tenantIdpathstringyes
overrideIdpathstringyes
StatusDescriptionBody
200RevokedEntitlementOverride
404No active override with that id for the tenant

GET /v1/admin/tenants/{tenantId}/entitlements​

Any tenant's entitlement document, unredacted (platform operator)

ParameterInTypeRequiredDescription
tenantIdpathstringyes
StatusDescriptionBody
200OKEntitlements
403Not a platform-scope operator

GET /v1/admin/tenants/{tenantId}/invoices​

One tenant's stored invoices, oldest month first (operator; vendor portal)

ParameterInTypeRequiredDescription
tenantIdpathstringyes
StatusDescriptionBody
200OKInvoice[]
403Not a platform-scope operator

GET /v1/admin/tenants/{tenantId}/subscriptions​

One tenant's subscriptions, newest first (operator; vendor portal)

ParameterInTypeRequiredDescription
tenantIdpathstringyes
StatusDescriptionBody
200OKSubscription[]
403Not a platform-scope operator

GET /v1/catalog​

The published catalogue

StatusDescriptionBody
200OKCatalog
404No catalogue published yet

GET /v1/catalog/versions​

All catalogue versions (operator)

StatusDescriptionBody
200OKCatalog[]
403Not a platform-scope operator

POST /v1/catalog/versions​

Add the next catalogue version as a draft (operator)

Request body: Catalog (JSON).

StatusDescriptionBody
201Draft storedCatalog
400Catalogue failed validation
409Version is not the next one

POST /v1/catalog/versions/{version}/publish​

Publish a draft; the previously published version is retired (operator)

ParameterInTypeRequiredDescription
versionpathintegeryes
StatusDescriptionBody
200PublishedCatalog
409Unknown 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").

StatusDescriptionBody
200OKEntitlements

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

ParameterInTypeRequiredDescription
tenantIdpathstringyes
StatusDescriptionBody
200OKEntitlements
403Not 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).

StatusDescriptionBody
200The tenant already has a live subscription sold by this partner (idempotent replay)Subscription
201CreatedSubscription
400Missing tenant or partner, unknown or quote-only plan, or below the catalogue minimums (key subscription)
403Not a platform-level service token with subscription_provisioner
409tenant_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).

StatusDescriptionBody
204Acceptable
400The reason it would be refused (key subscription)
403Not a platform-level service token with subscription_provisioner
409no_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.

ParameterInTypeRequiredDescription
monthpathstringyes
StatusDescriptionBody
200OKBilledUsage[]
400Malformed month
403Not 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.

ParameterInTypeRequiredDescription
fromquerystringyes
toquerystringyesLast month (inclusive); must have ended. At most 36 months per request.
StatusDescriptionBody
200OKRevenueFacts
400Malformed or open month, or more than 36 months
403Not a platform-level service token with revenue_kpi_reader

GET /v1/invoices​

The caller's tenant invoices (ReportsRead)

StatusDescriptionBody
200OKInvoice[]

POST /v1/marketplace/aws/fulfilment​

AWS Marketplace fulfilment URL; redirects the buyer to the landing page with the registration token

StatusDescriptionBody
302Redirect to the landing page
400Missing token
404AWS Marketplace is not enabled

POST /v1/marketplace/aws/landing/confirm​

Provision the tenant and record the AWS subscription (idempotent)

Request body: LandingConfirmRequest (JSON).

StatusDescriptionBody
200Active subscriptionSubscription
400Invalid company name or plan not offered
401No valid Entra sign-in
502AWS refused the token
503AWS temporarily unavailable

POST /v1/marketplace/aws/landing/resolve​

Resolve an AWS registration token for the signed-in buyer

Request body: LandingTokenRequest (JSON).

StatusDescriptionBody
200Purchase detailsLandingView
400Missing token or marketplace not enabled
401No valid Entra sign-in
502AWS refused the token
503AWS 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.

StatusDescriptionBody
200Outcome: Applied, Duplicate, Stale, Refused or UnknownSubscriptionMarketplaceOutcome
400Malformed message or unknown action or product
403Signature, certificate URL, topic or timestamp not verified
404AWS Marketplace is not enabled
413Body over 64 KB
503AWS 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).

StatusDescriptionBody
200Active subscriptionSubscription
400Invalid company name or plan not offered
401No valid Entra sign-in
403Not the buyer

POST /v1/marketplace/azure/landing/resolve​

Resolve a purchase token for the signed-in buyer

Request body: object (JSON).

StatusDescriptionBody
200Purchase detailsLandingView
401No valid Entra sign-in
403Signed-in user is not the purchaser or in the beneficiary directory
502Marketplace refused the request
503Marketplace temporarily unavailable

POST /v1/marketplace/azure/webhook​

Azure Marketplace operation notifications

StatusDescriptionBody
200Outcome: Applied, Duplicate, Stale, NotVerified, Refused or UnknownSubscriptionobject
400Malformed or unknown action
401Token rejected
413Body over 64 KB
503Marketplace 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).

StatusDescriptionBody
200Active subscriptionSubscription
400Invalid company name or plan not offered
401No valid Entra sign-in
403Signup JWT is not valid for Dexwize
503Google 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).

StatusDescriptionBody
200Purchase detailsLandingView
400Missing token or marketplace not enabled
401No valid Entra sign-in
403Signup JWT is not valid for Dexwize
503Google 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).

StatusDescriptionBody
200Outcome: Applied, Duplicate, Stale, Refused, Ignored or UnknownSubscriptionMarketplaceOutcome
400Malformed envelope or event
401Push token rejected
404Google Cloud Marketplace is not enabled
413Body over 64 KB
503Google 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

StatusDescriptionBody
302Redirect to the landing page
400Missing token
404Google 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).

StatusDescriptionBody
200Lead recorded (idempotent per signed-in user)LeadReceipt
400Invalid details or unknown listing
401No valid Entra sign-in
404Oracle 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)

ParameterInTypeRequiredDescription
tenantIdpathstringyes
StatusDescriptionBody
200OKEntitlements
403Caller lacks PartnerTenantsRead
404The 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

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200OKSubscription
404Not found or not visible

GET /v1/subscriptions/me​

The caller's tenant subscriptions (TenantRead)

StatusDescriptionBody
200OKSubscription[]