---
openapi: 3.1.0
components:
  schemas:
    AddCompanyRequest:
      type: object
      required:
      - businessId
      - countryCode
      properties:
        businessId:
          type: string
          examples:
          - 2538754-7
          pattern: \S
          description: Unique identifier for the company
        countryCode:
          type: string
          examples:
          - FI
          pattern: \S
          description: Country code where the company is registered
        enableMonitoring:
          type: boolean
          examples:
          - false
          description: Option to enable monitoring for the company's activities
          default: false
        synchronous:
          type: boolean
          examples:
          - false
          description: Require syncrhonous processing
          default: false
        companyKeyFigures:
          type: boolean
          examples:
          - false
          description: Retrieve company key figures during add company operation
          default: false
        companyRating:
          type: boolean
          examples:
          - false
          description: Retrieve company rating during add company operation
          default: false
        companyRepresentatives:
          type: boolean
          examples:
          - false
          description: Retrieve company representatives during add company operation
          default: false
        companyPaymentRemarks:
          type: boolean
          examples:
          - false
          description: Retrieve company representatives during add company operation
          default: false
        companyRatingPlus:
          type: boolean
          examples:
          - false
          description: Retrieve company rating plus during add company operation
          default: false
        companyPublicInformation:
          type: boolean
          examples:
          - false
          description: Retrieve public information about the company such as the website
          default: false
    AddPersonRequest:
      type: object
      required:
      - firstName
      - lastName
      properties:
        firstName:
          type: string
          examples:
          - John
          pattern: \S
          description: First name
        lastName:
          type: string
          examples:
          - Doe
          pattern: \S
          description: Last name
        email:
          type: string
          examples:
          - john@example.com
          description: Email address
        dateOfBirth:
          type: string
          examples:
          - 1990-01-15
          description: Date of birth as yyyy-MM-dd
        phoneNumber:
          type: string
          examples:
          - "+35840123456"
          description: Phone number with country code
        homeCountry:
          type: string
          examples:
          - fi
          description: Home country
        country:
          type: string
          examples:
          - fi
          description: Nationality - defaults to home country unless specified
        ssn:
          type: string
          examples:
          - 123-45-6789
          description: Social security number
        jobTitle:
          type: string
          examples:
          - Software Engineer
          description: Job title
        gender:
          type: string
          examples:
          - Male
          description: Gender
        checkEmail:
          type: boolean
          examples:
          - true
          description: Check if the provided email can be connected with the company
        checkPhoneNumber:
          type: boolean
          examples:
          - true
          description: Check if the provided phone number can be connected with the
            company
        checkRepresentation:
          type: boolean
          examples:
          - true
          description: Check if the person is listed as a responsible person. Requires
            date of birth or ssn.
    Address:
      type: object
      properties:
        country:
          type: string
        district:
          type: string
        city:
          type: string
        street:
          type: string
        postalCode:
          type: string
        countryCode:
          type: string
        streetSecondRow:
          type: string
        addressType:
          $ref: "#/components/schemas/AddressType"
    AddressEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/CompanyEntity"
        street:
          type: string
        city:
          type: string
        postalCode:
          type: string
        country:
          type: string
        district:
          type: string
        countryCode:
          type: string
        streetSecondRow:
          type: string
        addressType:
          $ref: "#/components/schemas/AddressType"
    AddressType:
      type: string
      enum:
      - VISIT
      - BILLING
      - POSTAL
    AllowedSteps:
      type: string
      enum:
      - DECISION_COMPANY_BASE
      - DECISION_COMPANY_CREDIT
      - DECISION_COMPANY_PERSON
      - CUSTOM
      - EMAIL_NOTIFICATIONS
      - EXPORT_TO_PIPEDRIVE
      - SEND_APPROVAL_REQUEST
      - UPDATE_LEAD_DETAILS
    AmlPersonRequest:
      type: object
      required:
      - businessId
      - country
      properties:
        firstName:
          type: string
        lastName:
          type: string
        gender:
          type: string
        businessId:
          type: string
          minLength: 8
          maxLength: 11
          pattern: \S
        country:
          type: string
          pattern: \S
        dateOfBirth:
          $ref: "#/components/schemas/LocalDate"
    ApiKeyRequest:
      type: object
      description: API key creation request
      properties:
        name:
          type: string
          examples:
          - Production Service Key
          - Development API
          - CI/CD Integration
          description: The name of the API key
        expiresInSeconds:
          type:
          - integer
          - "null"
          format: int64
          examples:
          - 3600
          - 86400
          - 604800
          description: Expiration time in seconds from now; null for non-expiring
            keys
    ApiKeyResponse:
      type: object
      description: API key response containing the token and metadata
      properties:
        token:
          type: string
          examples:
          - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
          description: The generated JWT token to use for authentication
        name:
          type: string
          examples:
          - Production Service Key
          - Development API
          - CI/CD Integration
          description: The name of the API key
        organizationId:
          type: string
          examples:
          - 3daec4bc-1885-4a69-8ca6-9c1e7eccb673
          description: The organization ID associated with this key
        expiresInSeconds:
          type:
          - integer
          - "null"
          format: int64
          examples:
          - 3600
          - 86400
          - 604800
          description: Expiration time in seconds from creation; null for non-expiring
            keys
    AuthRequest:
      type: object
      required:
      - email
      - password
      properties:
        email:
          type: string
        password:
          type: string
    BisnodeCredentialsRequest:
      type: object
      required:
      - username
      - password
      properties:
        username:
          type: string
        password:
          type: string
    BisnodeCredentialsResponse:
      type: object
      properties:
        username:
          type: string
        password:
          type: string
    CalendlyDeleteSubscriptionRequest:
      type: object
      properties:
        apiKey:
          type: string
          examples:
          - your-api-token
          description: Your Calendly personal access token. The token is not saved
            to the server.
        webhookId:
          type: string
          examples:
          - 206da524-8e9c-4517-ba1f-fab7d1817dea
          description: Webhook ID.
    CalendlySubscriptionRequest:
      type: object
      properties:
        apiKey:
          type: string
          examples:
          - your-api-token
          description: Your Calendly personal access token. The token is not saved
            to the server.
        smartFormId:
          type: string
          examples:
          - 206da524-8e9c-4517-ba1f-fab7d1817dea
          description: The Workflow ID which will be used for processing webhook triggeres.
    CalendlyUser:
      type: object
      properties:
        resource:
          $ref: "#/components/schemas/CalendlyUserResource"
    CalendlyUserResource:
      type: object
      properties:
        avatar_url:
          type: string
        created_at:
          type: string
        current_organization:
          type: string
        email:
          type: string
        name:
          type: string
        resource_type:
          type: string
        scheduling_url:
          type: string
        slug:
          type: string
        timezone:
          type: string
        updated_at:
          type: string
        uri:
          type: string
    CalendlyWebhookEntity:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        organizationId:
          $ref: "#/components/schemas/UUID"
        uri:
          type: string
        webhookSubscriptionId:
          type: string
        signingSecret:
          type: string
        createdById:
          $ref: "#/components/schemas/UUID"
        createdByName:
          type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
        updatedAt:
          $ref: "#/components/schemas/Instant"
        deletedAt:
          $ref: "#/components/schemas/Instant"
    CalendlyWebhookPayload:
      type: object
      description: Payload of the Calendly webhook containing detailed event information
      properties:
        cancel_url:
          type: string
          examples:
          - https://calendly.com/cancellations/AAAAAAAAAAAAAAAA
          description: URL for cancelling the event
        created_at:
          type: string
          examples:
          - 2020-11-23T17:51:18.327602Z
          description: The datetime when the event was created inside the payload
        email:
          type: string
          examples:
          - test@example.com
          description: Email address of the invitee
        event:
          type: string
          examples:
          - https://api.calendly.com/scheduled_events/AAAAAAAAAAAAAAAA
          description: URL to the scheduled event details
        name:
          type: string
          examples:
          - John Doe
          description: Full name of the invitee
        new_invitee:
          $ref: "#/components/schemas/Invitee"
          type: object
          description: "Details of the new invitee, can be null if not applicable"
        old_invitee:
          $ref: "#/components/schemas/Invitee"
          type: object
          description: "Details of the old invitee, can be null if replaced"
        questions_and_answers:
          type: array
          items:
            $ref: "#/components/schemas/QuestionAndAnswer"
          description: List of questions and their answers provided during the scheduling
        reschedule_url:
          type: string
          examples:
          - https://calendly.com/reschedulings/AAAAAAAAAAAAAAAA
          description: URL for rescheduling the event
        rescheduled:
          type: boolean
          examples:
          - false
          description: Indicates if the event has been rescheduled
        status:
          type: string
          examples:
          - active
          description: Current status of the event
        text_reminder_number:
          type: string
          examples:
          - "null"
          description: "Contact number for text reminders, can be null"
        timezone:
          type: string
          examples:
          - America/New_York
          description: Time zone of the event
        tracking:
          $ref: "#/components/schemas/Tracking"
          type: object
          description: Tracking parameters for marketing analytics
        updated_at:
          type: string
          examples:
          - 2020-11-23T17:51:18.341657Z
          description: The datetime when the event was last updated
        uri:
          type: string
          examples:
          - https://api.calendly.com/scheduled_events/AAAAAAAAAAAAAAAA/invitees/AAAAAAAAAAAAAAAA
          description: URI of the invitee within the event
        scheduled_event:
          $ref: "#/components/schemas/ScheduledEvent"
          type: object
          description: Detailed information about the scheduled event
    ChangeRecord:
      type: object
      properties:
        fieldName:
          type: string
        originalValue: {}
        newValue: {}
    CompanyAmlEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/CompanyEntity"
        sanction:
          type: boolean
        matchId:
          type: string
        matchName:
          type: string
        matchScore:
          type: number
          format: double
        plianceMonitoringEnabled:
          type: boolean
        createdAt:
          $ref: "#/components/schemas/Instant"
    CompanyBeneficialOwnerEntity:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        company:
          $ref: "#/components/schemas/CompanyEntity"
        lastName:
          type: string
        firstName:
          type: string
        ssn:
          type: string
        ownershipExtent:
          type: number
          format: double
        voteExtent:
          type: number
          format: double
        roleCode:
          type: string
        businessProhibition:
          type: boolean
        businessProhibitionStartDate:
          $ref: "#/components/schemas/LocalDate"
        businessProhibitionEndDate:
          $ref: "#/components/schemas/LocalDate"
        guardianship:
          type: string
        remarks:
          type: string
        homeCountry:
          type: string
        nationality:
          type: string
        dateOfBirth:
          $ref: "#/components/schemas/LocalDate"
        dateOfDeath:
          $ref: "#/components/schemas/LocalDate"
        createdAt:
          $ref: "#/components/schemas/Instant"
    CompanyDetailsResponse:
      type: object
      properties:
        countryCode:
          type: string
        languageCode:
          type: string
        ids:
          type: array
          items:
            $ref: "#/components/schemas/CompanyId"
        name:
          type: string
        postalAddress:
          type: array
          items:
            $ref: "#/components/schemas/Address"
        visitingAddress:
          type: array
          items:
            $ref: "#/components/schemas/Address"
        contactPhoneNumber:
          type: string
        contactEMail:
          type: string
        phoneNumbers:
          type: array
          items:
            type: string
        domains:
          type: array
          items:
            type: string
        websites:
          type: array
          items:
            type: string
        formCode:
          type: string
        formAsOf:
          type: string
        formValue:
          type: string
        companyBusinessLineCode:
          type: string
        companyBusinessLineValue:
          type: string
        registers:
          type: array
          items:
            $ref: "#/components/schemas/CompanyRegistry"
        status:
          type: boolean
        establishmentDate:
          type: string
        receivingFinvoiceAddress:
          type: array
          items:
            $ref: "#/components/schemas/FinvoiceAddress"
        sendingFinvoiceAddress:
          type: array
          items:
            $ref: "#/components/schemas/FinvoiceAddress"
        billingAddress:
          $ref: "#/components/schemas/Address"
        emailInvoicingAddress:
          type: string
        revenueClass:
          type: string
        revenue:
          type: integer
          format: int64
        result:
          type: integer
          format: int64
        employees:
          type: integer
          format: int32
    CompanyDomainEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/CompanyEntity"
        domain:
          type: string
        source:
          type: string
    CompanyEntity:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        name:
          type: string
        organizationId:
          $ref: "#/components/schemas/UUID"
        operationalStatus:
          type: boolean
        primaryBusinessId:
          type: string
        countryCode:
          type: string
        languageCode:
          type: string
        formCode:
          type: string
        formAsOf:
          type: string
        formValue:
          type: string
        companySector:
          type: string
        businessLineCode:
          type: string
        businessLineValue:
          type: string
        contactPhoneNumber:
          type: string
        contactEMail:
          type: string
        establishmentDate:
          type: string
        emailInvoicingAddress:
          type: string
        employees:
          type: integer
          format: int32
        revenueClass:
          type: string
        revenue:
          type: integer
          format: int64
        result:
          type: integer
          format: int64
        ratingUpdatedAt:
          $ref: "#/components/schemas/Instant"
        ratingPlusUpdatedAt:
          $ref: "#/components/schemas/Instant"
        keyFiguresUpdatedAt:
          $ref: "#/components/schemas/Instant"
        responsiblePersonsUpdatedAt:
          $ref: "#/components/schemas/Instant"
        baseUpdatedAt:
          $ref: "#/components/schemas/Instant"
        paymentRemarksUpdatedAt:
          $ref: "#/components/schemas/Instant"
        deletedAt:
          $ref: "#/components/schemas/Instant"
        description:
          type: string
        websites:
          type: array
          items:
            $ref: "#/components/schemas/CompanyWebsiteEntity"
        phoneNumbers:
          type: array
          items:
            $ref: "#/components/schemas/CompanyPhoneNumberEntity"
        domains:
          type: array
          items:
            $ref: "#/components/schemas/CompanyDomainEntity"
        addresses:
          type: array
          items:
            $ref: "#/components/schemas/AddressEntity"
        registers:
          type: array
          items:
            $ref: "#/components/schemas/CompanyRegistryEntity"
        finvoiceAddresses:
          type: array
          items:
            type: object
            properties:
              company:
                $ref: "#/components/schemas/CompanyEntity"
              finvoiceAddressType:
                $ref: "#/components/schemas/FinvoiceAddressType"
              name:
                type: string
              address:
                type: string
              operatorCode:
                type: string
              operator:
                type: string
              ovt:
                type: string
        additionalCompanyIds:
          type: array
          items:
            $ref: "#/components/schemas/CompanyIdEntity"
        amlStatus:
          type: array
          items:
            $ref: "#/components/schemas/CompanyAmlEntity"
        beneficialOwners:
          type: array
          items:
            $ref: "#/components/schemas/CompanyBeneficialOwnerEntity"
        responsiblePersons:
          type: array
          items:
            $ref: "#/components/schemas/CompanyResponsiblePersonEntity"
        rating:
          type: array
          items:
            $ref: "#/components/schemas/CompanyRatingEntity"
        keyFigures:
          type: array
          items:
            $ref: "#/components/schemas/CompanyKeyFiguresEntity"
        remarks:
          type: array
          items:
            $ref: "#/components/schemas/CompanyRemarkEntity"
        ratingPlus:
          type: array
          items:
            $ref: "#/components/schemas/CompanyRatingPlusEntity"
        companyStatus:
          type: array
          items:
            $ref: "#/components/schemas/CompanyStatusEntity"
        createdAt:
          $ref: "#/components/schemas/Instant"
        modifiedAt:
          $ref: "#/components/schemas/Instant"
        createdBy:
          $ref: "#/components/schemas/UUID"
        modifiedBy:
          $ref: "#/components/schemas/UUID"
    CompanyFullResponse:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        name:
          type: string
        operationalStatus:
          type: boolean
        primaryBusinessId:
          type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
        modifiedAt:
          $ref: "#/components/schemas/Instant"
        countryCode:
          type: string
        languageCode:
          type: string
        formCode:
          type: string
        formAsOf:
          type: string
        formValue:
          type: string
        companySector:
          type: string
        businessLineCode:
          type: string
        businessLineValue:
          type: string
        contactPhoneNumber:
          type: string
        contactEMail:
          type: string
        establishmentDate:
          type: string
        emailInvoicingAddress:
          type: string
        employees:
          type: integer
          format: int32
        revenueClass:
          type: string
        revenue:
          type: integer
          format: int64
        result:
          type: integer
          format: int64
        websites:
          type: array
          items:
            type: object
            properties:
              website:
                type: string
              source:
                type: string
        phoneNumbers:
          type: array
          items:
            type: object
            properties:
              phoneNumber:
                type: string
              source:
                type: string
        domains:
          type: array
          items:
            type: object
            properties:
              domain:
                type: string
              source:
                type: string
        addresses:
          type: array
          items:
            type: object
            properties:
              street:
                type: string
              city:
                type: string
              postalCode:
                type: string
              country:
                type: string
              district:
                type: string
              countryCode:
                type: string
              streetSecondRow:
                type: string
              addressType:
                $ref: "#/components/schemas/AddressType"
        registers:
          type: array
          items:
            type: object
            properties:
              registerName:
                type: string
              registered:
                type: boolean
              startDate:
                $ref: "#/components/schemas/LocalDate"
              endDate:
                $ref: "#/components/schemas/LocalDate"
        finvoiceAddresses:
          type: array
          items:
            type: object
            properties:
              finvoiceAddressType:
                $ref: "#/components/schemas/FinvoiceAddressType"
              name:
                type: string
              address:
                type: string
              operatorCode:
                type: string
              operator:
                type: string
              ovt:
                type: string
        additionalCompanyIds:
          type: array
          items:
            type: object
            properties:
              idType:
                $ref: "#/components/schemas/CompanyIdType"
              idValue:
                type: string
        amlStatus:
          type: array
          items:
            type: object
            properties:
              sanction:
                type: boolean
              matchId:
                type: string
              matchName:
                type: string
              matchScore:
                type: number
                format: double
              plianceMonitoringEnabled:
                type: boolean
              createdAt:
                $ref: "#/components/schemas/Instant"
        beneficialOwners:
          type: array
          items:
            type: object
            properties:
              id:
                $ref: "#/components/schemas/UUID"
              lastName:
                type: string
              firstName:
                type: string
              ssn:
                type: string
              ownershipExtent:
                type: number
                format: double
              voteExtent:
                type: number
                format: double
              roleCode:
                type: string
              businessProhibition:
                type: boolean
              businessProhibitionStartDate:
                $ref: "#/components/schemas/LocalDate"
              businessProhibitionEndDate:
                $ref: "#/components/schemas/LocalDate"
              guardianship:
                type: string
              remarks:
                type: string
              homeCountry:
                type: string
              nationality:
                type: string
              dateOfBirth:
                $ref: "#/components/schemas/LocalDate"
              dateOfDeath:
                $ref: "#/components/schemas/LocalDate"
              createdAt:
                $ref: "#/components/schemas/Instant"
        responsiblePersons:
          type: array
          items:
            type: object
            properties:
              id:
                $ref: "#/components/schemas/UUID"
              role:
                type: string
              roleStartDate:
                $ref: "#/components/schemas/LocalDate"
              roleEndDate:
                $ref: "#/components/schemas/LocalDate"
              lastName:
                type: string
              firstName:
                type: string
              email:
                type: string
              phoneNumber:
                type: string
              gender:
                type: string
              homeCountry:
                type: string
              nationality:
                type: string
              ssn:
                type: string
              languageCode:
                type: string
              active:
                type: boolean
              dateOfBirth:
                $ref: "#/components/schemas/LocalDate"
              dateOfDeath:
                $ref: "#/components/schemas/LocalDate"
              createdAt:
                $ref: "#/components/schemas/Instant"
        rating:
          type: array
          items:
            type: object
            properties:
              active:
                type: boolean
              limit:
                type: integer
                format: int64
              limitCurrency:
                type: string
              rating:
                type: string
              ratingDescription:
                type: string
              ratingBase:
                type: string
              ratingEconomy:
                type: string
              ratingPaymentMethod:
                type: string
              ratingOperation:
                type: string
              ratingBackround:
                type: string
              ratingFinance:
                type: string
              ratingAbilityToPay:
                type: string
              nrOfCreditDefaults:
                type: integer
                format: int32
              paymentBehavior:
                type: integer
                format: int32
              limitDate:
                type: string
              ratingDate:
                type: string
              source:
                type: string
              createdAt:
                $ref: "#/components/schemas/Instant"
        keyFigures:
          type: array
          items:
            type: object
            properties:
              revenue:
                type: integer
                format: int32
              result:
                type: integer
                format: int32
              fiscalPeriodEndDate:
                $ref: "#/components/schemas/LocalDate"
              fiscalPeriodStartDate:
                $ref: "#/components/schemas/LocalDate"
              changeOfTurnover:
                type: number
                format: double
              changeOfEmployeeFigure:
                type: number
                format: double
              employeeCosts12Months:
                type: number
                format: double
              changeOfEmployeeCosts:
                type: number
                format: double
              changeOfBalanceTotal:
                type: number
                format: double
              operatingResultPct:
                type: number
                format: double
              netResultPct:
                type: number
                format: double
              financingResultPct:
                type: number
                format: double
              fiscalYearResultPct:
                type: number
                format: double
              returnOnAssetsPct:
                type: number
                format: double
              returnOnInvestmentsPct:
                type: number
                format: double
              returnOnEquityPct:
                type: number
                format: double
              equityRatioPct:
                type: number
                format: double
              debtToNetSalesRatioPct:
                type: number
                format: double
              netDebtRatioPct:
                type: number
                format: double
              gearing:
                type: number
                format: double
              quickRatio:
                type: number
                format: double
              currentRatio:
                type: number
                format: double
              collectionPeriodOfTradeReceivables:
                type: integer
                format: int32
              paymentPeriodOfTradePayables:
                type: integer
                format: int32
              isConsolidated:
                type: boolean
              createdAt:
                $ref: "#/components/schemas/Instant"
        remarks:
          type: array
          items:
            type: object
            properties:
              remarkId:
                type: integer
                format: int32
              remarkCode:
                type: string
              remarkDate:
                $ref: "#/components/schemas/Instant"
              amount:
                type: number
              creditorName:
                type: string
              remarkSource:
                type: string
              caseTypeCode:
                type: string
              caseId:
                type: string
              incidentGroup:
                type: string
              incidentId:
                type: string
              additionalInfo:
                type: string
              remarkPaidDate:
                $ref: "#/components/schemas/Instant"
              remarkExpiresDate:
                $ref: "#/components/schemas/Instant"
              remarkValidToDate:
                $ref: "#/components/schemas/Instant"
              remarkCreatedAt:
                $ref: "#/components/schemas/Instant"
              lastModified:
                $ref: "#/components/schemas/Instant"
              createdAt:
                $ref: "#/components/schemas/Instant"
        ratingPlus:
          type: array
          items:
            type: object
            properties:
              id:
                $ref: "#/components/schemas/UUID"
              organizationId:
                $ref: "#/components/schemas/UUID"
              isReliable:
                type: boolean
              isFinanciallyHealthy:
                type: boolean
              isCredible:
                type: boolean
              financialHealthInfo:
                type: string
              reliabilityInfo:
                type: string
              credibilityInfo:
                type: string
              status:
                $ref: "#/components/schemas/RatingStatus"
              createdAt:
                $ref: "#/components/schemas/Instant"
              updatedAt:
                $ref: "#/components/schemas/Instant"
        status:
          type: array
          items:
            type: object
            properties:
              category:
                type: string
              name:
                type: string
              description:
                type: string
              status:
                $ref: "#/components/schemas/CompanyStatusSeverity"
              active:
                type: boolean
              createdAt:
                $ref: "#/components/schemas/Instant"
              modifiedAt:
                $ref: "#/components/schemas/Instant"
        ratingLastUpdated:
          $ref: "#/components/schemas/Instant"
        keyFiguresLastUpdated:
          $ref: "#/components/schemas/Instant"
        responsiblePersonsLastUpdated:
          $ref: "#/components/schemas/Instant"
        basicInfoLastUpdated:
          $ref: "#/components/schemas/Instant"
        remarksLastUpdated:
          $ref: "#/components/schemas/Instant"
        ratingPlusLastUpdated:
          $ref: "#/components/schemas/Instant"
        deletedAt:
          $ref: "#/components/schemas/Instant"
    CompanyHistoryResponse:
      type: object
      properties:
        companyId:
          $ref: "#/components/schemas/UUID"
        data:
          type: array
          items:
            $ref: "#/components/schemas/ChangeRecord"
        action:
          type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
        createdById:
          $ref: "#/components/schemas/UUID"
        createdByName:
          type: string
    CompanyId:
      type: object
      properties:
        IdType:
          $ref: "#/components/schemas/CompanyIdType"
        IdValue:
          type: string
        idType:
          $ref: "#/components/schemas/CompanyIdType"
        idValue:
          type: string
    CompanyIdEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/CompanyEntity"
        idType:
          $ref: "#/components/schemas/CompanyIdType"
        idValue:
          type: string
    CompanyIdType:
      type: string
      enum:
      - ORG
      - BID
      - VAT
      - GHRB
      - GTX
      - NID
      - SID
      - CRFID
      - DUNS
    CompanyKeyFiguresEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/CompanyEntity"
        revenue:
          type: integer
          format: int32
        result:
          type: integer
          format: int32
        fiscalPeriodEndDate:
          $ref: "#/components/schemas/LocalDate"
        fiscalPeriodStartDate:
          $ref: "#/components/schemas/LocalDate"
        changeOfTurnover:
          type: number
          format: double
        changeOfEmployeeFigure:
          type: number
          format: double
        employeeCosts12Months:
          type: number
          format: double
        changeOfEmployeeCosts:
          type: number
          format: double
        changeOfBalanceTotal:
          type: number
          format: double
        operatingResultPct:
          type: number
          format: double
        netResultPct:
          type: number
          format: double
        financingResultPct:
          type: number
          format: double
        fiscalYearResultPct:
          type: number
          format: double
        returnOnAssetsPct:
          type: number
          format: double
        returnOnInvestmentsPct:
          type: number
          format: double
        returnOnEquityPct:
          type: number
          format: double
        equityRatioPct:
          type: number
          format: double
        debtToNetSalesRatioPct:
          type: number
          format: double
        netDebtRatioPct:
          type: number
          format: double
        gearing:
          type: number
          format: double
        quickRatio:
          type: number
          format: double
        currentRatio:
          type: number
          format: double
        collectionPeriodOfTradeReceivables:
          type: integer
          format: int32
        paymentPeriodOfTradePayables:
          type: integer
          format: int32
        isConsolidated:
          type: boolean
        createdAt:
          $ref: "#/components/schemas/Instant"
        modifiedAt:
          $ref: "#/components/schemas/Instant"
    CompanyPhoneNumberEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/CompanyEntity"
        phoneNumber:
          type: string
        source:
          type: string
    CompanyRatingEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/CompanyEntity"
        active:
          type: boolean
        limit:
          type: integer
          format: int64
        limitCurrency:
          type: string
        rating:
          type: string
        ratingDescription:
          type: string
        ratingBase:
          type: string
        ratingEconomy:
          type: string
        ratingPaymentMethod:
          type: string
        ratingOperation:
          type: string
        ratingBackround:
          type: string
        ratingFinance:
          type: string
        ratingAbilityToPay:
          type: string
        nrOfCreditDefaults:
          type: integer
          format: int32
        paymentBehavior:
          type: integer
          format: int32
        limitDate:
          type: string
        ratingDate:
          type: string
        source:
          type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
        modifiedAt:
          $ref: "#/components/schemas/Instant"
    CompanyRatingPlusEntity:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        organizationId:
          $ref: "#/components/schemas/UUID"
        company:
          $ref: "#/components/schemas/CompanyEntity"
        isReliable:
          type: boolean
        isFinanciallyHealthy:
          type: boolean
        isCredible:
          type: boolean
        financialHealthInfo:
          type: string
        reliabilityInfo:
          type: string
        credibilityInfo:
          type: string
        status:
          $ref: "#/components/schemas/RatingStatus"
        createdAt:
          $ref: "#/components/schemas/Instant"
        updatedAt:
          $ref: "#/components/schemas/Instant"
    CompanyRegistry:
      type: object
      properties:
        id:
          type: integer
          format: int64
        registerName:
          type: string
        registered:
          type: boolean
        startDate:
          type: string
        endDate:
          type: string
    CompanyRegistryEntity:
      type: object
      properties:
        registerName:
          type: string
        registered:
          type: boolean
        startDate:
          $ref: "#/components/schemas/LocalDate"
        endDate:
          $ref: "#/components/schemas/LocalDate"
    CompanyRemarkEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/CompanyEntity"
        remarkId:
          type: integer
          format: int32
        remarkCode:
          type: string
        remarkDate:
          $ref: "#/components/schemas/Instant"
        amount:
          type: number
        creditorName:
          type: string
        remarkSource:
          type: string
        caseTypeCode:
          type: string
        caseId:
          type: string
        incidentGroup:
          type: string
        incidentId:
          type: string
        additionalInfo:
          type: string
        remarkPaidDate:
          $ref: "#/components/schemas/Instant"
        remarkExpiresDate:
          $ref: "#/components/schemas/Instant"
        remarkValidToDate:
          $ref: "#/components/schemas/Instant"
        remarkCreatedAt:
          $ref: "#/components/schemas/Instant"
        lastModified:
          $ref: "#/components/schemas/Instant"
        createdAt:
          $ref: "#/components/schemas/Instant"
    CompanyResponse:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        organizationId:
          $ref: "#/components/schemas/UUID"
        status:
          type: string
        operationalStatus:
          type: boolean
        primaryBusinessId:
          type: string
        name:
          type: string
        countryCode:
          type: string
        languageCode:
          type: string
        formCode:
          type: string
        formAsOf:
          type: string
        formValue:
          type: string
        companySector:
          type: string
        businessLineCode:
          type: string
        businessLineValue:
          type: string
        contactPhoneNumber:
          type: string
        contactEMail:
          type: string
        establishmentDate:
          type: string
        emailInvoicingAddress:
          type: string
        employees:
          type: string
        revenueClass:
          type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
        modifiedAt:
          $ref: "#/components/schemas/Instant"
        deletedAt:
          $ref: "#/components/schemas/Instant"
    CompanyResponsiblePersonEntity:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        company:
          $ref: "#/components/schemas/CompanyEntity"
        role:
          type: string
        roleStartDate:
          $ref: "#/components/schemas/LocalDate"
        roleEndDate:
          $ref: "#/components/schemas/LocalDate"
        lastName:
          type: string
        firstName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        gender:
          type: string
        homeCountry:
          type: string
        nationality:
          type: string
        ssn:
          type: string
        languageCode:
          type: string
        active:
          type: boolean
        dateOfBirth:
          $ref: "#/components/schemas/LocalDate"
        dateOfDeath:
          $ref: "#/components/schemas/LocalDate"
        createdAt:
          $ref: "#/components/schemas/Instant"
    CompanySearchResult:
      type: object
      properties:
        businessId:
          type: string
        name:
          type: string
    CompanyStatus:
      type: object
      properties:
        category:
          type: string
        name:
          type: string
        description:
          type: string
        status:
          $ref: "#/components/schemas/CompanyStatusSeverity"
    CompanyStatusEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/CompanyEntity"
        category:
          type: string
        name:
          type: string
        description:
          type: string
        status:
          $ref: "#/components/schemas/CompanyStatusSeverity"
        active:
          type: boolean
        createdAt:
          $ref: "#/components/schemas/Instant"
        modifiedAt:
          $ref: "#/components/schemas/Instant"
    CompanyStatusSeverity:
      type: string
      enum:
      - WARN
      - CRITICAL
      - INFO
    CompanyWebsiteEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/CompanyEntity"
        website:
          type: string
        source:
          type: string
    CreateWorkflowRequest:
      type: object
      required:
      - name
      - tasks
      description: Request for creating a new workflow
      properties:
        name:
          type: string
          examples:
          - Customer Onboarding
          - KYC Verification
          - Contract Review
          pattern: \S
          description: Name of the workflow
        tasks:
          type: array
          minItems: 1
          examples:
          - - taskType: AML_CHECK
              continueOnFalse: true
              priority: 1
          items:
            $ref: "#/components/schemas/WorkflowTaskRequest"
          description: List of tasks that make up this workflow
    DomainRelationAnalysisRequest:
      type: object
      properties:
        domainMatchCompany:
          type: boolean
        companyMatchWhois:
          type: boolean
        companyNameMatchWebsite:
          type: boolean
        score:
          type: number
          format: double
    DomainRequest:
      type: object
      required:
      - businessId
      - countryCode
      - domain
      description: Request to verify a domain's relationship with a business
      properties:
        businessId:
          type: string
          examples:
          - 2538754-7
          pattern: \S
          description: Unique identifier for the company
        countryCode:
          type: string
          examples:
          - FI
          pattern: \S
          description: Country code where the company is registered
        domain:
          type: string
          examples:
          - example.com
          pattern: \S
          description: Domain name
    DomainResponse:
      type: object
      description: Response for domain relation verification
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        companyId:
          $ref: "#/components/schemas/UUID"
        domain:
          type: string
        businessId:
          type: string
        request:
          $ref: "#/components/schemas/DomainRelationAnalysisRequest"
        result:
          $ref: "#/components/schemas/RelationResult"
        createdAt:
          $ref: "#/components/schemas/Instant"
    EmailRelationAnalysisRequest:
      type: object
      properties:
        emailMatchCompany:
          type: boolean
        domainMatchCompany:
          type: boolean
        companyMatchWhois:
          type: boolean
        free:
          type: boolean
        score:
          type: number
          format: double
    EmailRequest:
      type: object
      required:
      - businessId
      - countryCode
      - email
      description: Request to create a new email record
      properties:
        businessId:
          type: string
          examples:
          - 2538754-7
          pattern: \S
          description: Unique identifier for the company
        countryCode:
          type: string
          examples:
          - FI
          pattern: \S
          description: Country code where the company is registered
        email:
          type: string
          examples:
          - john@example.com
          pattern: \S
          description: Email address
    EmailResponse:
      type: object
      description: Response for email relation verification
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        companyId:
          $ref: "#/components/schemas/UUID"
        email:
          type: string
        businessId:
          type: string
        request:
          $ref: "#/components/schemas/EmailRelationAnalysisRequest"
        result:
          $ref: "#/components/schemas/RelationResult"
        createdAt:
          $ref: "#/components/schemas/Instant"
    EventGuest:
      type: object
      properties:
        email:
          type: string
          examples:
          - user@example.com
        created_at:
          type: string
          examples:
          - 2019-08-24T14:15:22.123456Z
        updated_at:
          type: string
          examples:
          - 2019-08-24T14:15:22.123456Z
    EventMembership:
      type: object
      properties:
        user:
          type: string
          examples:
          - https://api.calendly.com/users/GBGBDCAADAEDCRZ2
        user_email:
          type: string
          examples:
          - user@example.com
        user_name:
          type: string
          examples:
          - John Smith
    FinvoiceAddress:
      type: object
      properties:
        name:
          type: string
        address:
          type: string
        operatorCode:
          type: string
        operator:
          type: string
        ovt:
          type: string
        type:
          $ref: "#/components/schemas/FinvoiceAddressType"
    FinvoiceAddressType:
      type: string
      enum:
      - SENDING
      - RECEIVING
    FormSubmission:
      type: object
      required:
      - country
      properties:
        formId:
          type:
          - string
          - "null"
          examples:
          - 2441c4ba-f7da-4cb3-acdb-238d70124623
          - 550e8400-e29b-41d4-a716-446655440000
          description: Form identifier for customizing the workflowId behavior
          anyOf:
          - $ref: "#/components/schemas/UUID"
          - type: "null"
        businessId:
          type: string
          minLength: 8
          examples:
          - 2538754-7
          - 0112038-9
          - 0207619-4
          maxLength: 11
          description: Unique identifier for the company (Finnish business ID format)
        businessName:
          type: string
          examples:
          - Acme Corporation
          - Tech Solutions Ltd
          - Global Industries Oy
          description: Business name is used as a fallback to find company if businessId
            is not provided
        country:
          type: string
          examples:
          - FI
          - SE
          - "NO"
          - DK
          pattern: \S
          description: Country code where the company is registered (ISO 3166-1 alpha-2)
        firstName:
          type: string
          examples:
          - John
          - Maria
          - Erik
          description: First name of the person initiating the workflowId
        lastName:
          type: string
          examples:
          - Doe
          - Nielsen
          - Andersson
          description: Last name of the person initiating the workflowId
        email:
          type: string
          examples:
          - john.doe@example.com
          - maria.nielsen@company.com
          - erik.andersson@business.fi
          description: Email address of the person initiating the workflowId
        phoneNumber:
          type: string
          examples:
          - "+358401234567"
          - "+46701234567"
          - "+4741234567"
          pattern: "^\\+[0-9]{10,14}$"
          description: Phone number of the person in international format
        additionalFields:
          $ref: "#/components/schemas/JsonNode"
          type: object
          examples:
          - |
            [{
                "fieldName": "Customer Name",
                "fieldId": "customerName",
                "fieldResponseType": "text",
                "value": "John Doe"
            }
          - fieldName: Order Amount
            fieldId: orderAmount
            fieldResponseType: numeric
            value: 1500
          - fieldName: Preferred Contact Methods
            fieldId: contactMethods
            fieldResponseType: list
            value:
            - email
            - sms
          - fieldName: Has Agreed to Terms
            fieldId: agreedTerms
            fieldResponseType: boolean
            value: true
          - |
            {
                "fieldName": "Subscription Date",
                "fieldId": "subscriptionDate",
                "fieldResponseType": "date",
                "value": "2023-10-01"
            }]
          description: "Additional JSON data for for custom fields. Value can be of\
            \ any type, but it should match the type specified in the fieldResponseType.\
            \ Possible fieldResponseTypes are text, numeric, list, boolean, and date."
        requestInfo:
          $ref: "#/components/schemas/RequestInfo1"
    FormSubmissionResponse:
      type: object
      properties:
        submissionId:
          $ref: "#/components/schemas/UUID"
        formId:
          $ref: "#/components/schemas/UUID"
        submittedAt:
          $ref: "#/components/schemas/Instant"
    GlobalCompany:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        primaryBusinessId:
          type: string
        name:
          type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
        modifiedAt:
          $ref: "#/components/schemas/Instant"
        globalEmailDomains:
          type: array
          items:
            $ref: "#/components/schemas/GlobalCompanyDomainsEntity"
        recruitmentData:
          type: array
          items:
            $ref: "#/components/schemas/RecruitmentDataEntity"
        websiteContent:
          type: array
          items:
            $ref: "#/components/schemas/WebsiteContentEntity"
        publicCompanyFinancials:
          type: array
          items:
            $ref: "#/components/schemas/PublicCompanyFinancialsEntity"
        websiteTechnologies:
          type: array
          items:
            $ref: "#/components/schemas/WebsiteTechnologiesEntity"
        globalCompanyLinks:
          type: array
          items:
            $ref: "#/components/schemas/GlobalCompanyLinkEntity"
    GlobalCompanyDomainsEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/GlobalCompany"
        domain:
          type: string
        domainName:
          type: string
        snippet:
          type: string
        source:
          type: string
        domainType:
          type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
        modifiedAt:
          $ref: "#/components/schemas/Instant"
        active:
          type: boolean
    GlobalCompanyLinkEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/GlobalCompany"
        platform:
          type: string
        category:
          type: string
        link:
          type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
    Instant:
      type: string
      format: date-time
      examples:
      - 2022-03-10T16:15:50Z
    Invitee:
      type: object
      description: Represents an invitee with associated metadata
      properties:
        name:
          type: string
          examples:
          - John Doe
          description: Name of the invitee
        email:
          type: string
          examples:
          - test@example.com
          description: Email of the invitee
        created_at:
          type: string
          examples:
          - 2020-11-23T17:51:18.327602Z
          description: DateTime when the invitee was created
        updated_at:
          type: string
          examples:
          - 2020-11-23T17:51:18.341657Z
          description: DateTime when the invitee information last updated
        status:
          type: string
          examples:
          - active
          description: Status of the invitee
    InviteesCounter:
      type: object
      description: "Counter details of total, active, and limited invitees"
      properties:
        total:
          type: integer
          format: int32
          examples:
          - 0
        active:
          type: integer
          format: int32
          examples:
          - 0
        limit:
          type: integer
          format: int32
          examples:
          - 0
    JsonNode:
      type: object
      properties:
        empty:
          type: boolean
        valueNode:
          type: boolean
        containerNode:
          type: boolean
        missingNode:
          type: boolean
        array:
          type: boolean
        object:
          type: boolean
        nodeType:
          $ref: "#/components/schemas/JsonNodeType"
        pojo:
          type: boolean
        number:
          type: boolean
        integralNumber:
          type: boolean
        floatingPointNumber:
          type: boolean
        short:
          type: boolean
        int:
          type: boolean
        long:
          type: boolean
        float:
          type: boolean
        double:
          type: boolean
        bigDecimal:
          type: boolean
        bigInteger:
          type: boolean
        textual:
          type: boolean
        boolean:
          type: boolean
        "null":
          type: boolean
        binary:
          type: boolean
    JsonNodeType:
      type: string
      enum:
      - ARRAY
      - BINARY
      - BOOLEAN
      - MISSING
      - "NULL"
      - NUMBER
      - OBJECT
      - POJO
      - STRING
    LocalDate:
      type: string
      format: date
      examples:
      - 2022-03-10
    Location:
      type: object
      description: "Specifies the location of an event, including type and details"
      properties:
        type:
          type: string
          examples:
          - physical
          description: "Type of location, such as 'physical' or 'virtual'"
        location:
          type: string
          examples:
          - "1234 Meeting St, City, Country"
          description: Detailed information about the location
        additional_info:
          type: string
          examples:
          - Meeting room 5B on the second floor
          description: Additional information about the location
    PersonEntity:
      type: object
      properties:
        uuid:
          $ref: "#/components/schemas/UUID"
        companyId:
          $ref: "#/components/schemas/UUID"
        organizationId:
          $ref: "#/components/schemas/UUID"
        lastName:
          type: string
        firstName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        gender:
          type: string
        homeCountry:
          type: string
        nationality:
          type: string
        ssn:
          type: string
        languageCode:
          type: string
        dateOfBirth:
          $ref: "#/components/schemas/LocalDate"
        dateOfDeath:
          $ref: "#/components/schemas/LocalDate"
        companyRepresentationApproved:
          type: boolean
        identityVerified:
          type: boolean
        active:
          type: boolean
        status:
          type: string
        jobTitle:
          type: string
        beneficialOwnerMatchId:
          type: string
        linkedin:
          type: string
        responsiblePersonMatchid:
          $ref: "#/components/schemas/CompanyResponsiblePersonEntity"
        createdAt:
          $ref: "#/components/schemas/Instant"
        modifiedAt:
          $ref: "#/components/schemas/Instant"
        deletedAt:
          $ref: "#/components/schemas/Instant"
        createdBy:
          $ref: "#/components/schemas/UUID"
        modifiedBy:
          $ref: "#/components/schemas/UUID"
        personStatus:
          type: array
          items:
            $ref: "#/components/schemas/CompanyStatus"
    PersonRelationAnalysisRequest:
      type: object
      properties:
        customerVerified:
          type: boolean
        representationRights:
          type: boolean
        laskuyritykselleUser:
          type: boolean
        companyPhoneNumber:
          type: boolean
        companyEmail:
          type: boolean
    PersonRequest:
      type: object
      required:
      - businessId
      - countryCode
      - firstName
      - lastName
      description: Request to create a new person record
      properties:
        businessId:
          type: string
          examples:
          - 2538754-7
          pattern: \S
          description: Unique identifier for the company
        countryCode:
          type: string
          examples:
          - FI
          pattern: \S
          description: Country code where the company is registered
        firstName:
          type: string
          examples:
          - John
          pattern: \S
          description: First name
        lastName:
          type: string
          examples:
          - Doe
          pattern: \S
          description: Last name
        email:
          type: string
          examples:
          - john@example.com
          description: Email address
        dateOfBirth:
          type: string
          examples:
          - 1990-01-15
          description: Date of birth as yyyy-MM-dd
        phoneNumber:
          type: string
          examples:
          - "+35840123456"
          description: Phone number with country code
        homeCountry:
          type: string
          examples:
          - fi
          description: Home country
        country:
          type: string
          examples:
          - fi
          description: Nationality - defaults to home country unless specified
        ssn:
          type: string
          examples:
          - 123-45-6789
          description: Social security number
        jobTitle:
          type: string
          examples:
          - Software Engineer
          description: Job title
        gender:
          type: string
          examples:
          - Male
          description: Gender
    PersonResponse:
      type: object
      description: Response for person relation verification
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        companyId:
          $ref: "#/components/schemas/UUID"
        personId:
          $ref: "#/components/schemas/UUID"
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        request:
          $ref: "#/components/schemas/PersonRelationAnalysisRequest"
        result:
          $ref: "#/components/schemas/RelationResult"
        createdAt:
          $ref: "#/components/schemas/Instant"
    PhoneRelationAnalysisRequest:
      type: object
      properties:
        companyMatchLookup:
          type: boolean
        numberMatchCompany:
          type: boolean
        areaCodeMatchesCompanyCountry:
          type: boolean
        score:
          type: number
          format: double
    PhoneRequest:
      type: object
      required:
      - businessId
      - countryCode
      - phoneNumber
      description: Request to create a new phone record
      properties:
        businessId:
          type: string
          examples:
          - 2538754-7
          pattern: \S
          description: Unique identifier for the company
        countryCode:
          type: string
          examples:
          - FI
          pattern: \S
          description: Country code where the company is registered
        phoneNumber:
          type: string
          examples:
          - "+35840123456"
          pattern: \S
          description: Phone number with country code
    PhoneResponse:
      type: object
      description: Response for phone relation verification
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        companyId:
          $ref: "#/components/schemas/UUID"
        phoneNumber:
          type: string
        businessId:
          type: string
        request:
          $ref: "#/components/schemas/PhoneRelationAnalysisRequest"
        result:
          $ref: "#/components/schemas/RelationResult"
        createdAt:
          $ref: "#/components/schemas/Instant"
    PipedriveCredentialsRequest:
      type: object
      required:
      - apiKey
      properties:
        apiKey:
          type: string
    PipedriveCredentialsResponse:
      type: object
      properties:
        apiKey:
          type: string
    PublicCompanyFinancialsEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/GlobalCompany"
        financialYear:
          type: integer
          format: int32
        financialYearRevenue:
          type: integer
          format: int64
        financialYearResult:
          type: integer
          format: int64
        financialYearNumberOfEmployees:
          type: integer
          format: int32
        financialsSnippet:
          type: string
        source:
          type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
    QuestionAndAnswer:
      type: object
      description: Represents a question and its corresponding answer
      properties:
        question:
          type: string
          examples:
          - What are your goals?
          description: The question asked
        answer:
          type: string
          examples:
          - To improve user experience.
          description: The answer provided to the question
    RatingStatus:
      type: string
      enum:
      - GREEN
      - YELLOW
      - RED
      - BLACK
      - NEW
    RecruitmentDataEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/GlobalCompany"
        companyName:
          type: string
        title:
          type: string
        applicationPeriodEndDate:
          $ref: "#/components/schemas/Instant"
        publishDate:
          $ref: "#/components/schemas/Instant"
        applicationUrl:
          type: string
        originUrl:
          type: string
        recruitmentId:
          type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
    RelationResult:
      type: object
      properties:
        relation:
          type: boolean
        reasonCode:
          type: string
        reason:
          type: string
    RequestInfo:
      type: object
      description: Information about the request including client metadata and request
        origin details.
      properties:
        fingerprint:
          type: string
          examples:
          - rq12345abcd
          description: "Unique identifier for the request, typically used to trace\
            \ requests"
        acceptLanguage:
          type: string
          examples:
          - en-US
          description: The accepted language of the client making the request
        ipAddress:
          type: string
          examples:
          - 192.168.1.1
          description: IP address of the client making the request
        ipCountry:
          type: string
          examples:
          - US
          description: Country associated with the client's IP address
        userAgent:
          type: string
          examples:
          - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,\
            \ like Gecko) Chrome/58.0.3029.110 Safari/537.36"
          description: User agent string of the client making the request
        originHeader:
          type: string
          examples:
          - https://example.com
          description: The Origin HTTP header indicating the origin of the request
    RequestInfo1:
      type: object
      description: Information about the request including client metadata and request
        origin details
      properties:
        fingerprint:
          type: string
          examples:
          - rq12345abcd
          - req-xyz789
          - trace-abc123
          description: "Unique identifier for the request, typically used to trace\
            \ requests"
        acceptLanguage:
          type: string
          examples:
          - en-US
          - sv-SE
          - fi-FI
          - da-DK
          description: The accepted language of the client making the request (RFC
            5646)
        ipAddress:
          type: string
          examples:
          - 192.168.1.1
          - 10.0.0.1
          - 172.16.0.1
          description: IP address of the client making the request
        ipCountry:
          type: string
          examples:
          - US
          - SE
          - FI
          - DK
          description: Country associated with the client's IP address (ISO 3166-1
            alpha-2)
        userAgent:
          type: string
          examples:
          - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,\
            \ like Gecko) Chrome/58.0.3029.110 Safari/537.36"
          - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15\
            \ (KHTML, like Gecko) Version/14.0 Safari/605.1.15"
          - "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15\
            \ (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1"
          description: User agent string of the client making the request
        originHeader:
          type: string
          examples:
          - https://example.com
          - https://app.entercheck.com
          - https://client.entercheck.com
          description: The Origin HTTP header indicating the origin of the request
    RequestInfo2:
      type: object
      description: Information about the request including client metadata and request
        origin details
      properties:
        fingerprint:
          type: string
          examples:
          - rq12345abcd
          - req-xyz789
          - trace-abc123
          description: "Unique identifier for the request, typically used to trace\
            \ requests"
        acceptLanguage:
          type: string
          examples:
          - en-US
          - sv-SE
          - fi-FI
          - da-DK
          description: The accepted language of the client making the request (RFC
            5646)
        ipAddress:
          type: string
          examples:
          - 192.168.1.1
          - 10.0.0.1
          - 172.16.0.1
          description: IP address of the client making the request
        ipCountry:
          type: string
          examples:
          - US
          - SE
          - FI
          - DK
          description: Country associated with the client's IP address (ISO 3166-1
            alpha-2)
        userAgent:
          type: string
          examples:
          - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,\
            \ like Gecko) Chrome/58.0.3029.110 Safari/537.36"
          - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15\
            \ (KHTML, like Gecko) Version/14.0 Safari/605.1.15"
          - "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15\
            \ (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1"
          description: User agent string of the client making the request
        originHeader:
          type: string
          examples:
          - https://example.com
          - https://app.entercheck.com
          - https://client.entercheck.com
          description: The Origin HTTP header indicating the origin of the request
    RetryWorkflowRequest:
      type: object
      properties:
        formResponseId:
          type: string
    ScheduledEvent:
      type: object
      description: Detailed information about the specific event
      properties:
        uri:
          type: string
          examples:
          - https://api.calendly.com/scheduled_events/GBGBDCAADAEDCRZ2
          description: URI of the scheduled event
        name:
          type: string
          examples:
          - 15 Minute Meeting
          description: Name of the event
        meeting_notes_plain:
          type: string
          examples:
          - Internal meeting notes
          description: Plain text notes associated with the event
        meeting_notes_html:
          type: string
          examples:
          - <p>Internal meeting notes</p>
          description: HTML formatted meeting notes
        status:
          type: string
          examples:
          - active
          description: Current status of the event
        start_time:
          type: string
          examples:
          - 2019-08-24T14:15:22.123456Z
          description: Start time of the event
        end_time:
          type: string
          examples:
          - 2019-08-24T14:15:22.123456Z
          description: End time of the event
        event_type:
          type: string
          examples:
          - https://api.calendly.com/event_types/GBGBDCAADAEDCRZ2
          description: Type of the event indicating its category
        location:
          $ref: "#/components/schemas/Location"
          type: object
          description: Location details of the event
        inviteesCounter:
          $ref: "#/components/schemas/InviteesCounter"
          type: object
          description: Counter of invitees attending the event
        created_at:
          type: string
          examples:
          - 2019-01-02T03:04:05.678123Z
          description: Datetime when the event was created
        updated_at:
          type: string
          examples:
          - 2019-01-02T03:04:05.678123Z
          description: Datetime when the event details were last updated
        event_memberships:
          type: array
          items:
            $ref: "#/components/schemas/EventMembership"
          description: List of event memberships
        event_guests:
          type: array
          items:
            $ref: "#/components/schemas/EventGuest"
          description: List of event guests
    SuccessResponse:
      type: object
      description: Simple success response
      properties:
        success:
          type: boolean
    Tracking:
      type: object
      description: Tracking information for marketing analytics purposes
      properties:
        utm_campaign:
          type: string
          examples:
          - Summer_Sale
          description: Campaign name for tracking the source
        utm_source:
          type: string
          examples:
          - Newsletter
          description: The source of the traffic or lead
        utm_medium:
          type: string
          examples:
          - Email
          description: The medium used to reach the audience
        utm_content:
          type: string
          examples:
          - Variant_A
          description: Content variant for A/B testing
        utm_term:
          type: string
          examples:
          - Calendly+meeting+software
          description: Paid search companyKeywords
        salesforce_uuid:
          type: string
          examples:
          - a4fhA000000XzQ6QAK
          description: Salesforce unique identifier
    TradeRegisterExtractResponse:
      type: object
      properties:
        id:
          type: integer
          format: int32
        organizationId:
          $ref: "#/components/schemas/UUID"
        companyId:
          $ref: "#/components/schemas/UUID"
        createdAt:
          $ref: "#/components/schemas/Instant"
    TriggerWorkflowRequest:
      type: object
      required:
      - country
      description: Request for triggering a workflowId execution
      properties:
        businessId:
          type: string
          minLength: 8
          examples:
          - 2538754-7
          - 0112038-9
          - 0207619-4
          maxLength: 11
          description: Unique identifier for the company (Finnish business ID format)
        businessName:
          type: string
          examples:
          - Acme Corporation
          - Tech Solutions Ltd
          - Global Industries Oy
          description: Business name is used as a fallback to find company if businessId
            is not provided
        country:
          type: string
          examples:
          - FI
          - SE
          - "NO"
          - DK
          pattern: \S
          description: Country code where the company is registered (ISO 3166-1 alpha-2)
        workflowId:
          type:
          - string
          - "null"
          examples:
          - 2441c4ba-f7da-4cb3-acdb-238d70124623
          - 550e8400-e29b-41d4-a716-446655440000
          description: Smart form identifier for customizing the workflowId behavior
        firstName:
          type: string
          examples:
          - John
          - Maria
          - Erik
          description: First name of the person initiating the workflowId
        lastName:
          type: string
          examples:
          - Doe
          - Nielsen
          - Andersson
          description: Last name of the person initiating the workflowId
        email:
          type: string
          examples:
          - john.doe@example.com
          - maria.nielsen@company.com
          - erik.andersson@business.fi
          description: Email address of the person initiating the workflowId
        phoneNumber:
          type: string
          examples:
          - "+358401234567"
          - "+46701234567"
          - "+4741234567"
          pattern: "^\\+[0-9]{10,14}$"
          description: Phone number of the person in international format
        jobTitle:
          type: string
          examples:
          - CEO
          - CFO
          - Operations Manager
          - Account Executive
          description: Job title or role of the person
        dateOfBirth:
          $ref: "#/components/schemas/LocalDate"
          type: string
          examples:
          - 1980-01-01
          - 1990-05-15
          - 1975-12-24
          description: Date of birth of the person
        preferredContactMethod:
          type: string
          examples:
          - email
          - sms
          - both
          description: Preferred method of contact for notifications
        allowMarketing:
          type: boolean
          examples:
          - true
          - false
          description: Whether the person agrees to receive marketing communications
        subscribeToNewsLetter:
          type: boolean
          examples:
          - true
          - false
          description: Whether the person wants to subscribe to the newsletter
        acceptedTos:
          type: boolean
          examples:
          - true
          - false
          description: Whether the person has accepted the terms of service
        acceptedPrivacyPolicy:
          type: boolean
          examples:
          - true
          - false
          description: Whether the person has accepted the privacy policy
        orderTotal:
          type: integer
          format: int32
          examples:
          - 10000
          - 5000
          - 25000
          description: Total amount of the order in cents
        orderCurrency:
          type: string
          examples:
          - EUR
          - SEK
          - NOK
          - DKK
          description: Currency code for the order (ISO 4217)
        targetCompletionDate:
          $ref: "#/components/schemas/LocalDate"
          type: string
          examples:
          - 2024-06-30
          - 2024-12-31
          - 2025-03-15
          description: Target date for completing the workflowId
        referralSource:
          type: string
          examples:
          - Google
          - LinkedIn
          - Direct
          - Partner
          description: Source of the referral or lead
        freeText1:
          type: string
          examples:
          - VIP customer
          - Urgent processing required
          - Special handling needed
          description: Additional information or notes about the request
        freeText2:
          type: string
          examples:
          - "Preferred language: Swedish"
          - "Special requirements: Fast track"
          - "Reference: PRJ-123"
          description: Additional information or notes about the request
        additionalData:
          $ref: "#/components/schemas/JsonNode"
          type: array
          examples:
          - priority: high
            department: sales
            tags:
            - vip
            - urgent
          description: Additional JSON data for custom workflowId configurations
        requestInfo:
          $ref: "#/components/schemas/RequestInfo2"
    UUID:
      type: string
      format: uuid
      pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
    UpdateWorkflowRequest:
      type: object
      required:
      - name
      description: Request object for updating an existing workflow
      properties:
        name:
          type: string
          examples:
          - Customer Onboarding
          - KYC Verification
          - Contract Review
          pattern: \S
          description: Name of the workflow
        active:
          type: boolean
          examples:
          - true
          - false
          description: Whether the workflow is active
    WebsiteContentEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/GlobalCompany"
        name:
          type: string
        websiteUrl:
          type: string
        description:
          type: string
        descriptionFi:
          type: string
        email:
          type: string
        phone:
          type: string
        registered:
          type: boolean
        parked:
          type: boolean
        eCommerce:
          type: boolean
        createdAt:
          $ref: "#/components/schemas/Instant"
    WebsiteTechnologiesEntity:
      type: object
      properties:
        company:
          $ref: "#/components/schemas/GlobalCompany"
        websiteUrl:
          type: string
        appName:
          type: string
        appWebsite:
          type: string
        category:
          type: array
          items:
            type: string
        categoryNames:
          type: array
          items:
            type: string
        createdAt:
          $ref: "#/components/schemas/Instant"
    WorkflowTaskRequest:
      type: object
      required:
      - continueOnFalse
      description: Task configuration for a workflowId
      properties:
        taskType:
          $ref: "#/components/schemas/AllowedSteps"
          type: string
          examples:
          - AML_CHECK
          - KYC_VERIFICATION
          - CONTRACT_REVIEW
          description: Type of task to execute
        continueOnFalse:
          type: boolean
          examples:
          - true
          - false
          description: Whether the workflowId should continue if this task fails
        priority:
          type: integer
          exclusiveMinimum: 0
          format: int32
          examples:
          - 1
          - 2
          - 3
          description: Priority of the task (higher number = higher priority)
  securitySchemes:
    SecurityScheme:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Authentication
