openapi: 3.1.0 info: title: Dexwize Subscription Service version: 1.0.0 description: > 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). security: - bearer: [] paths: /v1/catalog: get: summary: The published catalogue responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Catalog' '404': description: No catalogue published yet /v1/catalog/versions: get: summary: All catalogue versions (operator) responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Catalog' '403': description: Not a platform-scope operator post: summary: Add the next catalogue version as a draft (operator) requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Catalog' responses: '201': description: Draft stored content: application/json: schema: $ref: '#/components/schemas/Catalog' '400': description: Catalogue failed validation '409': description: Version is not the next one /v1/catalog/versions/{version}/publish: post: summary: Publish a draft; the previously published version is retired (operator) parameters: - name: version in: path required: true schema: type: integer responses: '200': description: Published content: application/json: schema: $ref: '#/components/schemas/Catalog' '409': description: Unknown version or not a draft /v1/entitlements/me: get: summary: The caller's tenant entitlement document (ADR-0053; any signed-in user of the tenant, for lock badges) description: >- 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"). responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Entitlements' /v1/internal/entitlements/{tenantId}: get: summary: Any tenant's entitlement document for services enforcing features (platform-level service token, entitlement_reader) description: >- 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). parameters: - $ref: '#/components/parameters/TenantId' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Entitlements' '403': description: Not a platform-level service token holding entitlement_reader /v1/partner/tenants/{tenantId}/entitlements: get: summary: A customer's entitlement document for the partner that sold it (partner admin, PartnerTenantsRead) parameters: - $ref: '#/components/parameters/TenantId' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Entitlements' '403': description: Caller lacks PartnerTenantsRead '404': description: The caller's partner is not the reseller on the tenant's governing subscription (or JIT session) /v1/admin/tenants/{tenantId}/entitlements: get: summary: Any tenant's entitlement document, unredacted (platform operator) parameters: - $ref: '#/components/parameters/TenantId' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Entitlements' '403': description: Not a platform-scope operator /v1/admin/tenants/{tenantId}/entitlement-overrides: get: summary: Every override of the tenant, including expired and revoked ones, newest first (platform operator) parameters: - $ref: '#/components/parameters/TenantId' responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/EntitlementOverride' post: summary: Grant a time-boxed trial / proof-of-concept override (platform operator; audited entitlement.override.granted) description: >- 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. parameters: - $ref: '#/components/parameters/TenantId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GrantOverrideRequest' responses: '201': description: Granted content: application/json: schema: $ref: '#/components/schemas/EntitlementOverride' '400': description: Invalid override (unknown or core module, unknown feature, both or neither, expiry, reason) '409': description: No published catalogue, or the installation runs on an offline licence (error offline_licence) /v1/admin/tenants/{tenantId}/entitlement-overrides/{overrideId}: delete: summary: Revoke an active override (platform operator; audited entitlement.override.revoked) parameters: - $ref: '#/components/parameters/TenantId' - name: overrideId in: path required: true schema: type: string format: uuid responses: '200': description: Revoked content: application/json: schema: $ref: '#/components/schemas/EntitlementOverride' '404': description: No active override with that id for the tenant /v1/subscriptions/me: get: summary: The caller's tenant subscriptions (TenantRead) responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Subscription' /v1/subscriptions/{id}: get: summary: A subscription visible to the caller parameters: - name: id in: path required: true schema: type: string format: uuid responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Subscription' '404': description: Not found or not visible /v1/invoices: get: summary: The caller's tenant invoices (ReportsRead) responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Invoice' /v1/admin/subscriptions: get: summary: All subscriptions (operator) responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Subscription' post: summary: Create an active direct subscription (operator) requestBody: required: true content: application/json: schema: type: object required: - tenantId - planId - quantity - termStart - termMonths properties: tenantId: type: string format: uuid planId: type: string quantity: type: integer minimum: 1 addOns: type: array items: type: string termStart: type: string format: date termMonths: type: integer prepaid: type: boolean resellerPartnerId: type: - string - 'null' format: uuid quote: $ref: '#/components/schemas/QuoteTerms' responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': description: Unknown plan or add-on, below minimums, or quote-only item without a negotiated price /v1/admin/tenants/{tenantId}/subscriptions: get: summary: "One tenant's subscriptions, newest first (operator; vendor portal)" parameters: - $ref: '#/components/parameters/TenantId' responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Subscription' '403': description: Not a platform-scope operator /v1/admin/tenants/{tenantId}/invoices: get: summary: "One tenant's stored invoices, oldest month first (operator; vendor portal)" parameters: - $ref: '#/components/parameters/TenantId' responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Invoice' '403': description: Not a platform-scope operator /v1/admin/invoices/{month}: get: summary: Invoices already generated for a month; generates nothing (operator) parameters: - name: month in: path required: true schema: type: string pattern: ^[0-9]{4}-[0-9]{2}$ responses: '200': description: Invoices for the month content: application/json: schema: type: array items: $ref: '#/components/schemas/Invoice' '400': description: Malformed month '403': description: Not a platform-scope operator post: summary: Generate invoice data for a completed month (idempotent; operator) parameters: - name: month in: path required: true schema: type: string pattern: ^[0-9]{4}-[0-9]{2}$ responses: '200': description: Invoices for the month content: application/json: schema: type: array items: $ref: '#/components/schemas/Invoice' '400': description: Malformed month or month not yet ended /v1/admin/partner-usage/{month}: get: summary: Billed usage per tenant and partner for commissions (operator) parameters: - name: month in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/BilledUsage' '400': description: Malformed month /v1/internal/partner-usage/{month}: get: summary: Partner-sold billed usage for commission statements (partner-service only) description: > 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. operationId: getPartnerUsageInternal parameters: - name: month in: path required: true schema: type: string pattern: ^[0-9]{4}-[0-9]{2}$ responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/BilledUsage' '400': description: Malformed month '403': description: Not a platform-level service token with commission_reader /v1/internal/partner-subscriptions: post: summary: Create the partner-sold subscription of a customer a partner onboarded (partner-service only) description: > 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. operationId: createPartnerSubscriptionInternal requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartnerSubscriptionRequest' responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/Subscription' '200': description: The tenant already has a live subscription sold by this partner (idempotent replay) content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': description: Missing tenant or partner, unknown or quote-only plan, or below the catalogue minimums (key `subscription`) '403': description: Not a platform-level service token with subscription_provisioner '409': description: > tenant_has_subscription (a live subscription the partner did not sell; the seller is not disclosed) or no_published_catalogue /v1/internal/partner-subscriptions/validate: post: summary: Check a partner-sold subscription without creating it (partner-service only) description: > 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. operationId: validatePartnerSubscriptionInternal requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartnerSubscriptionRequest' responses: '204': description: Acceptable '400': description: The reason it would be refused (key `subscription`) '403': description: Not a platform-level service token with subscription_provisioner '409': description: no_published_catalogue /v1/internal/revenue-facts: get: summary: Month-end revenue facts for platform KPIs (operator-console only) description: > 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. operationId: getRevenueFactsInternal parameters: - name: from in: query required: true schema: type: string pattern: ^[0-9]{4}-[0-9]{2}$ - name: to in: query required: true description: Last month (inclusive); must have ended. At most 36 months per request. schema: type: string pattern: ^[0-9]{4}-[0-9]{2}$ responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RevenueFacts' '400': description: Malformed or open month, or more than 36 months '403': description: Not a platform-level service token with revenue_kpi_reader /v1/admin/reconciliation: post: summary: Compare marketplace and internal state; optionally heal (operator) parameters: - name: heal in: query schema: type: boolean default: false responses: '200': description: Discrepancy report content: application/json: schema: $ref: '#/components/schemas/ReconciliationReport' /v1/admin/metering/run: post: summary: Run hourly overage metering now (operator) responses: '200': description: Run summary content: application/json: schema: $ref: '#/components/schemas/MeteringRunResult' /v1/marketplace/azure/landing/resolve: post: summary: Resolve a purchase token for the signed-in buyer security: - entraBuyer: [] requestBody: required: true content: application/json: schema: type: object required: - token properties: token: type: string responses: '200': description: Purchase details content: application/json: schema: $ref: '#/components/schemas/LandingView' '401': description: No valid Entra sign-in '403': description: Signed-in user is not the purchaser or in the beneficiary directory '502': description: Marketplace refused the request '503': description: Marketplace temporarily unavailable /v1/marketplace/azure/landing/confirm: post: summary: Provision the tenant and activate the purchase (idempotent) security: - entraBuyer: [] requestBody: required: true content: application/json: schema: type: object required: - token - companyName properties: token: type: string companyName: type: string maxLength: 200 responses: '200': description: Active subscription content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': description: Invalid company name or plan not offered '401': description: No valid Entra sign-in '403': description: Not the buyer /v1/marketplace/azure/webhook: post: summary: Azure Marketplace operation notifications security: - marketplaceWebhook: [] responses: '200': description: 'Outcome: Applied, Duplicate, Stale, NotVerified, Refused or UnknownSubscription' content: application/json: schema: type: object properties: outcome: type: string '400': description: Malformed or unknown action '401': description: Token rejected '413': description: Body over 64 KB '503': description: Marketplace unavailable while verifying; the marketplace retries /v1/marketplace/aws/fulfilment: post: summary: AWS Marketplace fulfilment URL; redirects the buyer to the landing page with the registration token security: [] requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object required: - x-amzn-marketplace-token properties: x-amzn-marketplace-token: type: string responses: '302': description: Redirect to the landing page '400': description: Missing token '404': description: AWS Marketplace is not enabled /v1/marketplace/aws/landing/resolve: post: summary: Resolve an AWS registration token for the signed-in buyer security: - entraBuyer: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LandingTokenRequest' responses: '200': description: Purchase details content: application/json: schema: $ref: '#/components/schemas/LandingView' '400': description: Missing token or marketplace not enabled '401': description: No valid Entra sign-in '502': description: AWS refused the token '503': description: AWS temporarily unavailable or the contract entitlement is not visible yet /v1/marketplace/aws/landing/confirm: post: summary: Provision the tenant and record the AWS subscription (idempotent) security: - entraBuyer: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LandingConfirmRequest' responses: '200': description: Active subscription content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': description: Invalid company name or plan not offered '401': description: No valid Entra sign-in '502': description: AWS refused the token '503': description: AWS temporarily unavailable /v1/marketplace/aws/sns: post: summary: AWS Marketplace SNS notifications (subscription and entitlement topics) description: 'Authenticated by the SNS message signature: allow-listed topic, HTTPS SNS certificate URL and RSA signature over the canonical string.' security: [] requestBody: required: true content: text/plain: schema: type: string responses: '200': description: 'Outcome: Applied, Duplicate, Stale, Refused or UnknownSubscription' content: application/json: schema: $ref: '#/components/schemas/MarketplaceOutcome' '400': description: Malformed message or unknown action or product '403': description: Signature, certificate URL, topic or timestamp not verified '404': description: AWS Marketplace is not enabled '413': description: Body over 64 KB '503': description: AWS unavailable while re-reading the entitlement; SNS retries /v1/marketplace/gcp/signup: post: summary: Google Cloud Marketplace signup URL; redirects the buyer to the landing page with the signup JWT security: [] requestBody: required: true content: application/x-www-form-urlencoded: schema: type: object required: - x-gcp-marketplace-token properties: x-gcp-marketplace-token: type: string responses: '302': description: Redirect to the landing page '400': description: Missing token '404': description: Google Cloud Marketplace is not enabled /v1/marketplace/gcp/landing/resolve: post: summary: Verify a Google signup JWT and show the pending entitlement to the signed-in buyer security: - entraBuyer: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LandingTokenRequest' responses: '200': description: Purchase details content: application/json: schema: $ref: '#/components/schemas/LandingView' '400': description: Missing token or marketplace not enabled '401': description: No valid Entra sign-in '403': description: Signup JWT is not valid for Dexwize '503': description: Google temporarily unavailable or the entitlement is not visible yet /v1/marketplace/gcp/landing/confirm: post: summary: Provision the tenant and approve the Google account and entitlement (idempotent) security: - entraBuyer: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LandingConfirmRequest' responses: '200': description: Active subscription content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': description: Invalid company name or plan not offered '401': description: No valid Entra sign-in '403': description: Signup JWT is not valid for Dexwize '503': description: Google temporarily unavailable /v1/marketplace/gcp/pubsub: post: summary: Google Cloud Marketplace procurement events (Pub/Sub push) security: - googlePubSub: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PubSubPush' responses: '200': description: 'Outcome: Applied, Duplicate, Stale, Refused, Ignored or UnknownSubscription' content: application/json: schema: $ref: '#/components/schemas/MarketplaceOutcome' '400': description: Malformed envelope or event '401': description: Push token rejected '404': description: Google Cloud Marketplace is not enabled '413': description: Body over 64 KB '503': description: Google unavailable while re-reading the entitlement; Pub/Sub redelivers /v1/marketplace/oracle/signup: post: summary: Oracle Cloud Marketplace signup; creates a pending tenant and a sales lead (no billing) security: - entraBuyer: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OracleSignupRequest' responses: '200': description: Lead recorded (idempotent per signed-in user) content: application/json: schema: $ref: '#/components/schemas/LeadReceipt' '400': description: Invalid details or unknown listing '401': description: No valid Entra sign-in '404': description: Oracle Cloud Marketplace is not enabled /v1/admin/marketplace/leads: get: summary: Oracle Cloud Marketplace sales leads (operator) responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/MarketplaceLead' /v1/admin/marketplace/leads/{leadId}/convert: post: summary: Activate the pending subscription once the Oracle order is agreed (idempotent; operator) parameters: - name: leadId in: path required: true schema: type: string format: uuid responses: '200': description: Converted lead content: application/json: schema: $ref: '#/components/schemas/MarketplaceLead' '404': description: Unknown lead components: securitySchemes: bearer: type: http scheme: bearer bearerFormat: JWT entraBuyer: type: http scheme: bearer description: Buyer id_token from the multi-tenant landing app marketplaceWebhook: type: http scheme: bearer description: Entra token issued to the marketplace for our offer googlePubSub: type: http scheme: bearer bearerFormat: JWT description: Google-signed OIDC token on a Pub/Sub push (audience = push endpoint, email = push service account) parameters: TenantId: name: tenantId in: path required: true schema: type: string format: uuid schemas: Catalog: type: object required: - version - status - currency - minimumDevices - minimumTermMonths - prepayDiscountPercent - plans - addOns properties: version: type: integer status: enum: - draft - published - retired currency: enum: - USD - AED minimumDevices: type: integer description: Minimum quantity of direct, marketplace and lead purchases; volume bands start here partnerMinimumDevices: type: - integer - 'null' minimum: 1 description: >- Catalogue version 3 and later (ADR-0014 amendment): minimum quantity of a partner-sold subscription, 1 to minimumDevices; also applies to later quantity changes of a subscription whose offer names a reseller. A quantity below the first band is priced at the first band. Absent = minimumDevices. minimumTermMonths: type: integer prepayDiscountPercent: type: number note: type: - string - 'null' plans: type: array items: type: object properties: id: type: string tier: type: string pricing: enum: - per_device - quote bands: type: array items: type: object properties: fromDevices: type: integer unitPrice: type: number features: type: array items: type: string addOns: type: array items: type: object properties: id: type: string name: type: string pricing: enum: - per_device - quote unitPrice: type: - number - 'null' features: type: array items: type: string modules: description: >- Catalogue version 2 and later (ADR-0053): the licensing units. A module lists exactly the plans whose features touch it and every add-on that sells any of its features; a feature belongs to at most one module. type: - array - 'null' items: type: object required: [id, name, kind, features, plans] properties: id: type: string name: type: string kind: enum: [core, plan, add_on, partner_agreement] features: type: array items: type: string plans: type: array items: type: string addOns: type: - array - 'null' items: type: string description: type: - string - 'null' QuoteTerms: type: - object - 'null' properties: unitPrice: type: - number - 'null' platformFeeMonthly: type: - number - 'null' addOnUnitPrices: type: - object - 'null' additionalProperties: type: number Entitlements: type: object properties: tenantId: type: string format: uuid planId: type: - string - 'null' tier: type: - string - 'null' status: type: - string - 'null' readOnly: type: boolean deviceQuantity: type: integer features: description: Effective feature codes (plan, add-ons, active overrides; empty while read-only), sorted type: array items: type: string addOns: type: array items: type: string source: enum: [subscription, offline_licence, trial_override, none] modules: description: Every customer module of the published catalogue, enabled or not type: array items: $ref: '#/components/schemas/EntitlementModule' devices: type: - object - 'null' properties: limit: type: [integer, 'null'] used: description: Enrolled devices now, when available type: [integer, 'null'] hardLimit: description: Offline licences, cap plus tolerance type: [integer, 'null'] term: type: - object - 'null' properties: start: type: string format: date end: type: string format: date renewsOn: type: [string, 'null'] format: date prepaid: type: boolean graceDays: type: [integer, 'null'] overrides: description: Active operator overrides type: array items: $ref: '#/components/schemas/EntitlementOverride' catalogVersion: type: [integer, 'null'] generatedAt: type: string format: date-time validUntil: description: When this document stops being true on its own (override expiry, licence transition); caches must not outlive it type: [string, 'null'] format: date-time EntitlementModule: type: object properties: id: type: string name: type: string kind: enum: [core, plan, add_on] enabled: type: boolean source: description: How the module is enabled, by precedence; null when not enabled enum: [included, add_on, offline_licence, trial, null] expiresAt: description: Set when the module is enabled only by a trial override type: [string, 'null'] format: date-time features: type: array items: type: object properties: code: type: string enabled: type: boolean source: enum: [included, add_on, offline_licence, trial, null] availableIn: description: Plans that include the feature (upgrade path) type: array items: type: string addOn: description: Add-on that sells the feature, if any type: [string, 'null'] expiresAt: type: [string, 'null'] format: date-time EntitlementOverride: type: object properties: id: type: string format: uuid tenantId: type: string format: uuid module: type: [string, 'null'] features: type: array items: type: string reason: type: string grantedBy: description: Operator subject ("operator" in customer and partner views) type: string grantedAt: type: string format: date-time expiresAt: type: string format: date-time revokedAt: type: [string, 'null'] format: date-time revokedBy: type: [string, 'null'] active: type: boolean GrantOverrideRequest: type: object required: [reason] description: Exactly one of module and features; exactly one of days and expiresAt (at most 90 days ahead) properties: module: type: [string, 'null'] features: type: [array, 'null'] items: type: string days: type: [integer, 'null'] minimum: 1 maximum: 90 expiresAt: type: [string, 'null'] format: date-time reason: type: string minLength: 3 maxLength: 500 FeatureRefusal: description: >- Shared refusal of every enforcing service (ADR-0053): 403 {"error":"feature_not_entitled","feature":""} when the tenant is not entitled, 503 {"error":"entitlements_unavailable","feature":""} (Retry-After) when entitlements cannot be confirmed. type: object required: [error, feature] properties: error: enum: [feature_not_entitled, entitlements_unavailable] feature: type: string Subscription: type: object properties: id: type: string format: uuid tenantId: type: string format: uuid marketplace: enum: - Direct - Azure - Aws - Gcp - Oracle externalRef: type: - string - 'null' planId: type: string quantity: type: integer addOns: type: array items: type: string status: enum: - Pending - Active - Suspended - Unsubscribed termStart: type: string format: date termEnd: type: string format: date prepaid: type: boolean resellerPartnerId: type: - string - 'null' format: uuid Invoice: type: object properties: id: type: string format: uuid tenantId: type: string format: uuid subscriptionId: type: string format: uuid partnerId: type: - string - 'null' format: uuid month: type: string catalogVersion: type: integer currency: type: string lines: type: array items: type: object properties: kind: type: string code: type: string quantity: type: number unitPrice: type: number amount: type: number subtotal: type: number vatRate: type: number vat: type: number total: type: number billedDevices: type: integer PartnerSubscriptionRequest: type: object required: - partnerId - planId - quantity properties: tenantId: type: string format: uuid description: The customer tenant (required to create; ignored by validate) partnerId: type: string format: uuid description: The selling partner, recorded as the reseller planId: type: string quantity: type: integer minimum: 1 description: Devices drawn from the partner's entitlement pool for this customer termStart: type: - string - 'null' format: date description: First day of the term; partner-service sends the first day of the onboarding month BilledUsage: type: object properties: tenantId: type: string format: uuid partnerId: type: - string - 'null' format: uuid month: type: string marketplace: enum: - Direct - Azure - Aws - Gcp - Oracle devices: type: integer netAmount: type: number currency: type: string required: - tenantId - partnerId - month - marketplace - devices - netAmount - currency RevenueFacts: type: object properties: definitionsVersion: type: string from: type: string to: type: string generatedAt: type: string format: date-time historyStartedAt: type: - string - 'null' format: date-time months: type: array items: $ref: '#/components/schemas/RevenueFactMonth' tenants: type: array items: $ref: '#/components/schemas/TenantMilestones' required: - definitionsVersion - from - to - generatedAt - historyStartedAt - months - tenants RevenueFactMonth: type: object properties: month: type: string monthEnd: type: string format: date-time rows: type: array items: $ref: '#/components/schemas/RevenueFactRow' required: - month - monthEnd - rows RevenueFactRow: type: object properties: tenantId: type: string format: uuid subscriptionId: type: string format: uuid marketplace: enum: - direct - azure - aws - gcp - oracle resellerPartnerId: type: - string - 'null' format: uuid planId: type: string currency: type: string mrr: type: number description: Monthly recurring revenue at month end, net of VAT and prepay discount, without overage. devices: type: integer status: enum: - active - suspended catalogVersion: type: - integer - 'null' restated: type: boolean description: The state was recorded after the month closed (late event or history backfill). issue: description: Data-quality issue on this row, if any. type: - string - 'null' enum: - term_ended - unpriced - catalogue_missing - valued_at_current_catalogue - null required: - tenantId - subscriptionId - marketplace - resellerPartnerId - planId - currency - mrr - devices - status - catalogVersion - restated - issue TenantMilestones: type: object properties: tenantId: type: string format: uuid signupMonth: type: string firstPaidMonth: type: - string - 'null' required: - tenantId - signupMonth - firstPaidMonth ReconciliationReport: type: object properties: ranAt: type: string format: date-time marketplaceSubscriptions: type: integer internalSubscriptions: type: integer discrepancies: type: array items: type: object properties: source: enum: - Direct - Azure - Aws - Gcp - Oracle kind: enum: - MissingInternally - MissingInMarketplace - StatusMismatch - PlanMismatch - QuantityMismatch - UsageRejected - UsageStuck externalRef: type: string subscriptionId: type: - string - 'null' format: uuid internalValue: type: string marketplaceValue: type: string healed: type: boolean required: - source - kind - externalRef - subscriptionId - internalValue - marketplaceValue - healed required: - ranAt - marketplaceSubscriptions - internalSubscriptions - discrepancies MeteringRunResult: type: object properties: recorded: type: integer submitted: type: integer accepted: type: integer duplicates: type: integer retrying: type: integer rejected: type: integer required: - recorded - submitted - accepted - duplicates - retrying - rejected LandingView: type: object properties: externalSubscriptionId: type: string subscriptionName: type: string offerId: type: string planId: type: string planTier: type: - string - 'null' quantity: type: integer isTest: type: boolean currentStatus: enum: - Pending - Active - Suspended - Unsubscribed - null required: - externalSubscriptionId - subscriptionName - offerId - planId - planTier - quantity - isTest - currentStatus LandingTokenRequest: type: object required: - token properties: token: type: string LandingConfirmRequest: type: object required: - token - companyName properties: token: type: string companyName: type: string maxLength: 200 MarketplaceOutcome: type: object properties: outcome: enum: - Applied - Duplicate - Stale - NotVerified - Refused - UnknownSubscription - Ignored required: - outcome PubSubPush: type: object properties: message: type: object properties: data: type: string description: Base64 JSON procurement event (eventId, eventType, entitlement or account) messageId: type: string publishTime: type: string format: date-time required: - data - messageId subscription: type: string required: - message OracleSignupRequest: type: object required: - companyName - contactName - contactEmail properties: companyName: type: string maxLength: 200 contactName: type: string maxLength: 200 contactEmail: type: string format: email maxLength: 320 country: type: - string - 'null' pattern: ^[A-Za-z]{2}$ tenancyOcid: type: - string - 'null' maxLength: 255 listingId: type: - string - 'null' message: type: - string - 'null' maxLength: 2000 LeadReceipt: type: object properties: leadId: type: string format: uuid tenantId: type: string format: uuid status: enum: - new - converted required: - leadId - tenantId - status MarketplaceLead: type: object properties: id: type: string format: uuid marketplace: type: string companyName: type: string contactName: type: string contactEmail: type: string country: type: - string - 'null' cloudAccountId: type: - string - 'null' listingId: type: - string - 'null' message: type: - string - 'null' tenantId: type: string format: uuid subscriptionId: type: string format: uuid status: enum: - new - converted createdAt: type: string format: date-time required: - id - marketplace - companyName - contactName - contactEmail - country - cloudAccountId - listingId - message - tenantId - subscriptionId - status - createdAt