{
  "components": {
    "schemas": {
      "ActionItemInputDto": {
        "additionalProperties": false,
        "description": "Input for a single action item from a business review",
        "properties": {
          "assignedTo": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "dueDate": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AddTicketUpdateRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for adding an update/comment to a support ticket",
        "properties": {
          "isInternal": {
            "type": "boolean"
          },
          "notes": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AdjustTierRequest": {
        "additionalProperties": false,
        "description": "Request body for tier adjustment",
        "properties": {
          "newTier": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AdminAuthoriseHostingRequest": {
        "additionalProperties": false,
        "description": "Request body for M:Essence.Partners.Api.Controllers.AdminPartnerCommercialController.AuthoriseHosting(System.Guid,System.Guid,Essence.Partners.Api.Controllers.AdminAuthoriseHostingRequest,System.Threading.CancellationToken).",
        "properties": {
          "agreementRef": {
            "description": "The hosting agreement reference.",
            "nullable": true,
            "type": "string"
          },
          "region": {
            "description": "The sovereign's region code, e.g. `GB`.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AdminReviewPartnerRequest": {
        "additionalProperties": false,
        "description": "Request body for M:Essence.Partners.Api.Controllers.AdminPartnersController.ReviewPartner(System.Guid,Essence.Partners.Api.Controllers.AdminReviewPartnerRequest,System.Threading.CancellationToken).",
        "properties": {
          "agreementVersion": {
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "nullable": true,
            "type": "string"
          },
          "outcome": {
            "description": "\"Approved\" or \"Rejected\".",
            "nullable": true,
            "type": "string"
          },
          "rejectionReason": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AdminSetPaymentTermsRequest": {
        "additionalProperties": false,
        "description": "Request body for M:Essence.Partners.Api.Controllers.AdminPartnerCommercialController.SetPaymentTerms(System.Guid,Essence.Partners.Api.Controllers.AdminSetPaymentTermsRequest,System.Threading.CancellationToken).",
        "properties": {
          "days": {
            "description": "Payment terms in days, 0..120.",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "AdminSuspendPartnerRequest": {
        "additionalProperties": false,
        "description": "Request body for M:Essence.Partners.Api.Controllers.AdminPartnerCommercialController.SuspendPartner(System.Guid,Essence.Partners.Api.Controllers.AdminSuspendPartnerRequest,System.Threading.CancellationToken).",
        "properties": {
          "reason": {
            "description": "Why the partner is suspended.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ApproveOrderRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for approving an order",
        "properties": {
          "approvedBy": {
            "description": "Who is approving the order",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AuditLogEntryDto": {
        "additionalProperties": false,
        "description": "DTO for a single audit log entry",
        "properties": {
          "action": {
            "nullable": true,
            "type": "string"
          },
          "correlationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "entityId": {
            "format": "uuid",
            "type": "string"
          },
          "entityType": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "ipAddress": {
            "nullable": true,
            "type": "string"
          },
          "newValue": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "performedAt": {
            "format": "date-time",
            "type": "string"
          },
          "performedBy": {
            "nullable": true,
            "type": "string"
          },
          "previousValue": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AuditLogEntryDtoPagedResult": {
        "additionalProperties": false,
        "description": "A paginated result set wrapping a list of items with pagination metadata",
        "properties": {
          "hasNextPage": {
            "description": "Whether there is a next page",
            "readOnly": true,
            "type": "boolean"
          },
          "hasPreviousPage": {
            "description": "Whether there is a previous page",
            "readOnly": true,
            "type": "boolean"
          },
          "items": {
            "description": "The items in the current page",
            "items": {
              "$ref": "#/components/schemas/AuditLogEntryDto"
            },
            "nullable": true,
            "type": "array"
          },
          "page": {
            "description": "The current page number (1-based)",
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "description": "The number of items per page",
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "description": "Total number of items across all pages",
            "format": "int32",
            "type": "integer"
          },
          "totalPages": {
            "description": "Total number of pages",
            "format": "int32",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CalculateCommissionRequestDto": {
        "additionalProperties": false,
        "description": "Request body for commission calculation",
        "properties": {
          "baseAmount": {
            "format": "double",
            "type": "number"
          },
          "commercialModel": {
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "isFruitOfTree": {
            "type": "boolean"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "periodEnd": {
            "format": "date-time",
            "type": "string"
          },
          "periodStart": {
            "format": "date-time",
            "type": "string"
          },
          "registrationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CancelOrderRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for cancelling an order",
        "properties": {
          "reason": {
            "description": "Reason for cancellation",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CertificationDto": {
        "additionalProperties": false,
        "description": "Basic DTO for certification information",
        "properties": {
          "badgeCredentialId": {
            "description": "Provenance handle for the credential. The EPIC 49 seam writes\r\n`training-path:{pathId}:{learnerUserId}`; anything else is an external issuance.",
            "nullable": true,
            "type": "string"
          },
          "certificateUrl": {
            "description": "URL of the issued certificate, when one has been produced.",
            "nullable": true,
            "type": "string"
          },
          "certificationType": {
            "nullable": true,
            "type": "string"
          },
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "enrolledAt": {
            "format": "date-time",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "score": {
            "description": "Score achieved, 0–100; null while the certification is unassessed.",
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CertificationSummaryDto": {
        "additionalProperties": false,
        "description": "Certification completion status for the partner",
        "properties": {
          "completed": {
            "format": "int32",
            "type": "integer"
          },
          "completionPercentage": {
            "format": "double",
            "type": "number"
          },
          "inProgress": {
            "format": "int32",
            "type": "integer"
          },
          "required": {
            "format": "int32",
            "type": "integer"
          },
          "totalCertifications": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CertificationTeamMemberDto": {
        "additionalProperties": false,
        "description": "Team member certification status across all types",
        "properties": {
          "eaC300Status": {
            "nullable": true,
            "type": "string"
          },
          "esC100Status": {
            "nullable": true,
            "type": "string"
          },
          "etC200Status": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CertificationsByTypeDto": {
        "additionalProperties": false,
        "description": "Certification count by type",
        "properties": {
          "certificationType": {
            "nullable": true,
            "type": "string"
          },
          "completedCount": {
            "format": "int32",
            "type": "integer"
          },
          "enrolledCount": {
            "format": "int32",
            "type": "integer"
          },
          "expiredCount": {
            "format": "int32",
            "type": "integer"
          },
          "inProgressCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ChannelPartnerDto": {
        "additionalProperties": false,
        "description": "Full detail DTO for a channel partner, used on the partner detail view",
        "properties": {
          "activatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "agreementCurrentTermEnd": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "agreementDocumentUrl": {
            "nullable": true,
            "type": "string"
          },
          "agreementEffectiveDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "agreementInitialTermYears": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "agreementVersion": {
            "nullable": true,
            "type": "string"
          },
          "countryOfIncorporation": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "nullable": true,
            "type": "string"
          },
          "currentTier": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "invoiceCurrency": {
            "nullable": true,
            "type": "string"
          },
          "legalName": {
            "nullable": true,
            "type": "string"
          },
          "nonCircumventionEndDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "noticeAddressCity": {
            "nullable": true,
            "type": "string"
          },
          "noticeAddressCountry": {
            "nullable": true,
            "type": "string"
          },
          "noticeAddressCounty": {
            "nullable": true,
            "type": "string"
          },
          "noticeAddressLine1": {
            "nullable": true,
            "type": "string"
          },
          "noticeAddressLine2": {
            "nullable": true,
            "type": "string"
          },
          "noticeAddressPostCode": {
            "nullable": true,
            "type": "string"
          },
          "onboardingCompletedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "onboardingStartedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "partnerType": {
            "nullable": true,
            "type": "string"
          },
          "principalContactEmail": {
            "nullable": true,
            "type": "string"
          },
          "principalContactName": {
            "nullable": true,
            "type": "string"
          },
          "principalContactPhone": {
            "nullable": true,
            "type": "string"
          },
          "registeredAddressCity": {
            "nullable": true,
            "type": "string"
          },
          "registeredAddressCountry": {
            "nullable": true,
            "type": "string"
          },
          "registeredAddressCounty": {
            "nullable": true,
            "type": "string"
          },
          "registeredAddressLine1": {
            "nullable": true,
            "type": "string"
          },
          "registeredAddressLine2": {
            "nullable": true,
            "type": "string"
          },
          "registeredAddressPostCode": {
            "nullable": true,
            "type": "string"
          },
          "registeredNumber": {
            "nullable": true,
            "type": "string"
          },
          "signableEnvelopeId": {
            "nullable": true,
            "type": "string"
          },
          "signableEnvelopeStatus": {
            "nullable": true,
            "type": "string"
          },
          "signableSignedDocumentUrl": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "terminatedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "terminationReason": {
            "nullable": true,
            "type": "string"
          },
          "territories": {
            "items": {
              "$ref": "#/components/schemas/PartnerTerritoryDto"
            },
            "nullable": true,
            "type": "array"
          },
          "tierHistory": {
            "items": {
              "$ref": "#/components/schemas/PartnerTierHistoryDto"
            },
            "nullable": true,
            "type": "array"
          },
          "tradingName": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "users": {
            "items": {
              "$ref": "#/components/schemas/PartnerUserDto"
            },
            "nullable": true,
            "type": "array"
          },
          "windDownEndDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CloseDealRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for closing a deal registration",
        "properties": {
          "actualValue": {
            "description": "Actual deal value (required when Won)",
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "closeReason": {
            "description": "Reason for losing the deal (required when Lost)",
            "nullable": true,
            "type": "string"
          },
          "commercialModel": {
            "description": "Commercial model (required when Won): BuySell, Agency, or Referral",
            "nullable": true,
            "type": "string"
          },
          "orderReference": {
            "description": "Reference to the resulting order (optional when Won)",
            "nullable": true,
            "type": "string"
          },
          "outcome": {
            "description": "Outcome: Won or Lost",
            "nullable": true,
            "type": "string"
          },
          "valueCurrency": {
            "description": "Currency for the actual value",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CommissionRecordDto": {
        "additionalProperties": false,
        "description": "Individual commission record",
        "properties": {
          "baseAmount": {
            "format": "double",
            "type": "number"
          },
          "commissionAmount": {
            "format": "double",
            "type": "number"
          },
          "commissionRate": {
            "format": "double",
            "type": "number"
          },
          "commissionType": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "invoiceReference": {
            "nullable": true,
            "type": "string"
          },
          "paymentDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "paymentStatus": {
            "nullable": true,
            "type": "string"
          },
          "periodEnd": {
            "format": "date-time",
            "type": "string"
          },
          "periodStart": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CommissionSummaryDto": {
        "additionalProperties": false,
        "description": "Partner commission summary with aggregates and individual records",
        "properties": {
          "commissions": {
            "items": {
              "$ref": "#/components/schemas/CommissionRecordDto"
            },
            "nullable": true,
            "type": "array"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "totalEarned": {
            "format": "double",
            "type": "number"
          },
          "totalPaid": {
            "format": "double",
            "type": "number"
          },
          "totalPending": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "CompleteCertificationRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for completing a certification",
        "properties": {
          "certificateUrl": {
            "nullable": true,
            "type": "string"
          },
          "score": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "CompleteMilestoneRequest": {
        "additionalProperties": false,
        "description": "Request body for completing an onboarding milestone",
        "properties": {
          "milestoneName": {
            "description": "The name of the milestone to complete",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ComplianceDeclarationStatusDto": {
        "additionalProperties": false,
        "description": "Status of a single declaration type for a partner",
        "properties": {
          "declarationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "declarationType": {
            "nullable": true,
            "type": "string"
          },
          "declarationYear": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "declaredAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "documentUrl": {
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ComplianceStatusDto": {
        "additionalProperties": false,
        "description": "Overall compliance status for a partner including all declaration types and insurance records",
        "properties": {
          "declarations": {
            "items": {
              "$ref": "#/components/schemas/ComplianceDeclarationStatusDto"
            },
            "nullable": true,
            "type": "array"
          },
          "expiredCount": {
            "format": "int32",
            "type": "integer"
          },
          "insuranceRecords": {
            "items": {
              "$ref": "#/components/schemas/InsuranceRecordStatusDto"
            },
            "nullable": true,
            "type": "array"
          },
          "isFullyCompliant": {
            "type": "boolean"
          },
          "overdueCount": {
            "format": "int32",
            "type": "integer"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateDraftDealRegistrationRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for creating a draft deal registration (partial fields, auto-save support)",
        "properties": {
          "budgetConfirmed": {
            "nullable": true,
            "type": "string"
          },
          "competingSolutions": {
            "nullable": true,
            "type": "string"
          },
          "currentStage": {
            "nullable": true,
            "type": "string"
          },
          "customerContactEmail": {
            "nullable": true,
            "type": "string"
          },
          "customerContactName": {
            "nullable": true,
            "type": "string"
          },
          "customerContactPhone": {
            "nullable": true,
            "type": "string"
          },
          "customerContactTitle": {
            "nullable": true,
            "type": "string"
          },
          "customerCountry": {
            "nullable": true,
            "type": "string"
          },
          "customerEmployeeCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "customerIndustry": {
            "nullable": true,
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "customerWebsite": {
            "nullable": true,
            "type": "string"
          },
          "decisionMakers": {
            "nullable": true,
            "type": "string"
          },
          "engagementDescription": {
            "nullable": true,
            "type": "string"
          },
          "estimatedAnnualValue": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "estimatedTotalValue": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "expectedCloseDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "opportunityTitle": {
            "nullable": true,
            "type": "string"
          },
          "productsServices": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "valueCurrency": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateMarketingAssetRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for creating a marketing asset",
        "properties": {
          "category": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "fileSizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "fileType": {
            "nullable": true,
            "type": "string"
          },
          "fileUrl": {
            "nullable": true,
            "type": "string"
          },
          "language": {
            "nullable": true,
            "type": "string"
          },
          "minTier": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "vertical": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreatePartnerOrderRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for creating a partner order",
        "properties": {
          "commercialModel": {
            "description": "Commercial model: BuySell, Agency, or Referral",
            "nullable": true,
            "type": "string"
          },
          "companyRegistrationNumber": {
            "description": "The customer's company registration number. REQUIRED for provisioning (D3) — every\r\nthird-party-created organisation is floored at Enhanced KYB, which cannot run without one.",
            "nullable": true,
            "type": "string"
          },
          "contactEmail": {
            "description": "The customer administrator's email. REQUIRED for provisioning: it is where the PLATFORM\r\nsends the invitation to claim the organisation. The partner never handles the token — it is\r\na bearer secret for permanent control of the customer's keys.",
            "nullable": true,
            "type": "string"
          },
          "country": {
            "description": "The customer's jurisdiction (ISO country) — selects the KYB provider.",
            "nullable": true,
            "type": "string"
          },
          "customerDomain": {
            "description": "Customer's primary domain name",
            "nullable": true,
            "type": "string"
          },
          "customerName": {
            "description": "Customer's legal or trading name",
            "nullable": true,
            "type": "string"
          },
          "dealRegistrationId": {
            "description": "Optional deal registration ID linking this order",
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "industry": {
            "description": "The customer's industry — feeds the KYB level policy.",
            "nullable": true,
            "type": "string"
          },
          "lines": {
            "description": "Line items in the order",
            "items": {
              "$ref": "#/components/schemas/OrderLineRequestDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "CreateSupportTicketRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for creating a support ticket",
        "properties": {
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "raisedBy": {
            "format": "uuid",
            "type": "string"
          },
          "severity": {
            "nullable": true,
            "type": "string"
          },
          "stepsToReproduce": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CsatSurveyRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for submitting a CSAT survey",
        "properties": {
          "comment": {
            "nullable": true,
            "type": "string"
          },
          "score": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CsatTrendDto": {
        "additionalProperties": false,
        "description": "DTO for CSAT trend data by month",
        "properties": {
          "months": {
            "items": {
              "$ref": "#/components/schemas/MonthlyCsatDto"
            },
            "nullable": true,
            "type": "array"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CsatTrendPointDto": {
        "additionalProperties": false,
        "description": "A single CSAT trend data point",
        "properties": {
          "averageScore": {
            "format": "double",
            "type": "number"
          },
          "period": {
            "nullable": true,
            "type": "string"
          },
          "responseCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DealConflictDto": {
        "additionalProperties": false,
        "description": "DTO for deal conflict information.\r\nCRITICAL: PartnerName must only be populated for Essence admin users, never for partner users.",
        "properties": {
          "conflictingRegistrationId": {
            "format": "uuid",
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "matchScore": {
            "format": "double",
            "type": "number"
          },
          "matchType": {
            "nullable": true,
            "type": "string"
          },
          "partnerName": {
            "description": "Name of the competing partner. ONLY populated for Essence admin users.\r\nMust be null/omitted for partner users (competition law compliance).",
            "nullable": true,
            "type": "string"
          },
          "referenceNumber": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DealFunnelAnalyticsDto": {
        "additionalProperties": false,
        "description": "Advanced deal funnel analytics with conversion rates between stages",
        "properties": {
          "averageDaysToClose": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "averageDealValue": {
            "format": "double",
            "type": "number"
          },
          "dateFrom": {
            "format": "date-time",
            "type": "string"
          },
          "dateTo": {
            "format": "date-time",
            "type": "string"
          },
          "overallConversionRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "partnerId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "stages": {
            "items": {
              "$ref": "#/components/schemas/FunnelStageDto"
            },
            "nullable": true,
            "type": "array"
          },
          "totalDeals": {
            "format": "int32",
            "type": "integer"
          },
          "totalValue": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "DealFunnelDto": {
        "additionalProperties": false,
        "description": "DTO representing the deal registration funnel with counts and values per stage",
        "properties": {
          "approvedCount": {
            "format": "int32",
            "type": "integer"
          },
          "approvedValue": {
            "format": "double",
            "type": "number"
          },
          "closedLostCount": {
            "format": "int32",
            "type": "integer"
          },
          "closedLostValue": {
            "format": "double",
            "type": "number"
          },
          "closedWonCount": {
            "format": "int32",
            "type": "integer"
          },
          "closedWonValue": {
            "format": "double",
            "type": "number"
          },
          "conversionRate": {
            "description": "Conversion rate: ClosedWon / (ClosedWon + ClosedLost) as percentage",
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "expiredCount": {
            "format": "int32",
            "type": "integer"
          },
          "expiredValue": {
            "format": "double",
            "type": "number"
          },
          "pendingInfoCount": {
            "format": "int32",
            "type": "integer"
          },
          "pendingInfoValue": {
            "format": "double",
            "type": "number"
          },
          "revokedCount": {
            "format": "int32",
            "type": "integer"
          },
          "revokedValue": {
            "format": "double",
            "type": "number"
          },
          "submittedCount": {
            "format": "int32",
            "type": "integer"
          },
          "submittedValue": {
            "format": "double",
            "type": "number"
          },
          "totalCount": {
            "format": "int32",
            "type": "integer"
          },
          "totalValue": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "DealRegistrationDetailDto": {
        "additionalProperties": false,
        "description": "Full detail DTO for a deal registration including updates, protection countdown, and conflict info",
        "properties": {
          "actualValue": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "budgetConfirmed": {
            "nullable": true,
            "type": "string"
          },
          "closeDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "closeReason": {
            "nullable": true,
            "type": "string"
          },
          "commercialModel": {
            "nullable": true,
            "type": "string"
          },
          "competingSolutions": {
            "nullable": true,
            "type": "string"
          },
          "conflictResolutionNotes": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currentStage": {
            "nullable": true,
            "type": "string"
          },
          "customerContactEmail": {
            "nullable": true,
            "type": "string"
          },
          "customerContactName": {
            "nullable": true,
            "type": "string"
          },
          "customerContactPhone": {
            "nullable": true,
            "type": "string"
          },
          "customerContactTitle": {
            "nullable": true,
            "type": "string"
          },
          "customerCountry": {
            "nullable": true,
            "type": "string"
          },
          "customerEmployeeCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "customerIndustry": {
            "nullable": true,
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "customerWebsite": {
            "nullable": true,
            "type": "string"
          },
          "decisionMakers": {
            "nullable": true,
            "type": "string"
          },
          "engagementDescription": {
            "nullable": true,
            "type": "string"
          },
          "estimatedAnnualValue": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "estimatedTotalValue": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "expectedCloseDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "extensionCount": {
            "format": "int32",
            "type": "integer"
          },
          "hasConflict": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "opportunityTitle": {
            "nullable": true,
            "type": "string"
          },
          "orderReference": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "productsServices": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "protectionDaysRemaining": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "protectionEndDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "protectionStartDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "referenceNumber": {
            "nullable": true,
            "type": "string"
          },
          "rejectionReason": {
            "nullable": true,
            "type": "string"
          },
          "reviewNotes": {
            "nullable": true,
            "type": "string"
          },
          "reviewedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "reviewedBy": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "submittedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "submittedBy": {
            "format": "uuid",
            "type": "string"
          },
          "supportRequired": {
            "$ref": "#/components/schemas/SupportRequiredDetailDto"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updates": {
            "items": {
              "$ref": "#/components/schemas/DealRegistrationUpdateDto"
            },
            "nullable": true,
            "type": "array"
          },
          "valueCurrency": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DealRegistrationDto": {
        "additionalProperties": false,
        "description": "Basic DTO for deal registration information",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "estimatedValue": {
            "format": "double",
            "type": "number"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "protectionExpiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "referenceNumber": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "DealRegistrationUpdateDto": {
        "additionalProperties": false,
        "description": "DTO for a deal registration update record",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "newStatus": {
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "nullable": true,
            "type": "string"
          },
          "previousStatus": {
            "nullable": true,
            "type": "string"
          },
          "updateType": {
            "nullable": true,
            "type": "string"
          },
          "updatedBy": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DealsSummaryDto": {
        "additionalProperties": false,
        "description": "Deal registration counts by status",
        "properties": {
          "approved": {
            "format": "int32",
            "type": "integer"
          },
          "closedLost": {
            "format": "int32",
            "type": "integer"
          },
          "closedWon": {
            "format": "int32",
            "type": "integer"
          },
          "expired": {
            "format": "int32",
            "type": "integer"
          },
          "pendingReview": {
            "format": "int32",
            "type": "integer"
          },
          "totalActive": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "DemoEnvironmentRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for provisioning a demo environment",
        "properties": {
          "environmentType": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DiscountApprovalRequestDto": {
        "additionalProperties": false,
        "description": "Request body for requesting discount approval on a quote",
        "properties": {
          "justification": {
            "nullable": true,
            "type": "string"
          },
          "requestedDiscountPercentage": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "EnrolCertificationRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for enrolling in a certification",
        "properties": {
          "certificationType": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "EscalateTicketRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for escalating a ticket",
        "properties": {
          "escalationLevel": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ExpiringCertificationDto": {
        "additionalProperties": false,
        "description": "Certification expiring within a specified window",
        "properties": {
          "certificationId": {
            "format": "uuid",
            "type": "string"
          },
          "certificationType": {
            "nullable": true,
            "type": "string"
          },
          "daysRemaining": {
            "format": "int32",
            "type": "integer"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          },
          "userName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ExpiringDealDto": {
        "additionalProperties": false,
        "description": "DTO for deals with expiring protection periods",
        "properties": {
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "daysRemaining": {
            "format": "int32",
            "type": "integer"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "referenceNumber": {
            "nullable": true,
            "type": "string"
          },
          "registrationId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ExtensionRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for requesting a protection period extension",
        "properties": {
          "justification": {
            "description": "Justification for why extension is needed",
            "nullable": true,
            "type": "string"
          },
          "progressUpdate": {
            "description": "Progress update describing deal advancement (min 100 chars)",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ForecastOpportunityDto": {
        "additionalProperties": false,
        "description": "Individual opportunity within a forecast",
        "properties": {
          "customer": {
            "nullable": true,
            "type": "string"
          },
          "expectedClose": {
            "format": "date-time",
            "type": "string"
          },
          "probability": {
            "format": "double",
            "type": "number"
          },
          "stage": {
            "nullable": true,
            "type": "string"
          },
          "value": {
            "format": "double",
            "type": "number"
          },
          "weightedValue": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "ForecastOpportunityInputDto": {
        "additionalProperties": false,
        "description": "Input for a single pipeline opportunity",
        "properties": {
          "customer": {
            "nullable": true,
            "type": "string"
          },
          "expectedClose": {
            "format": "date-time",
            "type": "string"
          },
          "probability": {
            "format": "double",
            "type": "number"
          },
          "stage": {
            "nullable": true,
            "type": "string"
          },
          "value": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "FunnelStageDto": {
        "additionalProperties": false,
        "description": "A single funnel stage with counts, values, and conversion rate",
        "properties": {
          "averageDaysInStage": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "conversionRateFromPrevious": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "stage": {
            "nullable": true,
            "type": "string"
          },
          "value": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "GenerateQuoteRequestDto": {
        "additionalProperties": false,
        "description": "Request body for generating a partner quote",
        "properties": {
          "commercialModel": {
            "nullable": true,
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/QuoteLineRequestDto"
            },
            "nullable": true,
            "type": "array"
          },
          "registrationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "InitiatePartnerTerminationCommand": {
        "additionalProperties": false,
        "description": "Command to initiate the termination of a partnership with a wind-down period",
        "properties": {
          "partnerId": {
            "description": "The partner ID to terminate",
            "format": "uuid",
            "type": "string"
          },
          "reason": {
            "description": "Reason for termination",
            "nullable": true,
            "type": "string"
          },
          "terminationType": {
            "description": "Type of termination: Notice, Breach, or Mutual",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "InitiateTierRemediationRequest": {
        "additionalProperties": false,
        "description": "Request body for tier remediation initiation",
        "properties": {
          "reason": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "InsuranceRecordStatusDto": {
        "additionalProperties": false,
        "description": "Status of a single insurance record for a partner",
        "properties": {
          "coverageAmount": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "coverageCurrency": {
            "nullable": true,
            "type": "string"
          },
          "effectiveFrom": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "effectiveTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "insuranceType": {
            "nullable": true,
            "type": "string"
          },
          "insurer": {
            "nullable": true,
            "type": "string"
          },
          "policyNumber": {
            "nullable": true,
            "type": "string"
          },
          "recordId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MarketingAssetDto": {
        "additionalProperties": false,
        "description": "DTO for a marketing or enablement asset",
        "properties": {
          "category": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "downloadCount": {
            "format": "int32",
            "type": "integer"
          },
          "fileSizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "fileType": {
            "nullable": true,
            "type": "string"
          },
          "fileUrl": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "language": {
            "nullable": true,
            "type": "string"
          },
          "minTier": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "version": {
            "nullable": true,
            "type": "string"
          },
          "vertical": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MilestoneDto": {
        "additionalProperties": false,
        "description": "Individual milestone status",
        "properties": {
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "completedBy": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "dueDate": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isCompleted": {
            "type": "boolean"
          },
          "isRequired": {
            "type": "boolean"
          },
          "milestoneName": {
            "nullable": true,
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "MonthlyCsatDto": {
        "additionalProperties": false,
        "description": "CSAT score for a single month",
        "properties": {
          "averageScore": {
            "format": "double",
            "type": "number"
          },
          "month": {
            "nullable": true,
            "type": "string"
          },
          "responseCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "MonthlyUpdateRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for submitting a monthly deal update",
        "properties": {
          "currentStage": {
            "description": "Optional: update the current sales stage",
            "nullable": true,
            "type": "string"
          },
          "estimatedValue": {
            "description": "Optional: update the estimated value",
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "statusNotes": {
            "description": "Status notes describing deal progress",
            "nullable": true,
            "type": "string"
          },
          "valueCurrency": {
            "description": "Currency for the estimated value update",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "OnboardingProgressDto": {
        "additionalProperties": false,
        "description": "DTO representing onboarding progress with milestone completion details",
        "properties": {
          "completionPercentage": {
            "description": "Overall completion percentage (0-100)",
            "format": "double",
            "type": "number"
          },
          "daysRemaining": {
            "description": "Days remaining in the 90-day onboarding window",
            "format": "int32",
            "type": "integer"
          },
          "milestones": {
            "description": "List of all onboarding milestones with their completion status",
            "items": {
              "$ref": "#/components/schemas/MilestoneDto"
            },
            "nullable": true,
            "type": "array"
          },
          "onboardingDeadline": {
            "description": "The deadline for completing onboarding",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "onboardingStartedAt": {
            "description": "When onboarding started",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrderLineDto": {
        "additionalProperties": false,
        "description": "DTO for an individual order line item",
        "properties": {
          "billingPeriod": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "lineTotal": {
            "format": "double",
            "type": "number"
          },
          "moduleToProvision": {
            "nullable": true,
            "type": "string"
          },
          "productSku": {
            "nullable": true,
            "type": "string"
          },
          "provisioningStatus": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          },
          "unitBuyPrice": {
            "format": "double",
            "type": "number"
          },
          "unitRrp": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "OrderLineRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for an order line item",
        "properties": {
          "billingPeriod": {
            "description": "Billing period (Monthly, Annual, One-Time)",
            "nullable": true,
            "type": "string"
          },
          "productSku": {
            "description": "Product SKU identifier",
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "description": "Quantity ordered",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "OrderProvisioningStatusDto": {
        "additionalProperties": false,
        "description": "Real-time provisioning progress for a partner order",
        "properties": {
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "failureReason": {
            "nullable": true,
            "type": "string"
          },
          "instanceId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "orderId": {
            "format": "uuid",
            "type": "string"
          },
          "orderStatus": {
            "nullable": true,
            "type": "string"
          },
          "percentComplete": {
            "format": "int32",
            "type": "integer"
          },
          "provisioningStatus": {
            "nullable": true,
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/ProvisioningStepStatusDto"
            },
            "nullable": true,
            "type": "array"
          },
          "workflowId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerAccreditationDto": {
        "additionalProperties": false,
        "description": "A partner's server-held accreditation. Every field is authoritative.",
        "properties": {
          "accreditedForOrgCreation": {
            "description": "Whether this partner may create organisations on a customer's behalf.",
            "type": "boolean"
          },
          "certifications": {
            "description": "Completed, unexpired certifications only.",
            "items": {
              "$ref": "#/components/schemas/PartnerCertificationDto"
            },
            "nullable": true,
            "type": "array"
          },
          "currentTier": {
            "description": "The partner's real tier (Core / Digital / Quantum). Consumers MUST use this rather than any\r\ntier supplied in a request — that is what this endpoint exists for.",
            "nullable": true,
            "type": "string"
          },
          "legalName": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerApplicationDetailDto": {
        "additionalProperties": false,
        "description": "Full application detail for the review console's application detail page.",
        "properties": {
          "agreementEnvelopeStatus": {
            "nullable": true,
            "type": "string"
          },
          "agreementVersion": {
            "nullable": true,
            "type": "string"
          },
          "countryOfIncorporation": {
            "nullable": true,
            "type": "string"
          },
          "essenceSignedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "invoiceCurrency": {
            "nullable": true,
            "type": "string"
          },
          "isOrganizationLinked": {
            "type": "boolean"
          },
          "legalName": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "partnerSignedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "partnerType": {
            "nullable": true,
            "type": "string"
          },
          "principalContactEmail": {
            "nullable": true,
            "type": "string"
          },
          "principalContactName": {
            "nullable": true,
            "type": "string"
          },
          "registeredAddress": {
            "nullable": true,
            "type": "string"
          },
          "registeredNumber": {
            "nullable": true,
            "type": "string"
          },
          "rejectionReason": {
            "nullable": true,
            "type": "string"
          },
          "signedDocumentUrl": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "submittedAt": {
            "format": "date-time",
            "type": "string"
          },
          "tradingName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerApplicationRequestDto": {
        "additionalProperties": false,
        "description": "Input DTO for submitting a new partner application",
        "properties": {
          "addressCountry": {
            "nullable": true,
            "type": "string"
          },
          "addressLine1": {
            "nullable": true,
            "type": "string"
          },
          "addressLine2": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "nullable": true,
            "type": "string"
          },
          "countryOfIncorporation": {
            "description": "ISO 3166-1 alpha-3 country of incorporation (e.g. GBR, USA)",
            "nullable": true,
            "type": "string"
          },
          "county": {
            "nullable": true,
            "type": "string"
          },
          "invoiceCurrency": {
            "description": "Preferred invoicing currency (GBP, USD, AED, EUR)",
            "nullable": true,
            "type": "string"
          },
          "legalName": {
            "description": "Registered legal name of the partner entity",
            "nullable": true,
            "type": "string"
          },
          "partnerType": {
            "description": "Partner business model classification",
            "nullable": true,
            "type": "string"
          },
          "postCode": {
            "nullable": true,
            "type": "string"
          },
          "principalContactEmail": {
            "nullable": true,
            "type": "string"
          },
          "principalContactName": {
            "nullable": true,
            "type": "string"
          },
          "principalContactPhone": {
            "nullable": true,
            "type": "string"
          },
          "registeredNumber": {
            "description": "Company registration / incorporation number",
            "nullable": true,
            "type": "string"
          },
          "tradingName": {
            "description": "Trading name or brand name (may differ from legal name)",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerApplicationSummaryDto": {
        "additionalProperties": false,
        "description": "Summary row for the partner application review queue.",
        "properties": {
          "agreementEnvelopeStatus": {
            "nullable": true,
            "type": "string"
          },
          "countryOfIncorporation": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "invoiceCurrency": {
            "nullable": true,
            "type": "string"
          },
          "isOrganizationLinked": {
            "type": "boolean"
          },
          "legalName": {
            "nullable": true,
            "type": "string"
          },
          "partnerType": {
            "nullable": true,
            "type": "string"
          },
          "registeredNumber": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "submittedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerCertificationDto": {
        "additionalProperties": false,
        "description": "A completed, unexpired certification.",
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "type": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerCertificationSummaryDto": {
        "additionalProperties": false,
        "description": "Summary of a partner's certification status across all types",
        "properties": {
          "certificationsByType": {
            "description": "Breakdown of certifications by type",
            "items": {
              "$ref": "#/components/schemas/CertificationsByTypeDto"
            },
            "nullable": true,
            "type": "array"
          },
          "completedCount": {
            "description": "Total number of completed certifications",
            "format": "int32",
            "type": "integer"
          },
          "isCompliant": {
            "description": "Whether the partner meets tier certification requirements",
            "type": "boolean"
          },
          "teamMatrix": {
            "description": "Team member certification matrix",
            "items": {
              "$ref": "#/components/schemas/CertificationTeamMemberDto"
            },
            "nullable": true,
            "type": "array"
          },
          "tierRequired": {
            "description": "Number of certifications required for the partner's current tier",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PartnerCommercialDto": {
        "additionalProperties": false,
        "description": "A partner's commercial position for the admin console: status, type, organisation link, payment\r\nterms, the standing counter and every hosting authorisation (active and revoked), newest first.",
        "properties": {
          "hostingAuthorisations": {
            "items": {
              "$ref": "#/components/schemas/PartnerHostingAuthorisationDetailDto"
            },
            "nullable": true,
            "type": "array"
          },
          "organizationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "partnerType": {
            "nullable": true,
            "type": "string"
          },
          "paymentTermsDays": {
            "format": "int32",
            "type": "integer"
          },
          "standingVersion": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerCustomerDto": {
        "additionalProperties": false,
        "description": "Full detail DTO for a partner customer with order history and billing info",
        "properties": {
          "billingAccountId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "commercialModel": {
            "nullable": true,
            "type": "string"
          },
          "contactEmail": {
            "nullable": true,
            "type": "string"
          },
          "contractEndDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "contractStartDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "customerDomain": {
            "nullable": true,
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "dealRegistrationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "instanceId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "orders": {
            "items": {
              "$ref": "#/components/schemas/PartnerOrderSummaryDto"
            },
            "nullable": true,
            "type": "array"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerDashboardDto": {
        "additionalProperties": false,
        "description": "Dashboard summary DTO aggregating key partner metrics",
        "properties": {
          "certificationStatus": {
            "$ref": "#/components/schemas/CertificationSummaryDto"
          },
          "csatScore": {
            "description": "Average CSAT score from recent business reviews",
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "currentTier": {
            "nullable": true,
            "type": "string"
          },
          "dealsSummary": {
            "$ref": "#/components/schemas/DealsSummaryDto"
          },
          "legalName": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "revenueYtd": {
            "description": "Year-to-date revenue from commissions",
            "format": "double",
            "type": "number"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "upcomingActions": {
            "description": "List of upcoming actions requiring attention",
            "items": {
              "$ref": "#/components/schemas/UpcomingActionDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "PartnerHostingAuthorisationDetailDto": {
        "additionalProperties": false,
        "description": "One hosting authorisation as the partner team sees it: active or revoked, with who/when/why.",
        "properties": {
          "agreementRef": {
            "nullable": true,
            "type": "string"
          },
          "approvedAtUtc": {
            "format": "date-time",
            "type": "string"
          },
          "approvedBy": {
            "nullable": true,
            "type": "string"
          },
          "authorisationId": {
            "format": "uuid",
            "type": "string"
          },
          "region": {
            "nullable": true,
            "type": "string"
          },
          "revokeReason": {
            "nullable": true,
            "type": "string"
          },
          "revokedAtUtc": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "revokedBy": {
            "nullable": true,
            "type": "string"
          },
          "sovereignInstanceId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerHostingAuthorisationDto": {
        "additionalProperties": false,
        "description": "A managed service provider's authorisation to host on one sovereign instance.",
        "properties": {
          "agreementRef": {
            "nullable": true,
            "type": "string"
          },
          "approvedAt": {
            "format": "date-time",
            "type": "string"
          },
          "approvedBy": {
            "nullable": true,
            "type": "string"
          },
          "authorisationId": {
            "format": "uuid",
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "region": {
            "nullable": true,
            "type": "string"
          },
          "revokedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "sovereignInstanceId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerNotificationDto": {
        "additionalProperties": false,
        "description": "DTO for a partner notification",
        "properties": {
          "actionUrl": {
            "nullable": true,
            "type": "string"
          },
          "category": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isRead": {
            "type": "boolean"
          },
          "message": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "readAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerNotificationDtoPagedResult": {
        "additionalProperties": false,
        "description": "A paginated result set wrapping a list of items with pagination metadata",
        "properties": {
          "hasNextPage": {
            "description": "Whether there is a next page",
            "readOnly": true,
            "type": "boolean"
          },
          "hasPreviousPage": {
            "description": "Whether there is a previous page",
            "readOnly": true,
            "type": "boolean"
          },
          "items": {
            "description": "The items in the current page",
            "items": {
              "$ref": "#/components/schemas/PartnerNotificationDto"
            },
            "nullable": true,
            "type": "array"
          },
          "page": {
            "description": "The current page number (1-based)",
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "description": "The number of items per page",
            "format": "int32",
            "type": "integer"
          },
          "totalCount": {
            "description": "Total number of items across all pages",
            "format": "int32",
            "type": "integer"
          },
          "totalPages": {
            "description": "Total number of pages",
            "format": "int32",
            "readOnly": true,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PartnerOrderDto": {
        "additionalProperties": false,
        "description": "Full detail DTO for a partner order including lines, billing, and provisioning",
        "properties": {
          "approvedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "approvedBy": {
            "nullable": true,
            "type": "string"
          },
          "billingSubscriptionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "commercialModel": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "customerId": {
            "format": "uuid",
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "dealRegistrationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "discountApplied": {
            "format": "double",
            "type": "number"
          },
          "discountBand": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "invoiceId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/OrderLineDto"
            },
            "nullable": true,
            "type": "array"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "partnerMargin": {
            "format": "double",
            "type": "number"
          },
          "provisioningWorkflowId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "totalBuyPrice": {
            "format": "double",
            "type": "number"
          },
          "totalRrp": {
            "format": "double",
            "type": "number"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerOrderSummaryDto": {
        "additionalProperties": false,
        "description": "Summary DTO for partner order listing",
        "properties": {
          "commercialModel": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "discountBand": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "lineCount": {
            "format": "int32",
            "type": "integer"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "totalBuyPrice": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "PartnerPaymentTermsDto": {
        "additionalProperties": false,
        "description": "A partner's payment terms.",
        "properties": {
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "paymentTermsDays": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PartnerProfileDto": {
        "additionalProperties": false,
        "description": "Lightweight profile of the current user's own partner, used to compose the\r\nportal's authenticated-user view (/auth/me). Not the full aggregate.",
        "properties": {
          "id": {
            "description": "The partner id.",
            "format": "uuid",
            "type": "string"
          },
          "legalName": {
            "description": "Registered legal name.",
            "nullable": true,
            "type": "string"
          },
          "role": {
            "description": "The caller's own role in this partner (a `PartnerRole` enum name), or `null` when\r\nit cannot be determined. The applicant is the partner's principal and so its Admin; an\r\ninvited member carries the role on their `PartnerUser` record (FR-55.013). The portal\r\nscopes navigation and routes on this, so it must never be a constant (#8369).",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "description": "Current lifecycle status (enum name).",
            "nullable": true,
            "type": "string"
          },
          "tier": {
            "description": "Current programme tier (enum name).",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerQuoteDto": {
        "additionalProperties": false,
        "description": "Full quote details including lines, discount info, and mandatory RRP disclaimer.\r\nCOMPETITION LAW: RRP is a recommendation ONLY.",
        "properties": {
          "commercialModel": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "discountApproved": {
            "type": "boolean"
          },
          "discountApprovedBy": {
            "nullable": true,
            "type": "string"
          },
          "discountBand": {
            "nullable": true,
            "type": "string"
          },
          "discountPercentage": {
            "format": "double",
            "type": "number"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/QuoteLineDto"
            },
            "nullable": true,
            "type": "array"
          },
          "marginPercentage": {
            "format": "double",
            "type": "number"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "registrationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "rrpDisclaimer": {
            "description": "Competition law disclaimer — must be displayed on all pricing surfaces.",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "totalBuyPrice": {
            "format": "double",
            "type": "number"
          },
          "totalRrp": {
            "format": "double",
            "type": "number"
          },
          "validUntil": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerRevenueDto": {
        "additionalProperties": false,
        "description": "Revenue attribution trail for a partner customer: orders to invoices to payments to commissions",
        "properties": {
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "customerId": {
            "format": "uuid",
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "totalCommissions": {
            "format": "double",
            "type": "number"
          },
          "totalPendingPayouts": {
            "format": "double",
            "type": "number"
          },
          "totalRevenue": {
            "format": "double",
            "type": "number"
          },
          "traceabilityChain": {
            "items": {
              "$ref": "#/components/schemas/RevenueTraceDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "PartnerScorecardDto": {
        "additionalProperties": false,
        "description": "Comprehensive partner scorecard with key performance metrics",
        "properties": {
          "activeCertifications": {
            "format": "int32",
            "type": "integer"
          },
          "averageCsatScore": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "certificationCompliancePercentage": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "closedWonDealValue": {
            "description": "Sum of closed-won deal registration values in the window — a pipeline measure, not tier revenue.",
            "format": "double",
            "type": "number"
          },
          "completedReviews": {
            "format": "int32",
            "type": "integer"
          },
          "csatTrend": {
            "items": {
              "$ref": "#/components/schemas/CsatTrendPointDto"
            },
            "nullable": true,
            "type": "array"
          },
          "currentTier": {
            "nullable": true,
            "type": "string"
          },
          "dateRangeFrom": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "dateRangeTo": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "dealConversionRate": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "dealsApproved": {
            "format": "int32",
            "type": "integer"
          },
          "dealsExpired": {
            "format": "int32",
            "type": "integer"
          },
          "dealsLost": {
            "format": "int32",
            "type": "integer"
          },
          "dealsSubmitted": {
            "format": "int32",
            "type": "integer"
          },
          "dealsWon": {
            "format": "int32",
            "type": "integer"
          },
          "generatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "latestPipelineAccuracy": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "newLogosCount": {
            "format": "int32",
            "type": "integer"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "partnerName": {
            "nullable": true,
            "type": "string"
          },
          "requiredCertifications": {
            "format": "int32",
            "type": "integer"
          },
          "revenueAttainmentPercentage": {
            "format": "double",
            "type": "number"
          },
          "revenueBasis": {
            "nullable": true,
            "type": "string"
          },
          "reviewAdherencePercentage": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "scheduledReviews": {
            "format": "int32",
            "type": "integer"
          },
          "slaCompliancePercentage": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "slaMetTickets": {
            "format": "int32",
            "type": "integer"
          },
          "tierCriteria": {
            "description": "Every criterion of the current tier and of the next tier, judged exactly as the tier review\r\njudges it (rolling 12 months to Essence.Partners.Contracts.Dtos.PartnerScorecardDto.TierCriteriaAssessedAt).",
            "items": {
              "$ref": "#/components/schemas/ScorecardTierCriterionDto"
            },
            "nullable": true,
            "type": "array"
          },
          "tierCriteriaAssessedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "tierRevenueThreshold": {
            "format": "double",
            "type": "number"
          },
          "totalRevenue": {
            "format": "double",
            "type": "number"
          },
          "totalTickets": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PartnerStandingRepublishResultDto": {
        "additionalProperties": false,
        "description": "What the standing republish enqueued: standing snapshots, Authorised events (active\r\nauthorisations) and Revoked events (revoked authorisations).",
        "properties": {
          "authorisations": {
            "format": "int32",
            "type": "integer"
          },
          "partners": {
            "format": "int32",
            "type": "integer"
          },
          "revocations": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PartnerStatus": {
        "description": "Lifecycle status of a channel partner",
        "enum": [
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10
        ],
        "format": "int32",
        "type": "integer"
      },
      "PartnerStatusDto": {
        "additionalProperties": false,
        "description": "A partner's status after an admin status change.",
        "properties": {
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerTerritoryDto": {
        "additionalProperties": false,
        "description": "DTO for partner territory assignments",
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "restrictions": {
            "nullable": true,
            "type": "string"
          },
          "territoryCode": {
            "nullable": true,
            "type": "string"
          },
          "territoryName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerTierHistoryDto": {
        "additionalProperties": false,
        "description": "DTO for partner tier change history",
        "properties": {
          "changeType": {
            "nullable": true,
            "type": "string"
          },
          "effectiveDate": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "newTier": {
            "nullable": true,
            "type": "string"
          },
          "previousTier": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "remediationEndDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartnerUserDto": {
        "additionalProperties": false,
        "description": "DTO for partner portal users",
        "properties": {
          "detailsWithheld": {
            "description": "True when the caller is not the partner's Admin, so this colleague's email and role are\r\nwithheld from them (#12814). Withheld is its own state: the colleague IS on the roster, and\r\na client must not render it as an unknown or departed user.",
            "type": "boolean"
          },
          "email": {
            "description": "Null when Essence.Partners.Contracts.Dtos.PartnerUserDto.DetailsWithheld — never an empty string standing in for it.",
            "nullable": true,
            "type": "string"
          },
          "firstName": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "lastName": {
            "nullable": true,
            "type": "string"
          },
          "role": {
            "description": "Null when Essence.Partners.Contracts.Dtos.PartnerUserDto.DetailsWithheld.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PendingApplicationCountsDto": {
        "additionalProperties": false,
        "properties": {
          "awaitingCountersignature": {
            "format": "int32",
            "type": "integer"
          },
          "awaitingReview": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PipelineForecastDto": {
        "additionalProperties": false,
        "description": "DTO for pipeline forecast with opportunities and actuals",
        "properties": {
          "actualClosedValue": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "forecastAccuracy": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "forecastQuarter": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isQuarterClosed": {
            "type": "boolean"
          },
          "opportunities": {
            "items": {
              "$ref": "#/components/schemas/ForecastOpportunityDto"
            },
            "nullable": true,
            "type": "array"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "submittedAt": {
            "format": "date-time",
            "type": "string"
          },
          "totalPipelineValue": {
            "format": "double",
            "type": "number"
          },
          "weightedPipelineValue": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "PriceListDto": {
        "additionalProperties": false,
        "description": "Tier-filtered price list with mandatory RRP disclaimer.\r\nCOMPETITION LAW: RRP is a recommendation ONLY.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PriceListItemDto"
            },
            "nullable": true,
            "type": "array"
          },
          "rrpDisclaimer": {
            "description": "Competition law disclaimer — must be displayed on all pricing surfaces.",
            "nullable": true,
            "type": "string"
          },
          "tier": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PriceListItemDto": {
        "additionalProperties": false,
        "description": "Individual product SKU pricing",
        "properties": {
          "billingPeriod": {
            "nullable": true,
            "type": "string"
          },
          "buyPrice": {
            "format": "double",
            "type": "number"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "marginPercentage": {
            "format": "double",
            "type": "number"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "rrp": {
            "format": "double",
            "type": "number"
          },
          "sku": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProblemDetails": {
        "additionalProperties": {},
        "properties": {
          "detail": {
            "nullable": true,
            "type": "string"
          },
          "instance": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProcessTrueUpRequestDto": {
        "additionalProperties": false,
        "description": "Request body for true-up processing",
        "properties": {
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "quarter": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProgrammeNotificationDto": {
        "additionalProperties": false,
        "description": "A notification addressed to the Essence partner-review team (all admin:partners holders).",
        "properties": {
          "actionUrl": {
            "nullable": true,
            "type": "string"
          },
          "category": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isRead": {
            "type": "boolean"
          },
          "message": {
            "nullable": true,
            "type": "string"
          },
          "relatedPartnerId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProgrammeTierDto": {
        "additionalProperties": false,
        "description": "One rung of the programme ladder.",
        "properties": {
          "annualRevenueThresholdGbp": {
            "description": "The published annual revenue threshold, in GBP.",
            "format": "double",
            "type": "number"
          },
          "benefits": {
            "description": "Benefits the file lists for the rung; empty when it lists none.",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "code": {
            "description": "The tier's name as every service holds it (`Registered`, `Core`, …).",
            "nullable": true,
            "type": "string"
          },
          "entry": {
            "description": "Entry condition, where the ladder states one beyond the threshold.",
            "nullable": true,
            "type": "string"
          },
          "marginBasis": {
            "description": "The file's own wording of the rung's margin basis, verbatim.",
            "nullable": true,
            "type": "string"
          },
          "marginColumn": {
            "description": "The margin-matrix column this rung is paid on, or `null` when it resells nothing\r\n(Registered is referral only). Strategic reads the Quantum column (FR-55.143).",
            "nullable": true,
            "type": "string"
          },
          "name": {
            "description": "Display name.",
            "nullable": true,
            "type": "string"
          },
          "order": {
            "description": "The programme ordinal (FR-55.140), equal to the services' enum value.",
            "format": "int32",
            "type": "integer"
          },
          "referralFeeRate": {
            "description": "One-time referral fee as a fraction of first-year subscription value (FR-55.147).",
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "resaleMarginByFamily": {
            "additionalProperties": {
              "format": "double",
              "type": "number"
            },
            "description": "Resale margin as a fraction off list price, per SKU family, from Essence.Partners.Contracts.Dtos.ProgrammeTierDto.MarginColumn;\r\n`null` when the rung carries no margin — never a zero, which would read as \"nil discount agreed\".",
            "nullable": true,
            "type": "object"
          }
        },
        "type": "object"
      },
      "ProgrammeTierMappingDto": {
        "additionalProperties": false,
        "description": "The cross-walk between the seller ladder and the three other ladders (DD-119 §5).",
        "properties": {
          "reading": {
            "description": "How to read it: \"comparable to — never a conversion\".",
            "nullable": true,
            "type": "string"
          },
          "rows": {
            "description": "One row per seller rung.",
            "items": {
              "$ref": "#/components/schemas/ProgrammeTierMappingRowDto"
            },
            "nullable": true,
            "type": "array"
          },
          "status": {
            "description": "The file's status for the mapping.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProgrammeTierMappingRowDto": {
        "additionalProperties": false,
        "description": "One cross-walk row; a `null` rung means that ladder has no comparable rung.",
        "properties": {
          "builder": {
            "nullable": true,
            "type": "string"
          },
          "framework": {
            "nullable": true,
            "type": "string"
          },
          "seller": {
            "nullable": true,
            "type": "string"
          },
          "specialism": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProgrammeTiersDto": {
        "additionalProperties": false,
        "description": "The partner programme ladder as `docs/commercial/catalogue/partner-tiers.json` states it,\r\nserved by `GET /api/v1/partners/programme/tiers` (EPIC 55 FR-55.151). Partner-portal, the\r\nwebsite partners page, the L200 partner deck and EPIC 109's trust page read this instead of a\r\nlocal copy of the ladder.",
        "properties": {
          "familiesWithNoPartnerMargin": {
            "description": "SKU families that carry no resale margin on any rung, deliberately.",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "source": {
            "description": "Where the ladder was ruled (the file's `programmeLadder.source`).",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "description": "The file's own status for the five-rung ladder (`proposed` until FR-55.157 records the reissue).",
            "nullable": true,
            "type": "string"
          },
          "tierMapping": {
            "$ref": "#/components/schemas/ProgrammeTierMappingDto"
          },
          "tiers": {
            "description": "The five rungs, in programme order (Registered 0 … Strategic 4).",
            "items": {
              "$ref": "#/components/schemas/ProgrammeTierDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "ProvisioningStepStatusDto": {
        "additionalProperties": false,
        "description": "Status of a single provisioning step",
        "properties": {
          "completedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "error": {
            "nullable": true,
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "stepName": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "QuarterlyRevenueDto": {
        "additionalProperties": false,
        "description": "Revenue figure for a single quarter",
        "properties": {
          "orderCount": {
            "format": "int32",
            "type": "integer"
          },
          "quarter": {
            "nullable": true,
            "type": "string"
          },
          "totalRevenue": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "QuoteLineDto": {
        "additionalProperties": false,
        "description": "Individual line item within a quote",
        "properties": {
          "billingPeriod": {
            "nullable": true,
            "type": "string"
          },
          "lineBuyPriceTotal": {
            "format": "double",
            "type": "number"
          },
          "lineRrpTotal": {
            "format": "double",
            "type": "number"
          },
          "productName": {
            "nullable": true,
            "type": "string"
          },
          "productSku": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          },
          "unitBuyPrice": {
            "format": "double",
            "type": "number"
          },
          "unitRrp": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "QuoteLineRequestDto": {
        "additionalProperties": false,
        "description": "Individual line item request for quote generation",
        "properties": {
          "billingPeriod": {
            "nullable": true,
            "type": "string"
          },
          "productSku": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "RecordBusinessReviewMinutesRequestDto": {
        "additionalProperties": false,
        "description": "Request body for recording business review minutes",
        "properties": {
          "actionItems": {
            "items": {
              "$ref": "#/components/schemas/ActionItemInputDto"
            },
            "nullable": true,
            "type": "array"
          },
          "minutes": {
            "nullable": true,
            "type": "string"
          },
          "nextReviewDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RecordCertificationProgressRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for recording certification progress",
        "properties": {
          "progressPercentage": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ResolveTicketRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for resolving a ticket",
        "properties": {
          "resolutionNotes": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RevenueAttributionDto": {
        "additionalProperties": false,
        "description": "Revenue attribution breakdown for a partner",
        "properties": {
          "byCommercialModel": {
            "description": "Revenue breakdown by commercial model (BuySell, Agency, Referral)",
            "items": {
              "$ref": "#/components/schemas/RevenueByModelDto"
            },
            "nullable": true,
            "type": "array"
          },
          "byProduct": {
            "description": "Revenue breakdown by product SKU",
            "items": {
              "$ref": "#/components/schemas/RevenueByProductDto"
            },
            "nullable": true,
            "type": "array"
          },
          "byQuarter": {
            "description": "Revenue breakdown by quarter",
            "items": {
              "$ref": "#/components/schemas/RevenueByQuarterDto"
            },
            "nullable": true,
            "type": "array"
          },
          "currency": {
            "nullable": true,
            "type": "string"
          },
          "dateFrom": {
            "format": "date-time",
            "type": "string"
          },
          "dateTo": {
            "format": "date-time",
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "totalRevenue": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "RevenueByModelDto": {
        "additionalProperties": false,
        "description": "Revenue grouped by commercial model",
        "properties": {
          "commercialModel": {
            "nullable": true,
            "type": "string"
          },
          "dealCount": {
            "format": "int32",
            "type": "integer"
          },
          "percentage": {
            "format": "double",
            "type": "number"
          },
          "revenue": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "RevenueByProductDto": {
        "additionalProperties": false,
        "description": "Revenue grouped by product",
        "properties": {
          "percentage": {
            "format": "double",
            "type": "number"
          },
          "productSku": {
            "nullable": true,
            "type": "string"
          },
          "quantity": {
            "format": "int32",
            "type": "integer"
          },
          "revenue": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "RevenueByQuarterDto": {
        "additionalProperties": false,
        "description": "Revenue grouped by quarter",
        "properties": {
          "dealCount": {
            "format": "int32",
            "type": "integer"
          },
          "growthPercentage": {
            "format": "double",
            "type": "number"
          },
          "quarter": {
            "nullable": true,
            "type": "string"
          },
          "revenue": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "RevenueTraceDto": {
        "additionalProperties": false,
        "description": "A single link in the revenue traceability chain",
        "properties": {
          "commissionAmount": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "commissionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "invoiceAmount": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "invoiceId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "orderAmount": {
            "format": "double",
            "type": "number"
          },
          "orderDate": {
            "format": "date-time",
            "type": "string"
          },
          "orderId": {
            "format": "uuid",
            "type": "string"
          },
          "orderStatus": {
            "nullable": true,
            "type": "string"
          },
          "paymentStatus": {
            "nullable": true,
            "type": "string"
          },
          "payoutAmount": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "payoutId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "subscriptionId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RevenueTrendDto": {
        "additionalProperties": false,
        "description": "DTO for revenue trend data by quarter",
        "properties": {
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "quarters": {
            "items": {
              "$ref": "#/components/schemas/QuarterlyRevenueDto"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "ReviewDealRegistrationRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for reviewing a deal registration",
        "properties": {
          "notes": {
            "description": "Review notes",
            "nullable": true,
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/ReviewOutcome"
          },
          "rejectionReason": {
            "description": "Reason for rejection (required when outcome is Rejected)",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ReviewOutcome": {
        "description": "The set of outcomes a channel-team reviewer can produce for a deal registration.\r\nTighter than Essence.Partners.Domain.Enums.DealRegistrationStatus: a reviewer can only approve, reject,\r\nor send back for more information — the remaining lifecycle states are reached by other\r\ntransitions. Replaces the former free-form string + ValidOutcomes allowlist so the\r\ncommand, validator, and controller share a single compile-time source of truth.",
        "enum": [
          1,
          2,
          3
        ],
        "format": "int32",
        "type": "integer"
      },
      "ReviewPartnerApplicationRequestDto": {
        "additionalProperties": false,
        "description": "Input DTO for reviewing (approving or rejecting) a partner application",
        "properties": {
          "agreementVersion": {
            "description": "Agreement version to issue on approval (default: \"1.0\")",
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "description": "Internal review notes",
            "nullable": true,
            "type": "string"
          },
          "outcome": {
            "description": "Review outcome: \"Approved\" or \"Rejected\"",
            "nullable": true,
            "type": "string"
          },
          "rejectionReason": {
            "description": "Reason for rejection (required when outcome is Rejected)",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "RevokeDealRegistrationCommand": {
        "additionalProperties": false,
        "description": "Revokes a previously approved deal registration (admin only)",
        "properties": {
          "reason": {
            "description": "Reason for revoking the protection",
            "nullable": true,
            "type": "string"
          },
          "registrationId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ScheduleBusinessReviewRequestDto": {
        "additionalProperties": false,
        "description": "Request body for scheduling a business review",
        "properties": {
          "attendees": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "reviewType": {
            "nullable": true,
            "type": "string"
          },
          "scheduledDate": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ScorecardTierCriterionDto": {
        "additionalProperties": false,
        "description": "One tier criterion on the scorecard: the partner's current value, what the tier requires, and\r\nwhether it is met. Boolean criteria read 1 (yes) / 0 (no).",
        "properties": {
          "criterion": {
            "nullable": true,
            "type": "string"
          },
          "current": {
            "format": "double",
            "type": "number"
          },
          "met": {
            "type": "boolean"
          },
          "required": {
            "format": "double",
            "type": "number"
          },
          "tier": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ServiceProviderDirectoryEntryDto": {
        "additionalProperties": false,
        "description": "One approved hosting provider in a region: an Active managed service provider and the sovereign\r\ninstances in that region it is authorised to host on. Carries no price.",
        "properties": {
          "displayName": {
            "nullable": true,
            "type": "string"
          },
          "organizationId": {
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "region": {
            "nullable": true,
            "type": "string"
          },
          "sovereignInstanceIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "SlaStatusDto": {
        "additionalProperties": false,
        "description": "SLA timer status for a ticket",
        "properties": {
          "isBreached": {
            "type": "boolean"
          },
          "l1Due": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "l1Met": {
            "nullable": true,
            "type": "boolean"
          },
          "l2Due": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "l2Met": {
            "nullable": true,
            "type": "boolean"
          },
          "resolutionDue": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "resolutionMet": {
            "nullable": true,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SubmitComplianceDeclarationRequestDto": {
        "additionalProperties": false,
        "description": "Request body for submitting a compliance declaration",
        "properties": {
          "declarationType": {
            "nullable": true,
            "type": "string"
          },
          "documentUrl": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SubmitDealRegistrationRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for submitting a deal registration with all required fields",
        "properties": {
          "budgetConfirmed": {
            "nullable": true,
            "type": "string"
          },
          "competingSolutions": {
            "nullable": true,
            "type": "string"
          },
          "competitiveDisplacementRequired": {
            "type": "boolean"
          },
          "currentStage": {
            "nullable": true,
            "type": "string"
          },
          "customerContactEmail": {
            "nullable": true,
            "type": "string"
          },
          "customerContactName": {
            "nullable": true,
            "type": "string"
          },
          "customerContactPhone": {
            "nullable": true,
            "type": "string"
          },
          "customerContactTitle": {
            "nullable": true,
            "type": "string"
          },
          "customerCountry": {
            "nullable": true,
            "type": "string"
          },
          "customerEmployeeCount": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "customerIndustry": {
            "nullable": true,
            "type": "string"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "customerWebsite": {
            "nullable": true,
            "type": "string"
          },
          "decisionMakers": {
            "nullable": true,
            "type": "string"
          },
          "draftId": {
            "description": "Optional: if submitting from an existing draft",
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "engagementDescription": {
            "nullable": true,
            "type": "string"
          },
          "estimatedAnnualValue": {
            "format": "double",
            "type": "number"
          },
          "estimatedTotalValue": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "execSponsorshipRequired": {
            "type": "boolean"
          },
          "expectedCloseDate": {
            "format": "date-time",
            "type": "string"
          },
          "opportunityTitle": {
            "nullable": true,
            "type": "string"
          },
          "otherSupportRequired": {
            "nullable": true,
            "type": "string"
          },
          "productDemoRequired": {
            "type": "boolean"
          },
          "productsServices": {
            "items": {
              "type": "string"
            },
            "nullable": true,
            "type": "array"
          },
          "proofOfConceptRequired": {
            "type": "boolean"
          },
          "technicalPresalesRequired": {
            "type": "boolean"
          },
          "valueCurrency": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SubmitPipelineForecastRequestDto": {
        "additionalProperties": false,
        "description": "Request body for submitting a pipeline forecast",
        "properties": {
          "forecastQuarter": {
            "nullable": true,
            "type": "string"
          },
          "opportunities": {
            "items": {
              "$ref": "#/components/schemas/ForecastOpportunityInputDto"
            },
            "nullable": true,
            "type": "array"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SupportPerformanceDto": {
        "additionalProperties": false,
        "description": "Aggregate support performance metrics for a partner",
        "properties": {
          "averageCsatScore": {
            "format": "double",
            "type": "number"
          },
          "csatResponseCount": {
            "format": "int32",
            "type": "integer"
          },
          "escalationRatePercent": {
            "format": "double",
            "type": "number"
          },
          "l1SlaCompliancePercent": {
            "format": "double",
            "type": "number"
          },
          "l2SlaCompliancePercent": {
            "format": "double",
            "type": "number"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "periodEnd": {
            "format": "date-time",
            "type": "string"
          },
          "periodStart": {
            "format": "date-time",
            "type": "string"
          },
          "resolutionSlaCompliancePercent": {
            "format": "double",
            "type": "number"
          },
          "ticketsBySeverity": {
            "items": {
              "$ref": "#/components/schemas/TicketCountBySeverityDto"
            },
            "nullable": true,
            "type": "array"
          },
          "ticketsByStatus": {
            "items": {
              "$ref": "#/components/schemas/TicketCountByStatusDto"
            },
            "nullable": true,
            "type": "array"
          },
          "totalTickets": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SupportRequiredDetailDto": {
        "additionalProperties": false,
        "description": "DTO for support required details",
        "properties": {
          "competitiveDisplacement": {
            "type": "boolean"
          },
          "execSponsorship": {
            "type": "boolean"
          },
          "other": {
            "nullable": true,
            "type": "string"
          },
          "productDemo": {
            "type": "boolean"
          },
          "proofOfConcept": {
            "type": "boolean"
          },
          "technicalPresales": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SupportTicketDetailDto": {
        "additionalProperties": false,
        "description": "Detailed DTO with full SLA timers and escalation history",
        "properties": {
          "assignedTo": {
            "nullable": true,
            "type": "string"
          },
          "closedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "csatComment": {
            "nullable": true,
            "type": "string"
          },
          "csatScore": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "currentLevel": {
            "format": "int32",
            "type": "integer"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "l1ResponseAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "l1SlaMet": {
            "nullable": true,
            "type": "boolean"
          },
          "l2ResponseAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "l2SlaMet": {
            "nullable": true,
            "type": "boolean"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "raisedBy": {
            "format": "uuid",
            "type": "string"
          },
          "resolutionAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "resolutionSlaMet": {
            "nullable": true,
            "type": "boolean"
          },
          "severity": {
            "nullable": true,
            "type": "string"
          },
          "slaTimers": {
            "$ref": "#/components/schemas/SlaStatusDto"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "stepsToReproduce": {
            "nullable": true,
            "type": "string"
          },
          "ticketReference": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SupportTicketDto": {
        "additionalProperties": false,
        "description": "Full DTO for a support ticket including SLA times",
        "properties": {
          "assignedTo": {
            "nullable": true,
            "type": "string"
          },
          "closedAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "csatComment": {
            "nullable": true,
            "type": "string"
          },
          "csatScore": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "currentLevel": {
            "format": "int32",
            "type": "integer"
          },
          "customerName": {
            "nullable": true,
            "type": "string"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "l1ResponseAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "l1SlaMet": {
            "nullable": true,
            "type": "boolean"
          },
          "l2ResponseAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "l2SlaMet": {
            "nullable": true,
            "type": "boolean"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "raisedBy": {
            "format": "uuid",
            "type": "string"
          },
          "resolutionAt": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "resolutionSlaMet": {
            "nullable": true,
            "type": "boolean"
          },
          "severity": {
            "nullable": true,
            "type": "string"
          },
          "slaStatus": {
            "$ref": "#/components/schemas/SlaStatusDto"
          },
          "status": {
            "nullable": true,
            "type": "string"
          },
          "stepsToReproduce": {
            "nullable": true,
            "type": "string"
          },
          "ticketReference": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TicketCountBySeverityDto": {
        "additionalProperties": false,
        "description": "Ticket count grouped by severity",
        "properties": {
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "severity": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TicketCountByStatusDto": {
        "additionalProperties": false,
        "description": "Ticket count grouped by status",
        "properties": {
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TierCriteriaDto": {
        "additionalProperties": false,
        "description": "Tier criteria requirements",
        "properties": {
          "minAnnualRevenue": {
            "format": "double",
            "type": "number"
          },
          "minCertifiedArchitects": {
            "format": "int32",
            "type": "integer"
          },
          "minCertifiedProfessionals": {
            "format": "int32",
            "type": "integer"
          },
          "minCsatScore": {
            "format": "double",
            "type": "number"
          },
          "minForecastAccuracy": {
            "format": "double",
            "type": "number"
          },
          "minNewLogos": {
            "format": "int32",
            "type": "integer"
          },
          "minReferenceCustomers": {
            "format": "int32",
            "type": "integer"
          },
          "requiresActivePipeline": {
            "type": "boolean"
          },
          "requiresOnboardingComplete": {
            "type": "boolean"
          },
          "requiresQuarterlyForecasts": {
            "type": "boolean"
          },
          "tier": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TierHistoryDto": {
        "additionalProperties": false,
        "description": "Tier change history record",
        "properties": {
          "changeType": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "decidedBy": {
            "nullable": true,
            "type": "string"
          },
          "effectiveDate": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "newTier": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "previousTier": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "remediationEndDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "TierMetricsDto": {
        "additionalProperties": false,
        "description": "Current partner metrics",
        "properties": {
          "activePipeline": {
            "type": "boolean"
          },
          "annualRevenue": {
            "format": "double",
            "type": "number"
          },
          "certifiedArchitects": {
            "format": "int32",
            "type": "integer"
          },
          "certifiedProfessionals": {
            "format": "int32",
            "type": "integer"
          },
          "csatScore": {
            "format": "double",
            "type": "number"
          },
          "forecastAccuracy": {
            "format": "double",
            "type": "number"
          },
          "newLogos": {
            "format": "int32",
            "type": "integer"
          },
          "onboardingComplete": {
            "type": "boolean"
          },
          "quarterlyForecastsSubmitted": {
            "type": "boolean"
          },
          "referenceCustomers": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "TierQualificationDto": {
        "additionalProperties": false,
        "description": "Tier qualification assessment result with metrics and status",
        "properties": {
          "assessedAt": {
            "format": "date-time",
            "type": "string"
          },
          "atRiskOfDemotion": {
            "type": "boolean"
          },
          "currentTier": {
            "nullable": true,
            "type": "string"
          },
          "currentTierCriteria": {
            "$ref": "#/components/schemas/TierCriteriaDto"
          },
          "eligibleForAdvancement": {
            "type": "boolean"
          },
          "metrics": {
            "$ref": "#/components/schemas/TierMetricsDto"
          },
          "nextTierCriteria": {
            "$ref": "#/components/schemas/TierCriteriaDto"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "qualifiedForCurrentTier": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "TrueUpResultDto": {
        "additionalProperties": false,
        "description": "Result of a quarterly true-up reconciliation for a Buy-Sell partner",
        "properties": {
          "actualUsageValue": {
            "format": "double",
            "type": "number"
          },
          "adjustmentInvoiceRequired": {
            "type": "boolean"
          },
          "orderedQuantityValue": {
            "format": "double",
            "type": "number"
          },
          "overageAmount": {
            "format": "double",
            "type": "number"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "processedAt": {
            "format": "date-time",
            "type": "string"
          },
          "quarter": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpcomingActionDto": {
        "additionalProperties": false,
        "description": "An upcoming action or task requiring partner attention",
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "dueDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "priority": {
            "nullable": true,
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdatePartnerDetailsRequestDto": {
        "additionalProperties": false,
        "description": "Input DTO for updating editable partner details",
        "properties": {
          "noticeAddressCity": {
            "nullable": true,
            "type": "string"
          },
          "noticeAddressCountry": {
            "nullable": true,
            "type": "string"
          },
          "noticeAddressCounty": {
            "nullable": true,
            "type": "string"
          },
          "noticeAddressLine1": {
            "nullable": true,
            "type": "string"
          },
          "noticeAddressLine2": {
            "nullable": true,
            "type": "string"
          },
          "noticeAddressPostCode": {
            "nullable": true,
            "type": "string"
          },
          "principalContactEmail": {
            "description": "Principal contact email",
            "nullable": true,
            "type": "string"
          },
          "principalContactName": {
            "description": "Principal contact name",
            "nullable": true,
            "type": "string"
          },
          "principalContactPhone": {
            "description": "Principal contact phone",
            "nullable": true,
            "type": "string"
          },
          "tradingName": {
            "description": "Trading name or brand name",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateTicketStatusRequestDto": {
        "additionalProperties": false,
        "description": "Request DTO for updating ticket status",
        "properties": {
          "newStatus": {
            "nullable": true,
            "type": "string"
          },
          "notes": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UploadInsuranceCertificateRequestDto": {
        "additionalProperties": false,
        "description": "Request body for uploading an insurance certificate",
        "properties": {
          "certificateUrl": {
            "nullable": true,
            "type": "string"
          },
          "coverageAmount": {
            "format": "double",
            "type": "number"
          },
          "coverageCurrency": {
            "nullable": true,
            "type": "string"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "effectiveTo": {
            "format": "date-time",
            "type": "string"
          },
          "insuranceType": {
            "nullable": true,
            "type": "string"
          },
          "insurer": {
            "nullable": true,
            "type": "string"
          },
          "partnerId": {
            "format": "uuid",
            "type": "string"
          },
          "policyNumber": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "Bearer": {
        "bearerFormat": "JWT",
        "description": "Enter your JWT Bearer token in the format: {token}",
        "scheme": "Bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "contact": {
      "email": "partners@essence.digital",
      "name": "Essence Digital",
      "url": "https://partners.essence.digital"
    },
    "description": "API for the Essence Digital Channel Partner Programme Platform. Manages partner lifecycle, deal registrations, certifications, and commercial operations.",
    "title": "Essence Partner Programme API",
    "version": "v1"
  },
  "openapi": "3.0.1",
  "paths": {
    "/api/v1/admin/audit-log": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "partnerId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "entityType",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "entityId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateFrom",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateTo",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 50,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogEntryDtoPagedResult"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Retrieves paginated audit log entries with filtering options",
        "tags": [
          "AuditLog"
        ]
      }
    },
    "/api/v1/admin/partners/standing/republish": {
      "post": {
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerStandingRepublishResultDto"
                }
              }
            },
            "description": "Accepted"
          }
        },
        "summary": "Re-sends every partner's standing and every active hosting authorisation — run once after\r\nthe Commercial Manager deploy (Commercial Licence P3, fleet step 3). Safe to re-run:\r\nconsumers are idempotent by StandingVersion / AuthorisationId.",
        "tags": [
          "AdminPartnerCommercial"
        ]
      }
    },
    "/api/v1/admin/partners/{id}/commercial": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerCommercialDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "A partner's commercial position: status, type, organisation, payment terms, standing version\r\nand every hosting authorisation (active and revoked), newest first. 404 for an unknown partner.",
        "tags": [
          "AdminPartnerCommercial"
        ]
      }
    },
    "/api/v1/admin/partners/{id}/hosting-authorisations/{sovereignInstanceId}": {
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "sovereignInstanceId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "reason",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Revokes the provider's active authorisation for the sovereign. 404 when none is active;\r\n400 without a reason. The revoked authorisation is kept as history and never reopened.",
        "tags": [
          "AdminPartnerCommercial"
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "sovereignInstanceId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AdminAuthoriseHostingRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminAuthoriseHostingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminAuthoriseHostingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerHostingAuthorisationDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Authorises an Active managed service provider to host on one sovereign instance. Idempotent\r\nfor an already-active authorisation. 409 `partner.hosting_not_authorisable` (extension\r\n`reason`) when the partner is not an Active, organisation-linked managed service\r\nprovider — Approved is never enough.",
        "tags": [
          "AdminPartnerCommercial"
        ]
      }
    },
    "/api/v1/admin/partners/{id}/payment-terms": {
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSetPaymentTermsRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSetPaymentTermsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSetPaymentTermsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerPaymentTermsDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Sets the partner's payment terms (0..120 days) and publishes its standing.",
        "tags": [
          "AdminPartnerCommercial"
        ]
      }
    },
    "/api/v1/admin/partners/{id}/review": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AdminReviewPartnerRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminReviewPartnerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminReviewPartnerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Approves (or rejects) a pending partner application, advancing it to\r\nEssence.Partners.Domain.Enums.PartnerStatus.Approved — pending the real\r\nagreement e-signature (see class remarks). Platform-admin only.",
        "tags": [
          "AdminPartners"
        ]
      }
    },
    "/api/v1/admin/partners/{id}/suspend": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSuspendPartnerRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSuspendPartnerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminSuspendPartnerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerStatusDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Suspends an Active or Remediation partner and publishes its standing: new routed sales to\r\nit are refused, its hosted offers close; existing licences keep being invoiced to it.",
        "tags": [
          "AdminPartnerCommercial"
        ]
      }
    },
    "/api/v1/business-reviews": {
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleBusinessReviewRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleBusinessReviewRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleBusinessReviewRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Schedules a new business review meeting with a partner",
        "tags": [
          "BusinessReview"
        ]
      }
    },
    "/api/v1/business-reviews/{id}/minutes": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RecordBusinessReviewMinutesRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordBusinessReviewMinutesRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordBusinessReviewMinutesRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Records minutes and action items for a completed business review",
        "tags": [
          "BusinessReview"
        ]
      }
    },
    "/api/v1/certifications/demo-environments": {
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DemoEnvironmentRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoEnvironmentRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoEnvironmentRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Requests provisioning of a demo environment",
        "tags": [
          "Certifications"
        ]
      }
    },
    "/api/v1/certifications/enrol": {
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnrolCertificationRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrolCertificationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrolCertificationRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Enrols a user in a certification programme",
        "tags": [
          "Certifications"
        ]
      }
    },
    "/api/v1/certifications/expiring": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "partnerId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "default": 30,
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ExpiringCertificationDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Gets certifications expiring within the specified number of days",
        "tags": [
          "Certifications"
        ]
      }
    },
    "/api/v1/certifications/summary/{partnerId}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "partnerId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerCertificationSummaryDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Gets the certification summary for a partner",
        "tags": [
          "Certifications"
        ]
      }
    },
    "/api/v1/certifications/user/{userId}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CertificationDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Gets all certifications for a specific user",
        "tags": [
          "Certifications"
        ]
      }
    },
    "/api/v1/certifications/{id}/complete": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteCertificationRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteCertificationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteCertificationRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Completes a certification with a score",
        "tags": [
          "Certifications"
        ]
      }
    },
    "/api/v1/certifications/{id}/progress": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RecordCertificationProgressRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordCertificationProgressRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordCertificationProgressRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Records progress on a certification",
        "tags": [
          "Certifications"
        ]
      }
    },
    "/api/v1/certifications/{id}/renew": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Renews a completed or expired certification",
        "tags": [
          "Certifications"
        ]
      }
    },
    "/api/v1/commercial/commissions": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "periodFrom",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "periodTo",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "commissionType",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommissionSummaryDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Retrieves commission summary for a partner with optional filtering by period, status, and type",
        "tags": [
          "Commercial"
        ]
      }
    },
    "/api/v1/commercial/commissions/calculate": {
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateCommissionRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateCommissionRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateCommissionRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Calculates and records a commission for a partner deal. Admin only.",
        "tags": [
          "Commercial"
        ]
      }
    },
    "/api/v1/commercial/price-list": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceListDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Returns the price list filtered by the requesting partner's tier.\r\nCOMPETITION LAW: Only the requesting partner's buy prices are returned.\r\nResponse always includes the mandatory RRP disclaimer.",
        "tags": [
          "Commercial"
        ]
      }
    },
    "/api/v1/commercial/quotes": {
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateQuoteRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateQuoteRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateQuoteRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerQuoteDto"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Generates a new partner quote with tier-based pricing.\r\nCOMPETITION LAW: Quote does NOT restrict partner's sell-out price.\r\nResponse includes mandatory RRP disclaimer.",
        "tags": [
          "Commercial"
        ]
      }
    },
    "/api/v1/commercial/quotes/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerQuoteDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves full details for a specific quote including lines, discount info, and RRP disclaimer",
        "tags": [
          "Commercial"
        ]
      }
    },
    "/api/v1/commercial/quotes/{id}/discount": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DiscountApprovalRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscountApprovalRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscountApprovalRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Requests a discount approval on a quote.\r\nD1 bands (up to 10%) are auto-approved. D2 routes to COO, D3 routes to CEO.",
        "tags": [
          "Commercial"
        ]
      }
    },
    "/api/v1/commercial/quotes/{id}/discount/approve": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Approves a pending discount on a quote. Admin only.",
        "tags": [
          "Commercial"
        ]
      }
    },
    "/api/v1/commercial/true-up": {
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessTrueUpRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessTrueUpRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessTrueUpRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrueUpResultDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Processes quarterly true-up reconciliation for a Buy-Sell partner. Admin only.",
        "tags": [
          "Commercial"
        ]
      }
    },
    "/api/v1/compliance/declarations": {
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitComplianceDeclarationRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitComplianceDeclarationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitComplianceDeclarationRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Submits a compliance declaration for a specific type and the current year",
        "tags": [
          "Compliance"
        ]
      }
    },
    "/api/v1/compliance/insurance": {
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UploadInsuranceCertificateRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadInsuranceCertificateRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadInsuranceCertificateRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Uploads an insurance certificate for a partner",
        "tags": [
          "Compliance"
        ]
      }
    },
    "/api/v1/compliance/{partnerId}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "partnerId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceStatusDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Retrieves the compliance status for a partner including all declaration types and insurance records",
        "tags": [
          "Compliance"
        ]
      }
    },
    "/api/v1/deal-registrations": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "partnerId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "stage",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "valueMin",
            "schema": {
              "format": "double",
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "valueMax",
            "schema": {
              "format": "double",
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "dateFrom",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateTo",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          }
        },
        "summary": "Lists deal registrations with pagination and filtering",
        "tags": [
          "DealRegistrations"
        ]
      },
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitDealRegistrationRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitDealRegistrationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitDealRegistrationRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealRegistrationDto"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Submits a deal registration for review",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/drafts": {
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDraftDealRegistrationRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDraftDealRegistrationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDraftDealRegistrationRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Creates a draft deal registration (auto-save support)",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/drafts/{id}": {
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDraftDealRegistrationRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDraftDealRegistrationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDraftDealRegistrationRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Auto-saves a draft deal registration (partial updates, no validation)",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/expiring": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "days",
            "schema": {
              "default": 14,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "partnerId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ExpiringDealDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Retrieves deals with protection periods expiring within the specified number of days",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/funnel": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "partnerId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateFrom",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateTo",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealFunnelDto"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Retrieves deal funnel metrics with counts and values per status",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealRegistrationDetailDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves full details for a specific deal registration",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/{id}/close": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CloseDealRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseDealRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseDealRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Closes a deal registration as won or lost",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/{id}/conflicts": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DealConflictDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves conflict information for a deal registration.\r\nAdmin users see partner names; partner users see conflict existence only.",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/{id}/extend": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExtensionRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtensionRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtensionRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Requests a protection period extension for an approved deal",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/{id}/extend/approve": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Approves a protection period extension. Admin only.",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/{id}/review": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewDealRegistrationRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewDealRegistrationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewDealRegistrationRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Reviews a deal registration (approve, reject, or request more info). Admin only.",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/{id}/revoke": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeDealRegistrationCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeDealRegistrationCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeDealRegistrationCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Revokes an approved deal registration. Admin only.",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/deal-registrations/{id}/updates": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MonthlyUpdateRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonthlyUpdateRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MonthlyUpdateRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Submits a monthly progress update for an approved deal",
        "tags": [
          "DealRegistrations"
        ]
      }
    },
    "/api/v1/forecasts": {
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitPipelineForecastRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitPipelineForecastRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitPipelineForecastRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Submits a quarterly pipeline forecast with individual opportunities",
        "tags": [
          "Forecast"
        ]
      }
    },
    "/api/v1/forecasts/{partnerId}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "partnerId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "quarter",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PipelineForecastDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves pipeline forecast for a partner and quarter",
        "tags": [
          "Forecast"
        ]
      }
    },
    "/api/v1/marketing-assets": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "category",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/MarketingAssetDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Lists marketing assets filtered by the requesting partner's tier",
        "tags": [
          "MarketingAssets"
        ]
      },
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMarketingAssetRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMarketingAssetRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMarketingAssetRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Creates a new marketing asset. Admin only.",
        "tags": [
          "MarketingAssets"
        ]
      }
    },
    "/api/v1/marketing-assets/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketingAssetDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Gets full details for a specific marketing asset",
        "tags": [
          "MarketingAssets"
        ]
      }
    },
    "/api/v1/marketing-assets/{id}/download": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Tracks a download of a marketing asset",
        "tags": [
          "MarketingAssets"
        ]
      }
    },
    "/api/v1/partner-customers": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "partnerId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          }
        },
        "summary": "Lists partner customers with pagination",
        "tags": [
          "PartnerCustomers"
        ]
      }
    },
    "/api/v1/partner-customers/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerCustomerDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Gets full details for a specific partner customer",
        "tags": [
          "PartnerCustomers"
        ]
      }
    },
    "/api/v1/partner-customers/{id}/revenue": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerRevenueDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Gets the revenue attribution trail for a partner customer",
        "tags": [
          "PartnerCustomers"
        ]
      }
    },
    "/api/v1/partner-orders": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "partnerId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          }
        },
        "summary": "Lists partner orders with pagination and filtering",
        "tags": [
          "PartnerOrders"
        ]
      },
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerOrderRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerOrderRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerOrderRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Creates a new partner order in Draft status",
        "tags": [
          "PartnerOrders"
        ]
      }
    },
    "/api/v1/partner-orders/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerOrderDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Gets full details for a specific partner order",
        "tags": [
          "PartnerOrders"
        ]
      }
    },
    "/api/v1/partner-orders/{id}/approve": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveOrderRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveOrderRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveOrderRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Approves a submitted order. Admin only.",
        "tags": [
          "PartnerOrders"
        ]
      }
    },
    "/api/v1/partner-orders/{id}/cancel": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CancelOrderRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelOrderRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelOrderRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Cancels a partner order, cleaning up billing and provisioning",
        "tags": [
          "PartnerOrders"
        ]
      }
    },
    "/api/v1/partner-orders/{id}/provision": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Provisions the customer instance for an approved order",
        "tags": [
          "PartnerOrders"
        ]
      }
    },
    "/api/v1/partner-orders/{id}/provisioning-status": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderProvisioningStatusDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Gets real-time provisioning progress for an order",
        "tags": [
          "PartnerOrders"
        ]
      }
    },
    "/api/v1/partner-orders/{id}/setup-billing": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Sets up billing for an approved order",
        "tags": [
          "PartnerOrders"
        ]
      }
    },
    "/api/v1/partner-orders/{id}/submit": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Submits a draft order for approval",
        "tags": [
          "PartnerOrders"
        ]
      }
    },
    "/api/v1/partner-registry/accreditation": {
      "get": {
        "description": "\n\r\n            Service-to-service. Everything returned is server-held: the caller supplies only the code,\r\n            and cannot influence the tier or status that comes back — which is the entire point.\r\n            \r\n\n\r\n            A referral code is an identifier, not a credential: it names a partner, it does not\r\n            authorise anyone. So this deliberately returns 404 for an unknown code rather than\r\n            pretending, and exposes nothing an attacker could not learn from the partner's own website.\r\n            ",
        "parameters": [
          {
            "in": "query",
            "name": "referralCode",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "partnerId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerAccreditationDto"
                }
              }
            },
            "description": "The partner's accreditation."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "No partner holds that code."
          }
        },
        "summary": "Resolves a referral code to the partner's accreditation.",
        "tags": [
          "PartnerRegistry"
        ]
      }
    },
    "/api/v1/partners": {
      "get": {
        "parameters": [
          {
            "description": "Page number (default: 1)",
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "Items per page (default: 20, max: 100)",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "Filter by partner status",
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by partner tier",
            "in": "query",
            "name": "tier",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by partner type",
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search by name or registered number",
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          }
        },
        "summary": "Lists all partners with optional filtering and pagination",
        "tags": [
          "Partners"
        ]
      }
    },
    "/api/v1/partners/applications": {
      "get": {
        "parameters": [
          {
            "description": "Optional status filter",
            "in": "query",
            "name": "status",
            "schema": {
              "$ref": "#/components/schemas/PartnerStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PartnerApplicationSummaryDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Applications returned"
          }
        },
        "summary": "Lists partner applications for the review queue, optionally filtered by status. Requires admin scope.",
        "tags": [
          "PartnerApplications"
        ]
      },
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerApplicationRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerApplicationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerApplicationRequestDto"
              }
            }
          },
          "description": "The partner application details"
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Application submitted successfully"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Validation errors in the request"
          },
          "409": {
            "description": "A partner with the same registered number already exists"
          }
        },
        "summary": "Submits a new partner application to the Essence Partner Programme",
        "tags": [
          "PartnerApplications"
        ]
      }
    },
    "/api/v1/partners/applications/notifications": {
      "get": {
        "parameters": [
          {
            "description": "When true, returns only unread notifications",
            "in": "query",
            "name": "unreadOnly",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProgrammeNotificationDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Notifications returned"
          }
        },
        "summary": "Retrieves programme notifications addressed to the Essence partner-review team. Requires admin scope.",
        "tags": [
          "PartnerApplications"
        ]
      }
    },
    "/api/v1/partners/applications/notifications/{notificationId}/read": {
      "patch": {
        "parameters": [
          {
            "description": "The notification ID",
            "in": "path",
            "name": "notificationId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Notification marked as read"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Notification not found"
          }
        },
        "summary": "Marks a programme notification as read. Requires admin scope.",
        "tags": [
          "PartnerApplications"
        ]
      }
    },
    "/api/v1/partners/applications/pending-count": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingApplicationCountsDto"
                }
              }
            },
            "description": "Counts returned"
          }
        },
        "summary": "Returns pending application counts for the review console dashboard. Requires admin scope.",
        "tags": [
          "PartnerApplications"
        ]
      }
    },
    "/api/v1/partners/applications/{id}": {
      "get": {
        "parameters": [
          {
            "description": "The partner ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerApplicationDetailDto"
                }
              }
            },
            "description": "Application detail returned"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Partner not found"
          }
        },
        "summary": "Retrieves full detail for a single partner application. Requires admin scope.",
        "tags": [
          "PartnerApplications"
        ]
      }
    },
    "/api/v1/partners/applications/{id}/agreement": {
      "post": {
        "parameters": [
          {
            "description": "The partner ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Agreement envelope created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state or Signable API error"
          },
          "404": {
            "description": "Partner not found"
          }
        },
        "summary": "Initiates the e-signature process for a partner agreement via Signable. Requires admin scope.",
        "tags": [
          "PartnerApplications"
        ]
      }
    },
    "/api/v1/partners/applications/{id}/agreement/resend": {
      "post": {
        "parameters": [
          {
            "description": "The partner ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Agreement resent"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state or Signable API error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Partner not found"
          }
        },
        "summary": "Clears a failed agreement envelope and sends a fresh one. Requires admin scope.",
        "tags": [
          "PartnerApplications"
        ]
      }
    },
    "/api/v1/partners/applications/{id}/countersign": {
      "post": {
        "parameters": [
          {
            "description": "The partner ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Agreement countersigned"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Partner not found"
          }
        },
        "summary": "Essence countersigns a partner-signed agreement, executing it and starting onboarding. Requires admin scope.",
        "tags": [
          "PartnerApplications"
        ]
      }
    },
    "/api/v1/partners/applications/{id}/review": {
      "post": {
        "parameters": [
          {
            "description": "The partner ID to review",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewPartnerApplicationRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewPartnerApplicationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewPartnerApplicationRequestDto"
              }
            }
          },
          "description": "The review details including outcome"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Application reviewed successfully"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Validation errors or invalid state"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Partner not found"
          }
        },
        "summary": "Reviews a partner application (approve or reject). Requires admin scope.",
        "tags": [
          "PartnerApplications"
        ]
      }
    },
    "/api/v1/partners/applications/{id}/start-review": {
      "post": {
        "parameters": [
          {
            "description": "The partner ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Review started"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Partner not found"
          }
        },
        "summary": "Moves an application from ApplicationSubmitted to UnderReview, attributing the reviewer. Requires admin scope.",
        "tags": [
          "PartnerApplications"
        ]
      }
    },
    "/api/v1/partners/me": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerProfileDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves the current authenticated user's own partner profile (by applicant\r\nuser id). Used by the portal BFF to compose the signed-in user view.",
        "tags": [
          "Partners"
        ]
      }
    },
    "/api/v1/partners/programme/tiers": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProgrammeTiersDto"
                }
              }
            },
            "description": "The ladder."
          }
        },
        "summary": "The five rungs, their thresholds, each rung's resale margin by SKU family and referral\r\nfee, and the cross-walk to the builder, specialism and framework ladders — read from\r\n`docs/commercial/catalogue/partner-tiers.json`.",
        "tags": [
          "ProgrammeTiers"
        ]
      }
    },
    "/api/v1/partners/service-providers": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "region",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ServiceProviderDirectoryEntryDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "The approved hosting providers in region (e.g. `GB`).",
        "tags": [
          "ServiceProviders"
        ]
      }
    },
    "/api/v1/partners/{id}": {
      "get": {
        "parameters": [
          {
            "description": "The partner ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelPartnerDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves full details for a specific partner",
        "tags": [
          "Partners"
        ]
      },
      "patch": {
        "parameters": [
          {
            "description": "The partner ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePartnerDetailsRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePartnerDetailsRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePartnerDetailsRequestDto"
              }
            }
          },
          "description": "The update details"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Updates editable partner details",
        "tags": [
          "Partners"
        ]
      }
    },
    "/api/v1/partners/{id}/dashboard": {
      "get": {
        "parameters": [
          {
            "description": "The partner ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerDashboardDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves the partner dashboard with aggregated metrics",
        "tags": [
          "Partners"
        ]
      }
    },
    "/api/v1/partners/{id}/terminate": {
      "post": {
        "parameters": [
          {
            "description": "The partner ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InitiatePartnerTerminationCommand"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiatePartnerTerminationCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiatePartnerTerminationCommand"
              }
            }
          },
          "description": "Termination details including reason and type"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Initiates the termination of a partnership. Requires admin scope.",
        "tags": [
          "Partners"
        ]
      }
    },
    "/api/v1/partners/{id}/tier-history": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TierHistoryDto"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves the tier change history for a partner",
        "tags": [
          "TierManagement"
        ]
      }
    },
    "/api/v1/partners/{id}/tier-qualification": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TierQualificationDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves the tier qualification status for a partner, including current metrics vs requirements",
        "tags": [
          "TierManagement"
        ]
      }
    },
    "/api/v1/partners/{id}/tier/adjust": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustTierRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustTierRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustTierRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Admin adjusts a partner's tier (up or down). Demotions require 30-day written notice.",
        "tags": [
          "TierManagement"
        ]
      }
    },
    "/api/v1/partners/{id}/tier/advance": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Partner requests advancement to the next tier when criteria are met",
        "tags": [
          "TierManagement"
        ]
      }
    },
    "/api/v1/partners/{id}/tier/remediation": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InitiateTierRemediationRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiateTierRemediationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InitiateTierRemediationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Admin initiates a 90-day remediation period for a partner not meeting tier criteria",
        "tags": [
          "TierManagement"
        ]
      }
    },
    "/api/v1/partners/{partnerId}/onboarding": {
      "get": {
        "parameters": [
          {
            "description": "The partner ID",
            "in": "path",
            "name": "partnerId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingProgressDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves onboarding progress for a partner including milestone completion status",
        "tags": [
          "PartnerOnboarding"
        ]
      }
    },
    "/api/v1/partners/{partnerId}/onboarding/milestones": {
      "post": {
        "parameters": [
          {
            "description": "The partner ID",
            "in": "path",
            "name": "partnerId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteMilestoneRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteMilestoneRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteMilestoneRequest"
              }
            }
          },
          "description": "The milestone completion request"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Marks an onboarding milestone as completed",
        "tags": [
          "PartnerOnboarding"
        ]
      }
    },
    "/api/v1/portal/notifications": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "unreadOnly",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerNotificationDtoPagedResult"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Retrieves paginated notifications for the current user",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/portal/notifications/{id}/read": {
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Marks a notification as read",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/reporting/csat-trend/{partnerId}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "partnerId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsatTrendDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Retrieves CSAT score trend by month for a partner",
        "tags": [
          "Reporting"
        ]
      }
    },
    "/api/v1/reporting/funnel": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "partnerId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateFrom",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateTo",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DealFunnelAnalyticsDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Retrieves advanced deal funnel analytics with conversion rates between stages",
        "tags": [
          "Reporting"
        ]
      }
    },
    "/api/v1/reporting/revenue-trend/{partnerId}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "partnerId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevenueTrendDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Retrieves revenue trend by quarter for a partner",
        "tags": [
          "Reporting"
        ]
      }
    },
    "/api/v1/reporting/revenue/{partnerId}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "partnerId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateFrom",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateTo",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevenueAttributionDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Retrieves revenue attribution breakdown for a partner by model, product, and quarter",
        "tags": [
          "Reporting"
        ]
      }
    },
    "/api/v1/reporting/scorecard/{partnerId}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "partnerId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateFrom",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateTo",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerScorecardDto"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Retrieves a comprehensive scorecard for a partner with all key performance metrics",
        "tags": [
          "Reporting"
        ]
      }
    },
    "/api/v1/support-tickets": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "partnerId",
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "default": 1,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "default": 20,
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "severity",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "dateFrom",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateTo",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          }
        },
        "summary": "Lists support tickets with pagination and filtering",
        "tags": [
          "SupportTickets"
        ]
      },
      "post": {
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupportTicketRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupportTicketRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupportTicketRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportTicketDto"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Creates a new support ticket",
        "tags": [
          "SupportTickets"
        ]
      }
    },
    "/api/v1/support-tickets/performance/{partnerId}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "partnerId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateFrom",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "dateTo",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportPerformanceDto"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Gets support performance metrics for a partner",
        "tags": [
          "SupportTickets"
        ]
      }
    },
    "/api/v1/support-tickets/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportTicketDetailDto"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Gets full details for a specific support ticket",
        "tags": [
          "SupportTickets"
        ]
      }
    },
    "/api/v1/support-tickets/{id}/close": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Closes a support ticket",
        "tags": [
          "SupportTickets"
        ]
      }
    },
    "/api/v1/support-tickets/{id}/csat": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CsatSurveyRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CsatSurveyRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CsatSurveyRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Submits a CSAT survey for a ticket",
        "tags": [
          "SupportTickets"
        ]
      }
    },
    "/api/v1/support-tickets/{id}/escalate": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EscalateTicketRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EscalateTicketRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EscalateTicketRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Escalates a support ticket to L2 or L3",
        "tags": [
          "SupportTickets"
        ]
      }
    },
    "/api/v1/support-tickets/{id}/resolve": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveTicketRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveTicketRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveTicketRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Resolves a support ticket",
        "tags": [
          "SupportTickets"
        ]
      }
    },
    "/api/v1/support-tickets/{id}/status": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTicketStatusRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTicketStatusRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTicketStatusRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Updates the status of a support ticket",
        "tags": [
          "SupportTickets"
        ]
      }
    },
    "/api/v1/support-tickets/{id}/updates": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddTicketUpdateRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddTicketUpdateRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddTicketUpdateRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Adds an update or comment to a support ticket",
        "tags": [
          "SupportTickets"
        ]
      }
    },
    "/api/v1/webhooks/signable": {
      "post": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Webhook processed successfully"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid webhook signature or payload"
          }
        },
        "summary": "Receives and processes Signable webhook events for partner agreement e-signatures.\r\nValidates the HMAC-SHA256 webhook signature before processing.",
        "tags": [
          "SignableWebhooks"
        ]
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "tags": [
    {
      "description": "The Essence partner team's COMMERCIAL operations on a partner (Commercial Licence P3): service-\r\nprovider hosting authorisation per sovereign instance, payment terms, suspension and the\r\nstanding republish. Platform-admin only.",
      "name": "AdminPartnerCommercial"
    },
    {
      "description": "Admin-only test-fixture partner provisioning surface (§9a — provisioning\r\nentry point #3: \"create partner/channel\"). Reuses the SAME\r\nEssence.Partners.Application.Commands.PartnerApplication.SubmitPartnerApplicationCommand/Essence.Partners.Application.Commands.PartnerReview.ReviewPartnerApplicationCommand\r\nthe real partner-onboarding pipeline uses — no new domain logic.",
      "name": "AdminPartners"
    },
    {
      "description": "Controller for audit log operations. Admin only.",
      "name": "AuditLog"
    },
    {
      "description": "Controller for partner business review operations",
      "name": "BusinessReview"
    },
    {
      "description": "Controller for certification and enablement management",
      "name": "Certifications"
    },
    {
      "description": "Controller for commercial operations: pricing, quotes, commissions, and true-ups.\r\nCOMPETITION LAW: All pricing responses include RRP disclaimer.\r\nPrice list endpoint filters by requesting partner's tier — never exposes other tiers' pricing.",
      "name": "Commercial"
    },
    {
      "description": "Controller for compliance operations: declarations and insurance certificates",
      "name": "Compliance"
    },
    {
      "description": "Controller for deal registration lifecycle management",
      "name": "DealRegistrations"
    },
    {
      "description": "Controller for pipeline forecast operations",
      "name": "Forecast"
    },
    {
      "description": "Controller for partner marketing and enablement assets",
      "name": "MarketingAssets"
    },
    {
      "description": "Controller for partner portal notification operations",
      "name": "Notifications"
    },
    {
      "description": "Controller for partner application submission and review",
      "name": "PartnerApplications"
    },
    {
      "description": "Controller for partner customer portfolio management",
      "name": "PartnerCustomers"
    },
    {
      "description": "Controller for partner onboarding milestone management.\r\n            \r\n\n\r\nEach action names its partner policy. The class-level `[Authorize]` alone never runs\r\n`PartnerOrgMemberHandler`, so `_currentUser.PartnerId` stayed null and the isolation\r\ncheck below forbade every partner from their own onboarding (#12496).\r\n",
      "name": "PartnerOnboarding"
    },
    {
      "description": "Controller for the partner order-to-cash workflow",
      "name": "PartnerOrders"
    },
    {
      "description": "The partner accreditation registry — the authoritative answer to \"is this really a partner, and\r\nwhat are they entitled to?\".\r\n            \r\n\n\r\nEPIC 55 owns partner status and tier; other services must ask rather than accept a caller's word\r\nfor it. The onboarding service previously took `PartnerTier` as a string in the request and\r\npaid commission on it, so a partner could self-declare their way to a better rate. This endpoint\r\nis what lets onboarding stop doing that.\r\n",
      "name": "PartnerRegistry"
    },
    {
      "description": "Controller for partner management operations",
      "name": "Partners"
    },
    {
      "description": "The published partner programme ladder (EPIC 55 FR-55.151) — the endpoint\r\n`module.manifest.json` declared at `api.subPaths.tiers` and nobody built.",
      "name": "ProgrammeTiers"
    },
    {
      "description": "Controller for partner reporting: scorecards, funnel analytics, revenue attribution",
      "name": "Reporting"
    },
    {
      "description": "The read-only directory of approved hosting providers (Commercial Licence P3): Active managed\r\nservice providers authorised to host on a sovereign instance in a region. Carries no price.\r\nAn ordinary authenticated portal read (ruling P3-R10), bound to its own release capability.",
      "name": "ServiceProviders"
    },
    {
      "description": "Controller for receiving Signable e-signature webhook callbacks",
      "name": "SignableWebhooks"
    },
    {
      "description": "Controller for partner support ticket management and SLA tracking",
      "name": "SupportTickets"
    },
    {
      "description": "Controller for partner tier management operations.\r\nIncludes qualification assessment, advancement requests, remediation, and tier adjustments.",
      "name": "TierManagement"
    }
  ]
}