tags:
- name: AML
  description: Anti Money Laundering services
- name: Auth
- name: Companies
  description: Company services
- name: Forms
  description: Submit form
- name: Organization management
  description: APIs for managing organizations
- name: Relations Service
  description: Analyze and verify relationships between entities and businesses.
- name: Search
  description: Search for companies
- name: Workflow Triggers
  description: Start new workflowId processing
- name: Workflows Management
  description: Manage workflows and workflowId tasks
paths:
  /aml/company:
    get:
      summary: Evaluate company AML status for new company
      tags:
      - AML
      parameters:
      - name: businessId
        in: query
        schema:
          type: string
          pattern: \S
        required: true
      - name: country
        in: query
        schema:
          type: string
          default: FI
      - name: refresh
        in: query
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /aml/company/comprehensive:
    get:
      summary: Retrieve comprehensive AML status for company.
      description: "The operation will retrieve information about company beneficial\
        \ owners, PEPs, sanctions, etc. It will also perform AML check for each beneficial\
        \ owner."
      tags:
      - AML
      parameters:
      - name: businessId
        in: query
        schema:
          type: string
          pattern: \S
        required: true
      - name: country
        in: query
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /aml/company/{id}/status:
    get:
      summary: Retrieve or refresh company AML status for existing company
      tags:
      - AML
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          pattern: \S
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /aml/person:
    post:
      summary: Retrieve person AML status
      tags:
      - AML
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AmlPersonRequest"
        required: true
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      security:
      - SecurityScheme:
        - admin
        - api
  /aml/person/monitoring/archive/{uuid}:
    put:
      summary: Disable AML monitoring for person
      tags:
      - AML
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /aml/person/monitoring/{uuid}:
    put:
      summary: Enable AML monitoring for person
      tags:
      - AML
      parameters:
      - name: uuid
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /auth:
    post:
      summary: Authenticate user
      description: Authenticate user with username and password and retrieve a valid
        Supabase access token. The token is valid for 1 hour.
      tags:
      - Auth
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AuthRequest"
        required: true
      responses:
        "200":
          description: OK
        "400":
          description: Bad Request
  /auth/anonymous:
    post:
      summary: Get Anonymous Token
      description: Anonymous tokens can be passed to client safely. Anonymous tokens
        can be used to make the type-ahead search faster by allowing client to communicate
        directly with Entercheck.
      tags:
      - Auth
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies:
    post:
      summary: Register a new company
      description: This method registers a new company to the system. The company
        is registered to the organization of the user making the request. You can
        optionally retrieve additional information about the company.
      tags:
      - Companies
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddCompanyRequest"
        required: true
      responses:
        "200":
          description: Successfully registered company
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyFullResponse"
        "404":
          description: Company registration failed
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      security:
      - SecurityScheme:
        - admin
        - api
    get:
      summary: List companies
      description: "This method retrieves a list of companies registered to the organization\
        \ of the user making the request. You can optionally filter the list by name\
        \ and sort the list by name, created date, or modified date."
      tags:
      - Companies
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          exclusiveMinimum: 0
          format: int32
          default: 10
      - name: offset
        in: query
        schema:
          type: integer
          format: int32
          default: 0
          minimum: 0
      - name: order_by
        in: query
        schema:
          type: string
          default: created_at
      - name: order_dir
        in: query
        schema:
          type: string
          pattern: ^(asc|desc)$
          default: desc
      - name: q
        in: query
        schema:
          type: string
          default: ""
      responses:
        "200":
          description: Successfully retrieved companies list
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyResponse"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/buid/{id}:
    get:
      summary: Get company by business ID
      description: This method retrieves a company by its business ID. Used primarily
        to navigate to company details from external systems if the company UUID is
        not available.
      tags:
      - Companies
      parameters:
      - name: id
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      responses:
        "200":
          description: Successfully retrieved company
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyFullResponse"
        "404":
          description: Company not found
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}:
    get:
      summary: Get company details
      description: This method retrieves all company related information by its UUID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      responses:
        "200":
          description: Successfully retrieved company details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyFullResponse"
        "404":
          description: Company not found
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/base:
    get:
      summary: Refresh company basic details
      description: This method refreshes the basic details of a company by its UUID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      responses:
        "200":
          description: Successfully refreshed company details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyFullResponse"
        "404":
          description: Company not found
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/figures:
    get:
      summary: Get company key figures
      description: This method retrieves key financial figures for a company by its
        UUID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      - name: refresh
        in: query
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: Successfully retrieved key figures
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyFullResponse"
        "404":
          description: Company not found
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/history:
    get:
      summary: Get company history
      description: This method retrieves the history of a company by its UUID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      - name: limit
        in: query
        schema:
          type: integer
          exclusiveMinimum: 0
          format: int32
          default: 10
      - name: offset
        in: query
        schema:
          type: integer
          format: int32
          default: 0
          minimum: 0
      responses:
        "200":
          description: Successfully retrieved company history
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyHistoryResponse"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/osint:
    get:
      summary: Get company OSINT data
      description: This method retrieves open source intelligence data for a company
        by its UUID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      - name: refresh
        in: query
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: Successfully retrieved OSINT data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GlobalCompany"
        "404":
          description: Company not found
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/persons:
    get:
      summary: Get company persons
      description: This method retrieves persons for a company by its UUID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      responses:
        "200":
          description: Successfully retrieved company persons
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PersonEntity"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
    post:
      summary: Add person to company
      description: This method adds a person to a company by the company UUID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddPersonRequest"
        required: true
      responses:
        "200":
          description: Successfully added person to company
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PersonEntity"
        "404":
          description: Company not found
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/rating:
    get:
      summary: Get company rating
      description: This method retrieves the rating of a company by its UUID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      - name: refresh
        in: query
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: Successfully retrieved company rating
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyFullResponse"
        "404":
          description: Company not found
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/rating-plus:
    get:
      summary: Get enhanced company rating
      description: This method retrieves enhanced rating information for a company.
      tags:
      - Companies
      parameters:
      - description: Company UUID
        required: true
        name: companyUuid
        in: path
        schema:
          $ref: "#/components/schemas/UUID"
      - description: Force refresh data from external source
        name: refresh
        in: query
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: Successfully retrieved enhanced rating
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyFullResponse"
        "404":
          description: Company not found
        "400":
          description: Invalid parameters provided
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/remarks:
    get:
      summary: Get company payment remarks
      description: This method retrieves payment remarks for a company by its UUID.
        The remarks are retrieved from 3rd party data source.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      - name: refresh
        in: query
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: Successfully retrieved payment remarks
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyFullResponse"
        "404":
          description: Company not found
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/representatives:
    get:
      summary: Get company representatives
      description: This method retrieves company representatives by the company UUID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      - name: refresh
        in: query
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: Successfully retrieved company representatives
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyFullResponse"
        "404":
          description: Company not found
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/status:
    get:
      summary: Get company status
      description: This method retrieves the status of a company by its UUID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      - name: refresh
        in: query
        schema:
          type: boolean
          default: false
      responses:
        "200":
          description: Successfully retrieved company status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyFullResponse"
        "404":
          description: Company not found
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/trade-register-extract:
    get:
      summary: Get new trade register extract
      description: This method retrieves a new trade register extract from the Finnish
        trade register by a business ID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      responses:
        "200":
          description: Successfully retrieved trade register extract
          content:
            application/pdf: {}
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/trade-register-extracts:
    get:
      summary: List trade register extracts
      description: This method retrieves trade register extracts for a company by
        its UUID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      responses:
        "200":
          description: Successfully retrieved trade register extracts
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TradeRegisterExtractResponse"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /companies/{companyUuid}/trade-register-extracts/{extract}:
    get:
      summary: Get specific trade register extract
      description: This method retrieves a specific trade register extract for a company
        by its UUID and extract ID.
      tags:
      - Companies
      parameters:
      - name: companyUuid
        in: path
        required: true
        schema:
          $ref: "#/components/schemas/UUID"
      - name: extract
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        "200":
          description: Successfully retrieved trade register extract
          content:
            application/pdf: {}
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /forms/submit:
    post:
      summary: Submit a form response
      description: "Submit a new form for processing. This endpoint handles the submission\
        \ of form data and stores it in the database. If no form ID is provided, the\
        \ system will use the first available form or create a default one."
      tags:
      - Forms
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FormSubmission"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FormSubmissionResponse"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      security:
      - SecurityScheme:
        - admin
        - api
        - anonymous
  /organizations/api-keys:
    post:
      summary: Create API Key
      description: Creates a new API key for the authenticated user. API keys can
        be used for machine-to-machine authentication.
      tags:
      - Organization management
      parameters:
      - name: X-Entercheck-Organization
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApiKeyRequest"
        required: true
      responses:
        "200":
          description: API key created successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiKeyResponse"
        "401":
          description: Unauthorized - user not authenticated
        "403":
          description: Forbidden - cannot create API keys with API key authentication
        "400":
          description: Bad Request - validation error with expiration time
      security:
      - SecurityScheme:
        - admin
  /organizations/calendly/subscribe:
    post:
      summary: Subscribe to Calendly webhooks.
      description: The method generates a new inbound webhook.
      tags:
      - Organization management
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CalendlySubscriptionRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CalendlyWebhookEntity"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      security:
      - SecurityScheme:
        - admin
  /organizations/calendly/unsubscribe:
    delete:
      summary: Unsubscribe from Calendly webhooks.
      description: The method deletes the inbound webhook.
      tags:
      - Organization management
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CalendlyDeleteSubscriptionRequest"
        required: true
      responses:
        "204":
          description: No Content
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /organizations/calendly/validate:
    get:
      summary: Validate Calendly API key
      description: The method validates the Calendly API key.
      tags:
      - Organization management
      parameters:
      - name: apiKey
        in: query
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CalendlyUser"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /organizations/configuration/dnb/bisnode/credentials:
    put:
      summary: Update Bisnode credentials
      description: Updates the existing Bisnode API credentials for the organization.
        Used for DNB integration for Finnish operations.
      tags:
      - Organization management
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BisnodeCredentialsRequest"
        required: true
      responses:
        "200":
          description: Bisnode credentials successfully updated
        "400":
          description: Invalid request format
        "403":
          description: Insufficient permissions
        "401":
          description: Not Authorized
      security:
      - SecurityScheme:
        - admin
    post:
      summary: Set Bisnode credentials
      description: "Sets the Bisnode API credentials for DNB (Dun & Bradstreet) integration,\
        \ applicable for Finnish operations. Requires admin privileges."
      tags:
      - Organization management
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BisnodeCredentialsRequest"
        required: true
      responses:
        "200":
          description: Bisnode credentials successfully set
        "400":
          description: Invalid request format
        "403":
          description: Insufficient permissions
        "401":
          description: Not Authorized
      security:
      - SecurityScheme:
        - admin
    get:
      summary: Get Bisnode credentials
      description: Retrieves the Bisnode API credentials for the current organization.
        Used for DNB (Dun & Bradstreet) integration.
      tags:
      - Organization management
      responses:
        "200":
          description: Retrieved Bisnode credentials successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BisnodeCredentialsResponse"
        "404":
          description: Bisnode credentials not found for this organization
        "403":
          description: Insufficient permissions
        "401":
          description: Not Authorized
      security:
      - SecurityScheme:
        - admin
    delete:
      summary: Delete Bisnode credentials
      description: Removes the Bisnode API credentials from the organization. This
        will disable DNB integration functionality.
      tags:
      - Organization management
      responses:
        "200":
          description: Bisnode credentials successfully deleted
        "403":
          description: Insufficient permissions
        "401":
          description: Not Authorized
      security:
      - SecurityScheme:
        - admin
  /organizations/configuration/pipedrive/credentials:
    put:
      summary: Update Pipedrive credentials
      description: Updates the existing Pipedrive API credentials for the organization.
        Used for maintaining Pipedrive CRM integration.
      tags:
      - Organization management
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PipedriveCredentialsRequest"
        required: true
      responses:
        "200":
          description: Pipedrive credentials successfully updated
        "400":
          description: Invalid request format
        "403":
          description: Insufficient permissions
        "401":
          description: Not Authorized
      security:
      - SecurityScheme:
        - admin
    post:
      summary: Set Pipedrive credentials
      description: Sets the Pipedrive API credentials for the organization. This enables
        Pipedrive CRM integration.
      tags:
      - Organization management
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PipedriveCredentialsRequest"
        required: true
      responses:
        "200":
          description: Pipedrive credentials successfully set
        "400":
          description: Invalid request format
        "403":
          description: Insufficient permissions
        "401":
          description: Not Authorized
      security:
      - SecurityScheme:
        - admin
    get:
      summary: Get Pipedrive credentials
      description: Retrieves the Pipedrive API credentials for the current organization.
        Used for Pipedrive CRM integration.
      tags:
      - Organization management
      responses:
        "200":
          description: Retrieved Pipedrive credentials successfully
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PipedriveCredentialsResponse"
        "404":
          description: Pipedrive credentials not found for this organization
        "403":
          description: Insufficient permissions
        "401":
          description: Not Authorized
      security:
      - SecurityScheme:
        - admin
    delete:
      summary: Delete Pipedrive credentials
      description: Removes the Pipedrive API credentials from the organization. This
        will disable Pipedrive CRM integration.
      tags:
      - Organization management
      responses:
        "200":
          description: Pipedrive credentials successfully deleted
        "403":
          description: Insufficient permissions
        "401":
          description: Not Authorized
      security:
      - SecurityScheme:
        - admin
  /relations/domain:
    post:
      summary: Verify if a domain can be linked to a business
      description: "Analyzes a domain to verify its relationship with a business.\
        \ Validates domain ownership and association with the claimed business entity,\
        \ supporting KYC verification of business online presence."
      tags:
      - Relations Service
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DomainRequest"
        required: true
      responses:
        "200":
          description: Domain relationship verification result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DomainResponse"
        "400":
          description: Bad Request - invalid input data
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /relations/email:
    post:
      summary: Verify email in relation to a business
      description: "Analyzes an email address to verify its relationship with a business.\
        \ Determines if the email domain matches the company's domain and evaluates\
        \ email credibility, supporting KYC verification of business communication\
        \ channels."
      tags:
      - Relations Service
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EmailRequest"
        required: true
      responses:
        "200":
          description: Email relationship verification result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EmailResponse"
        "400":
          description: Bad Request - invalid input data
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /relations/person:
    post:
      summary: Verify person in relation to a business
      description: "Analyzes a person's connection to a company based on multiple\
        \ verification factors including representation rights, company email and\
        \ phone, and official records. Creates or updates the person record, and performs\
        \ a comprehensive verification to establish if the person is legitimately\
        \ related to the claimed business entity."
      tags:
      - Relations Service
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PersonRequest"
        required: true
      responses:
        "200":
          description: Person verification result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PersonResponse"
        "400":
          description: Bad Request - invalid input data
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /relations/phone:
    post:
      summary: Verify if a phone number can be linked to a business
      description: "Analyzes a phone number to verify its relationship with a business.\
        \ Validates if the phone number is associated with the claimed business entity,\
        \ supporting KYC verification of business contact information."
      tags:
      - Relations Service
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PhoneRequest"
        required: true
      responses:
        "200":
          description: Phone relationship verification result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PhoneResponse"
        "400":
          description: Bad Request - invalid input data
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
  /search/company:
    get:
      summary: Type-ahead search for companies
      description: Search for companies by name and country
      tags:
      - Search
      parameters:
      - name: advancedSearch
        in: query
        schema:
          type: boolean
      - name: country
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          format: int32
          default: 10
      - name: name
        in: query
        schema:
          type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CompanySearchResult"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
        - anonymous
        - starter
  /search/company/details:
    get:
      summary: Get company details
      description: Get company details by id and country
      tags:
      - Search
      parameters:
      - name: country
        in: query
        schema:
          type: string
      - name: id
        in: query
        schema:
          type: string
          pattern: \S
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompanyDetailsResponse"
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
        - api
        - anonymous
        - starter
  /workflow:
    get:
      summary: List all workflows
      tags:
      - Workflows Management
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          exclusiveMinimum: 0
          format: int32
          default: 10
      - name: offset
        in: query
        schema:
          type: integer
          format: int32
          default: 0
          minimum: 0
      - name: order_by
        in: query
        schema:
          type: string
          default: created_at
      - name: order_dir
        in: query
        schema:
          type: string
          pattern: ^(asc|desc)$
          default: desc
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
    post:
      summary: Create a new workflowId
      description: Create a new workflowId. This will create a new workflowId that
        can be used to collect data from users.
      tags:
      - Workflows Management
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWorkflowRequest"
        required: true
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      security:
      - SecurityScheme:
        - admin
  /workflow/responses:
    get:
      summary: Get a list of workflowId responses
      description: Get a list of workflowId responses. This will return a list of
        workflowId responses. The responses can be filtered by the company name or
        the workflowId name. The responses can be ordered by the created date. The
        responses can be paginated.
      tags:
      - Workflows Management
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          exclusiveMinimum: 0
          format: int32
          default: 10
      - name: offset
        in: query
        schema:
          type: integer
          format: int32
          default: 0
          minimum: 0
      - name: order_by
        in: query
        schema:
          type: string
          default: created_at
      - name: order_dir
        in: query
        schema:
          type: string
          pattern: ^(asc|desc)$
          default: desc
      - name: q
        in: query
        schema:
          type: string
          default: ""
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
  /workflow/responses/{responseId}:
    get:
      summary: Get a workflowId response
      description: Get a workflowId response by its id. This will return the workflowId
        response with all the data that was submitted by the user.
      tags:
      - Workflows Management
      parameters:
      - name: responseId
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
  /workflow/retry:
    post:
      summary: Retry Workflow processing
      description: "If the workflowId processing has failed, you can retry processing\
        \ the same workflowId again"
      tags:
      - Workflow Triggers
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RetryWorkflowRequest"
        required: true
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      security:
      - SecurityScheme:
        - admin
        - api
  /workflow/start:
    post:
      summary: Initiate workflowId
      description: Submit a new workflowId for processing. This will start the process
        of creating a new workflowId response. This is the starting point for any
        interaction with a workflowId used by the end user.
      tags:
      - Workflow Triggers
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TriggerWorkflowRequest"
        required: true
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      security:
      - SecurityScheme:
        - admin
        - api
        - anonymous
  /workflow/tasks/types:
    get:
      summary: Get a list of tasks for a workflowId
      tags:
      - Workflows Management
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
  /workflow/{workflowId}:
    put:
      summary: Update a workflowId
      tags:
      - Workflows Management
      parameters:
      - name: workflowId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWorkflowRequest"
        required: true
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      security:
      - SecurityScheme:
        - admin
    get:
      summary: Get a workflowId
      tags:
      - Workflows Management
      parameters:
      - name: workflowId
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
    delete:
      summary: Delete a workflowId
      tags:
      - Workflows Management
      parameters:
      - name: workflowId
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
  /workflow/{workflowId}/tasks:
    post:
      summary: Create a new task for a workflowId
      tags:
      - Workflows Management
      parameters:
      - name: workflowId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WorkflowTaskRequest"
        required: true
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      security:
      - SecurityScheme:
        - admin
  /workflow/{workflowId}/tasks/{taskId}:
    put:
      summary: Update list of tasks for a workflowId
      tags:
      - Workflows Management
      parameters:
      - name: taskId
        in: path
        required: true
        schema:
          type: string
      - name: workflowId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WorkflowTaskRequest"
        required: true
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
        "400":
          description: Bad Request
      security:
      - SecurityScheme:
        - admin
    delete:
      summary: Delete a task for a workflowId
      tags:
      - Workflows Management
      parameters:
      - name: taskId
        in: path
        required: true
        schema:
          type: string
      - name: workflowId
        in: path
        required: true
        schema:
          type: string
      responses:
        "200":
          description: OK
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed
      security:
      - SecurityScheme:
        - admin
info:
  title: Entercheck
  version: v2.1.0
  description: |-
    For further information, visit docs.entercheck.eu.

    ## Authentication

    Entercheck provides you with a RESTful specification APIs. Before calling an API, you need to log in to retrieve a valid access token. The token is valid for 1 hour.

    1. POST /v1/auth endpoint providing your username & password in the body of the request.

    2. Add token to the Authorization header as Bearer token `Authorization: Bearer`
  termsOfService: https://www.entercheck.eu/terms
  contact:
    name: Entercheck
    email: support@entercheck.eu
servers:
- url: https://service.entercheck.eu
