openapi: 3.1.0
info:
  title: Business Partner Data Management Orchestrator
  description: Orchestrator component acts as a passive component and offers for each
    processing steps individual endpoints
  version: 7.4.0-SNAPSHOT
servers:
  - url: http://localhost:8085
    description: Generated server url
security:
  - open_id_scheme: []
  - bearer_scheme: []
paths:
  /v7/sharing-member-records:
    get:
      tags:
        - sharing-member-record-controller
      operationId: queryRecords
      parameters:
        - name: timestampAfter
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: page
          in: query
          description: Number of page to get results from
          required: false
          schema:
            type: string
            minimum: 0
        - name: size
          in: query
          description: Size of each page
          required: false
          schema:
            type: string
            maximum: 100
            minimum: 0
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PageDtoSharingMemberRecord"
    put:
      tags:
        - sharing-member-record-controller
      operationId: update
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SharingMemberRecordUpdateRequest"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SharingMemberRecord"
  /v7/relations/golden-record-tasks:
    post:
      tags:
        - Task Client
      summary: Create new golden record relations tasks for given business partner
        relationship data
      description: "Create golden record tasks for given business partner relationship\
        \ data in given mode. The mode decides through which processing steps the\
        \ given business partner relationship data will go through. The response contains\
        \ the states of the created tasks in the order of given business partner relationship\
        \ data.If there is an error in the request no tasks are created (all or nothing).\
        \ For a single request, the maximum number of business partners in the request\
        \ is limited to 100 entries."
      operationId: createTasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskCreateRelationsRequest"
        required: true
      responses:
        "200":
          description: The states of successfully created tasks including the task
            identifier for tracking purposes.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskCreateRelationsResponse"
        "400":
          description: On malformed task create requests or reaching upsert limit
  /v7/relations/golden-record-tasks/step-results:
    post:
      tags:
        - Task Worker
      summary: Post step results for reserved relations golden record tasks in the
        given step queue
      description: "Post business partner relations step results for the given tasks\
        \ in the given step queue. In order to post a result for a task it needs to\
        \ be reserved first, has to currently be in the given step queue and the time\
        \ limit is not exceeded. The number of results you can post at a time does\
        \ not need to match the original number of reserved tasks. Results are accepted\
        \ via strategy 'all or nothing'. For a single request, the maximum number\
        \ of postable results is limited to 100."
      operationId: resolveStepResults
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskRelationsStepResultRequest"
        required: true
      responses:
        "204":
          description: If the results could be processed
        "400":
          description: "On malformed requests, reaching upsert limit or posting results\
            \ for tasks which are missing or in the wrong step queue"
  /v7/relations/golden-record-tasks/step-reservations:
    post:
      tags:
        - Task Worker
      summary: Reserve the next relations golden record tasks waiting in the given
        step queue
      description: "Reserve up to a given number of relations golden record tasks\
        \ in the given step queue. The response entries contain the business partner\
        \ relations data. The reservation has a time limit which is returned. For\
        \ a single request, the maximum number of reservable tasks is limited to 100."
      operationId: reserveTasksForStep
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskStepReservationRequest"
        required: true
      responses:
        "200":
          description: The reserved tasks with their business partner relations data
            to process.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskRelationsStepReservationResponse"
        "400":
          description: On malformed task create requests or reaching upsert limit
  /v7/relations/golden-record-tasks/state/search:
    post:
      tags:
        - Task Client
      summary: Search for the state of relations golden record tasks by task identifiers
      description: Returns the state of relations golden record tasks based on the
        provided task identifiers. Unknown task identifiers are ignored.
      operationId: searchTaskStates
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskStateRequest"
        required: true
      responses:
        "200":
          description: The state of the tasks for the provided task identifiers.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskRelationsStateResponse"
        "400":
          description: On malformed task search requests
  /v7/relations/golden-record-tasks/result-state/search:
    post:
      tags:
        - Task Client
      summary: Search for result states by giving a list of task IDs
      operationId: searchTaskResultStates
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskResultStateSearchRequest"
        required: true
      responses:
        "200":
          description: The list of corresponding result states in the same order as
            has been received. A null indicates that a task could not be found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskResultStateSearchResponse"
        "400":
          description: On malformed task search requests
  /v7/business-partners/golden-record-tasks:
    post:
      tags:
        - Task Client
      summary: Create new golden record tasks for given business partner data
      description: "Create golden record tasks for given business partner data in\
        \ given mode. The mode decides through which processing steps the given business\
        \ partner data will go through. The response contains the states of the created\
        \ tasks in the order of given business partner data.If there is an error in\
        \ the request no tasks are created (all or nothing). For a single request,\
        \ the maximum number of business partners in the request is limited to 100\
        \ entries."
      operationId: createTasks_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskCreateRequest"
        required: true
      responses:
        "200":
          description: The states of successfully created tasks including the task
            identifier for tracking purposes.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskCreateResponse"
        "400":
          description: On malformed task create requests or reaching upsert limit
  /v7/business-partners/golden-record-tasks/step-results:
    post:
      tags:
        - Task Worker
      summary: Post step results for reserved golden record tasks in the given step
        queue
      description: "Post business partner step results for the given tasks in the\
        \ given step queue. In order to post a result for a task it needs to be reserved\
        \ first, has to currently be in the given step queue and the time limit is\
        \ not exceeded. The number of results you can post at a time does not need\
        \ to match the original number of reserved tasks. Results are accepted via\
        \ strategy 'all or nothing'. For a single request, the maximum number of postable\
        \ results is limited to 100."
      operationId: resolveStepResults_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskStepResultRequest"
        required: true
      responses:
        "204":
          description: If the results could be processed
        "400":
          description: "On malformed requests, reaching upsert limit or posting results\
            \ for tasks which are missing or in the wrong step queue"
  /v7/business-partners/golden-record-tasks/step-reservations:
    post:
      tags:
        - Task Worker
      summary: Reserve the next golden record tasks waiting in the given step queue
      description: "Reserve up to a given number of golden record tasks in the given\
        \ step queue. The response entries contain the business partner data to process\
        \ which consists of the generic and L/S/A data. The reservation has a time\
        \ limit which is returned. For a single request, the maximum number of reservable\
        \ tasks is limited to 100."
      operationId: reserveTasksForStep_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskStepReservationRequest"
        required: true
      responses:
        "200":
          description: The reserved tasks with their business partner data to process.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskStepReservationResponse"
        "400":
          description: On malformed task create requests or reaching upsert limit
  /v7/business-partners/golden-record-tasks/state/search:
    post:
      tags:
        - Task Client
      summary: Search for the state of golden record tasks by task identifiers
      description: Returns the state of golden record tasks based on the provided
        task identifiers. Unknown task identifiers are ignored.
      operationId: searchTaskStates_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskStateRequest"
        required: true
      responses:
        "200":
          description: The state of the tasks for the provided task identifiers.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskStateResponse"
        "400":
          description: On malformed task search requests
  /v6/golden-record-tasks/result-state/search:
    post:
      tags:
        - Task Client
      summary: Search for result states by giving a list of task IDs
      operationId: searchTaskResultStates_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskResultStateSearchRequest"
        required: true
      responses:
        "200":
          description: The list of corresponding result states in the same order as
            has been received. A null indicates that a task could not be found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskResultStateSearchResponse"
        "400":
          description: On malformed task search requests
  /v7/business-partners/golden-record-tasks/result-state/search:
    post:
      tags:
        - Task Client
      summary: Search for result states by giving a list of task IDs
      operationId: searchTaskResultStates_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskResultStateSearchRequest"
        required: true
      responses:
        "200":
          description: The list of corresponding result states in the same order as
            has been received. A null indicates that a task could not be found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskResultStateSearchResponse"
        "400":
          description: On malformed task search requests
  /v6/golden-record-tasks:
    post:
      tags:
        - Task Client
      summary: Create new golden record tasks for given business partner data
      description: "Create golden record tasks for given business partner data in\
        \ given mode. The mode decides through which processing steps the given business\
        \ partner data will go through. The response contains the states of the created\
        \ tasks in the order of given business partner data.If there is an error in\
        \ the request no tasks are created (all or nothing). For a single request,\
        \ the maximum number of business partners in the request is limited to 100\
        \ entries."
      operationId: createTasks_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskCreateRequest"
        required: true
      responses:
        "200":
          description: The states of successfully created tasks including the task
            identifier for tracking purposes.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskCreateResponse"
        "400":
          description: On malformed task create requests or reaching upsert limit
  /v6/golden-record-tasks/step-results:
    post:
      tags:
        - Task Worker
      summary: Post step results for reserved golden record tasks in the given step
        queue
      description: "Post business partner step results for the given tasks in the\
        \ given step queue. In order to post a result for a task it needs to be reserved\
        \ first, has to currently be in the given step queue and the time limit is\
        \ not exceeded. The number of results you can post at a time does not need\
        \ to match the original number of reserved tasks. Results are accepted via\
        \ strategy 'all or nothing'. For a single request, the maximum number of postable\
        \ results is limited to 100."
      operationId: resolveStepResults_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskStepResultRequest"
        required: true
      responses:
        "204":
          description: If the results could be processed
        "400":
          description: "On malformed requests, reaching upsert limit or posting results\
            \ for tasks which are missing or in the wrong step queue"
  /v6/golden-record-tasks/step-reservations:
    post:
      tags:
        - Task Worker
      summary: Reserve the next golden record tasks waiting in the given step queue
      description: "Reserve up to a given number of golden record tasks in the given\
        \ step queue. The response entries contain the business partner data to process\
        \ which consists of the generic and L/S/A data. The reservation has a time\
        \ limit which is returned. For a single request, the maximum number of reservable\
        \ tasks is limited to 100."
      operationId: reserveTasksForStep_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskStepReservationRequest"
        required: true
      responses:
        "200":
          description: The reserved tasks with their business partner data to process.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskStepReservationResponse"
        "400":
          description: On malformed task create requests or reaching upsert limit
  /v6/golden-record-tasks/state/search:
    post:
      tags:
        - Task Client
      summary: Search for the state of golden record tasks by task identifiers
      description: Returns the state of golden record tasks based on the provided
        task identifiers. Unknown task identifiers are ignored.
      operationId: searchTaskStates_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TaskStateRequest"
        required: true
      responses:
        "200":
          description: The state of the tasks for the provided task identifiers.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskStateResponse"
        "400":
          description: On malformed task search requests
  /v7/relations/golden-record-tasks/finished-events:
    get:
      tags:
        - Task Client
      summary: Get event log of relations golden record tasks that have finished processing
      description: 'The event log contains all events of when relations golden record
        tasks finish processing. These events are helpful for the task creator to
        check whether created tasks have finished processing. A paginated list of
        events that happened after a given time is returned. '
      operationId: getRelationsEvents
      parameters:
        - name: timestamp
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: page
          in: query
          description: Number of page to get results from
          required: false
          schema:
            type: string
            minimum: 0
        - name: size
          in: query
          description: Size of each page
          required: false
          schema:
            type: string
            maximum: 100
            minimum: 0
      responses:
        "200":
          description: The paginated events after the given timestamp
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FinishedTaskEventsResponse"
        "400":
          description: On malformed requests
  /v7/business-partners/golden-record-tasks/finished-events:
    get:
      tags:
        - Task Client
      summary: Get event log of golden record tasks that have finished processing
      description: 'The event log contains all events of when golden record tasks
        finish processing. These events are helpful for the task creator to check
        whether created tasks have finished processing. A paginated list of events
        that happened after a given time is returned. '
      operationId: getEvents
      parameters:
        - name: timestamp
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: page
          in: query
          description: Number of page to get results from
          required: false
          schema:
            type: string
            minimum: 0
        - name: size
          in: query
          description: Size of each page
          required: false
          schema:
            type: string
            maximum: 100
            minimum: 0
      responses:
        "200":
          description: The paginated events after the given timestamp
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FinishedTaskEventsResponse"
        "400":
          description: On malformed requests
  /v6/golden-record-tasks/finished-events:
    get:
      tags:
        - Task Client
      summary: Get event log of golden record tasks that have finished processing
      description: 'The event log contains all events of when golden record tasks
        finish processing. These events are helpful for the task creator to check
        whether created tasks have finished processing. A paginated list of events
        that happened after a given time is returned. '
      operationId: getEvents_1
      parameters:
        - name: timestamp
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: page
          in: query
          description: Number of page to get results from
          required: false
          schema:
            type: string
            minimum: 0
        - name: size
          in: query
          description: Size of each page
          required: false
          schema:
            type: string
            maximum: 100
            minimum: 0
      responses:
        "200":
          description: The paginated events after the given timestamp
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FinishedTaskEventsResponse"
        "400":
          description: On malformed requests
components:
  schemas:
    AlternativeAddress:
      type: object
      description: An alternative postal address describes an alternative way of delivery
        for example if the goods are to be picked up somewhere else.
      properties:
        geographicCoordinates:
          $ref: "#/components/schemas/GeoCoordinate"
        country:
          type: string
        administrativeAreaLevel1:
          type: string
        postalCode:
          type: string
        city:
          type: string
        deliveryServiceType:
          type: string
          enum:
            - PO_BOX
            - PRIVATE_BAG
            - BOITE_POSTALE
        deliveryServiceQualifier:
          type: string
        deliveryServiceNumber:
          type: string
    AlternativeAddressScriptVariant:
      type: object
      properties:
        postalCode:
          type: string
        city:
          type: string
        deliveryServiceQualifier:
          type: string
        deliveryServiceNumber:
          type: string
    BpnReference:
      type: object
      description: A reference to a BPN for the corresponding business partner data.
        Either this reference contains an existing BPN or a BPN request identifier.
        The golden record process makes sure that the each unique BPN request identifier
        is associated to a unique BPN. For a new BPN request identifier the golden
        record process creates a new BPN (and golden record) and associates it with
        the BPN request identifier. Known BPN request identifiers are resolved to
        the BPN and the corresponding golden record is updated with the business partner
        data. This makes it possible for duplication check services to reference unique
        business partners by their own BPN request identifiers instead of needing
        to rely on BPNs for identification.
      properties:
        referenceValue:
          type: string
        desiredBpn:
          type: string
        referenceType:
          type: string
          enum:
            - Bpn
            - BpnRequestIdentifier
    BusinessPartner:
      type: object
      description: "Generic business partner data for golden record processing. Typically\
        \ a sharing member shares incomplete and/or uncategorized business partner\
        \ data to the golden record process. The golden record process categorizes\
        \ and completes the data in order to create and update the resulting golden\
        \ records. The golden records are found in the legalEntity, site and additionalAddress\
        \ fields. The business partner data needs to contain the full golden record\
        \ parent relationship. This means, if an additional address is specified in\
        \ the business partner data, also its legal entity and also its site parent\
        \ (if a site exists) needs to be specified. "
      properties:
        nameParts:
          type: array
          items:
            $ref: "#/components/schemas/NamePart"
        owningCompany:
          type: string
        uncategorized:
          $ref: "#/components/schemas/UncategorizedProperties"
        legalEntity:
          $ref: "#/components/schemas/LegalEntity"
        site:
          $ref: "#/components/schemas/Site"
        additionalAddress:
          $ref: "#/components/schemas/PostalAddressWithScriptVariants"
        type:
          type: string
          description: |-
            The recognized golden record type this business partner data contains.
            * `Legal Entity`: The business partner data only contains legal entity and legal address information.
            * `Site`: The business partner data contains site, site main address and its parent legal entity information.
            * `Additional Address`: The business partner data contains an additional address, (optional) parent site and parent legal entity information.
            * `Null`: No clear type determined, undecided. The golden record process will not create golden record from this business partner data.
          enum:
            - LegalEntity
            - Site
            - Address
    BusinessPartnerRelations:
      type: object
      description: 'The business partner relations data to be processed '
      properties:
        relationType:
          type: string
          enum:
            - IsAlternativeHeadquarterFor
            - IsManagedBy
            - IsOwnedBy
        businessPartnerSourceBpnl:
          type: string
        businessPartnerTargetBpnl:
          type: string
        validityPeriods:
          type: array
          items:
            $ref: "#/components/schemas/RelationValidityPeriod"
    BusinessState:
      type: object
      description: The business state information for the corresponding business partner
      properties:
        validFrom:
          type: string
          format: date-time
          description: Date since when the status is/was valid.
        validTo:
          type: string
          format: date-time
          description: "Date until the status was valid, if applicable."
        type:
          type: string
          description: The type of this specified status.
          enum:
            - ACTIVE
            - INACTIVE
    ConfidenceCriteria:
      type: object
      description: Contains information to evaluate how good or verified the information
        in the attached business partner data is. This information will be directly
        written in the matched golden record's confidence criteria.
      properties:
        sharedByOwner:
          type: boolean
        checkedByExternalDataSource:
          type: boolean
        numberOfSharingMembers:
          type: integer
          format: int32
        lastConfidenceCheckAt:
          type: string
          format: date-time
        nextConfidenceCheckAt:
          type: string
          format: date-time
        confidenceLevel:
          type: integer
          format: int32
    Entry:
      type: object
      properties:
        taskId:
          type: string
        recordId:
          type: string
    Event:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        resultState:
          type: string
          enum:
            - Pending
            - Success
            - Error
        taskId:
          type: string
    FinishedTaskEventsResponse:
      type: object
      properties:
        totalElements:
          type: integer
          format: int64
          description: Total number of all results in all pages
        totalPages:
          type: integer
          format: int32
          description: Total number pages
        page:
          type: integer
          format: int32
          description: Current page number
        contentSize:
          type: integer
          format: int32
          description: Number of results in the page
        content:
          type: array
          description: Collection of results in the page
          items:
            $ref: "#/components/schemas/Event"
    GeoCoordinate:
      type: object
      description: "The exact location of the physical postal address in latitude,\
        \ longitude, and altitude."
      properties:
        longitude:
          type: number
          format: double
        latitude:
          type: number
          format: double
        altitude:
          type: number
          format: double
    Identifier:
      type: object
      description: The additional identifiers of this business partner (excluding
        the BPN)
      properties:
        value:
          type: string
          description: Value of the identifier
        type:
          type: string
          description: The type of identifier
        issuingBody:
          type: string
          description: The organisation that issued this identifier
    LegalEntity:
      type: object
      description: "Legal entity information for this business partner data. Every\
        \ business partner either is a legal entity or belongs to a legal entity.There,\
        \ a legal entity property is not allowed to be 'null'. "
      properties:
        bpnReference:
          $ref: "#/components/schemas/BpnReference"
        legalName:
          type: string
        legalShortName:
          type: string
        legalForm:
          type: string
        identifiers:
          type: array
          items:
            $ref: "#/components/schemas/Identifier"
        states:
          type: array
          items:
            $ref: "#/components/schemas/BusinessState"
        confidenceCriteria:
          $ref: "#/components/schemas/ConfidenceCriteria"
        hasChanged:
          type: boolean
        legalAddress:
          $ref: "#/components/schemas/PostalAddress"
        scriptVariants:
          type: array
          items:
            $ref: "#/components/schemas/LegalEntityScriptVariant"
        isParticipantData:
          type: boolean
          description: Whether this legal entity is part of the Data Space network
    LegalEntityScriptVariant:
      type: object
      properties:
        scriptCode:
          type: string
        legalName:
          type: string
        legalShortName:
          type: string
        legalAddress:
          $ref: "#/components/schemas/PostalAddressScriptVariant"
    NamePart:
      type: object
      description: A categorized name part for this business partner data
      properties:
        name:
          type: string
        type:
          type: string
          description: |
            NamePartType:
            * `LegalName` - Value is part of the legal entities' legal name
            * `ShortName` - Value is part of the legal entities' short name
            * `LegalForm` - Value is part of the legal entities' legal form name
            * `SiteName` - Value is part of the site's name
            * `AddressName` - Value is part of the address name
          enum:
            - LegalName
            - ShortName
            - LegalForm
            - SiteName
            - AddressName
    PageDtoSharingMemberRecord:
      type: object
      description: Paginated collection of results
      properties:
        totalElements:
          type: integer
          format: int64
          description: Total number of all results in all pages
        totalPages:
          type: integer
          format: int32
          description: Total number pages
        page:
          type: integer
          format: int32
          description: Current page number
        contentSize:
          type: integer
          format: int32
          description: Number of results in the page
        content:
          type: array
          description: Collection of results in the page
          items:
            $ref: "#/components/schemas/SharingMemberRecord"
    PhysicalAddress:
      type: object
      description: "A physical postal address describes the physical location of an\
        \ office, warehouse, gate, etc."
      properties:
        geographicCoordinates:
          $ref: "#/components/schemas/GeoCoordinate"
        country:
          type: string
        administrativeAreaLevel1:
          type: string
        administrativeAreaLevel2:
          type: string
        administrativeAreaLevel3:
          type: string
        postalCode:
          type: string
        city:
          type: string
        district:
          type: string
        street:
          $ref: "#/components/schemas/Street"
        companyPostalCode:
          type: string
        industrialZone:
          type: string
        building:
          type: string
        floor:
          type: string
        door:
          type: string
        taxJurisdictionCode:
          type: string
    PhysicalAddressScriptVariant:
      type: object
      properties:
        postalCode:
          type: string
        city:
          type: string
        district:
          type: string
        street:
          $ref: "#/components/schemas/Street"
        companyPostalCode:
          type: string
        industrialZone:
          type: string
        building:
          type: string
        floor:
          type: string
        door:
          type: string
        taxJurisdictionCode:
          type: string
    PostalAddress:
      type: object
      description: "Address information of this business partner data. The address\
        \ can be either a legal, site main and/or additional address. This can also\
        \ refer to address information which is unknown to which type it belongs to."
      properties:
        bpnReference:
          $ref: "#/components/schemas/BpnReference"
        addressName:
          type: string
          description: The name of this address
        identifiers:
          type: array
          description: Identifiers for this address (in addition to the BPNA)
          items:
            $ref: "#/components/schemas/Identifier"
        states:
          type: array
          description: The business state history of this address
          items:
            $ref: "#/components/schemas/BusinessState"
        confidenceCriteria:
          $ref: "#/components/schemas/ConfidenceCriteria"
        physicalAddress:
          $ref: "#/components/schemas/PhysicalAddress"
        alternativeAddress:
          $ref: "#/components/schemas/AlternativeAddress"
        hasChanged:
          type: boolean
          deprecated: true
          description: Whether this address information differs from its golden record
            counterpart in the Pool.Currently deprecated and ignored by the golden
            record creation and update process.
    PostalAddressScriptVariant:
      type: object
      properties:
        addressName:
          type: string
        physicalAddress:
          $ref: "#/components/schemas/PhysicalAddressScriptVariant"
        alternativeAddress:
          $ref: "#/components/schemas/AlternativeAddressScriptVariant"
    PostalAddressScriptVariantWithScriptCode:
      type: object
      properties:
        scriptCode:
          type: string
        addressName:
          type: string
        physicalAddress:
          $ref: "#/components/schemas/PhysicalAddressScriptVariant"
        alternativeAddress:
          $ref: "#/components/schemas/AlternativeAddressScriptVariant"
    PostalAddressWithScriptVariants:
      type: object
      description: The additional address information of this business partner data.
        An additional address is an address that is distinct from the legal and site
        main address. The additional address is either an additional address of the
        legal entity (site is null) or of the site (site is not null). An additional
        address of 'Null' means the business partner data has no additional address
      properties:
        bpnReference:
          $ref: "#/components/schemas/BpnReference"
        addressName:
          type: string
          description: The name of this address
        identifiers:
          type: array
          description: Identifiers for this address (in addition to the BPNA)
          items:
            $ref: "#/components/schemas/Identifier"
        states:
          type: array
          description: The business state history of this address
          items:
            $ref: "#/components/schemas/BusinessState"
        confidenceCriteria:
          $ref: "#/components/schemas/ConfidenceCriteria"
        physicalAddress:
          $ref: "#/components/schemas/PhysicalAddress"
        alternativeAddress:
          $ref: "#/components/schemas/AlternativeAddress"
        hasChanged:
          type: boolean
          deprecated: true
          description: Whether this address information differs from its golden record
            counterpart in the Pool.Currently deprecated and ignored by the golden
            record creation and update process.
        scriptVariants:
          type: array
          items:
            $ref: "#/components/schemas/PostalAddressScriptVariantWithScriptCode"
    RelationValidityPeriod:
      type: object
      properties:
        validFrom:
          type: string
          format: date
        validTo:
          type: string
          format: date
    SharingMemberRecord:
      type: object
      properties:
        recordId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        isGoldenRecordCounted:
          type: boolean
    SharingMemberRecordUpdateRequest:
      type: object
      properties:
        recordId:
          type: string
        isGoldenRecordCounted:
          type: boolean
    Site:
      type: object
      description: Site information for this business partner data. A site of 'null'
        means the business partner data has no site.
      properties:
        bpnReference:
          $ref: "#/components/schemas/BpnReference"
        siteName:
          type: string
        states:
          type: array
          items:
            $ref: "#/components/schemas/BusinessState"
        confidenceCriteria:
          $ref: "#/components/schemas/ConfidenceCriteria"
        hasChanged:
          type: boolean
        siteMainAddress:
          $ref: "#/components/schemas/PostalAddress"
        scriptVariants:
          type: array
          items:
            $ref: "#/components/schemas/SiteScriptVariant"
        siteMainIsLegalAddress:
          type: boolean
          description: This site's main address is the legal address of the legal
            entity. The address information therefore is stored in the legal address.
    SiteScriptVariant:
      type: object
      properties:
        scriptCode:
          type: string
        siteName:
          type: string
        mainAddress:
          $ref: "#/components/schemas/PostalAddressScriptVariant"
    Street:
      type: object
      description: "The street of the physical postal address, synonyms: road, avenue,\
        \ lane, boulevard, highway"
      properties:
        name:
          type: string
        houseNumber:
          type: string
        houseNumberSupplement:
          type: string
        milestone:
          type: string
        direction:
          type: string
        namePrefix:
          type: string
        additionalNamePrefix:
          type: string
        nameSuffix:
          type: string
        additionalNameSuffix:
          type: string
    TaskClientRelationsStateDto:
      type: object
      description: The golden record task's processing state together with optional
        business partner relationship data in case processing is done
      properties:
        taskId:
          type: string
        recordId:
          type: string
          description: The identifier of the gate record for which this task has been
            created
        businessPartnerRelationsResult:
          $ref: "#/components/schemas/BusinessPartnerRelations"
        processingState:
          $ref: "#/components/schemas/TaskProcessingRelationsStateDto"
      required:
        - processingState
        - recordId
        - taskId
    TaskClientStateDto:
      type: object
      description: The golden record task's processing state together with optional
        business partner data in case processing is done
      properties:
        taskId:
          type: string
        recordId:
          type: string
          description: The identifier of the gate record for which this task has been
            created
        businessPartnerResult:
          $ref: "#/components/schemas/BusinessPartner"
        processingState:
          $ref: "#/components/schemas/TaskProcessingStateDto"
      required:
        - processingState
        - recordId
        - taskId
    TaskCreateRelationsRequest:
      type: object
      description: Request object to specify for which business partner relationship
        data tasks should be created and in which mode
      properties:
        mode:
          type: string
          description: The mode affecting which processing steps the business partner
            relation goes through
          enum:
            - UpdateFromSharingMember
            - UpdateFromPool
        requests:
          type: array
          description: The list of tasks to create
          items:
            $ref: "#/components/schemas/TaskCreateRelationsRequestEntry"
      required:
        - mode
    TaskCreateRelationsRequestEntry:
      type: object
      properties:
        recordId:
          type: string
          description: The unique identifier for this record which was previously
            issued by the Orchestrator
        businessPartnerRelations:
          $ref: "#/components/schemas/BusinessPartnerRelations"
          description: The business partner relationship data to be processed
    TaskCreateRelationsResponse:
      type: object
      description: Response object for giving a list of created tasks
      properties:
        createdTasks:
          type: array
          items:
            $ref: "#/components/schemas/TaskClientRelationsStateDto"
    TaskCreateRequest:
      type: object
      description: Request object to specify for which business partner data tasks
        should be created and in which mode
      properties:
        mode:
          type: string
          description: The mode affecting which processing steps the business partner
            goes through
          enum:
            - UpdateFromSharingMember
            - UpdateFromPool
        requests:
          type: array
          description: The list of tasks to create
          items:
            $ref: "#/components/schemas/TaskCreateRequestEntry"
      required:
        - mode
    TaskCreateRequestEntry:
      type: object
      properties:
        recordId:
          type: string
          description: The unique identifier for this record which was previously
            issued by the Orchestrator
        businessPartner:
          $ref: "#/components/schemas/BusinessPartner"
          description: The business partner data to be processed
    TaskCreateResponse:
      type: object
      description: Response object for giving a list of created tasks
      properties:
        createdTasks:
          type: array
          items:
            $ref: "#/components/schemas/TaskClientStateDto"
    TaskErrorDto:
      type: object
      description: "Describes an error that happened during processing of a task \n"
      properties:
        type:
          type: string
          description: "The type of error that occurred. \n* `NaturalPersonError`:\
            \ The provided record contains natural person information.\n* `BpnErrorNotFound`:\
            \ The provided record can not be matched to a legal entity or an address.\n\
            * `BpnErrorTooManyOptions`: The provided record can not link to a clear\
            \ legal entity.\n* `MandatoryFieldValidationFailed`: The provided record\
            \ does not fulfill mandatory validation rules.\n* `BlacklistCountryPresent`:\
            \ The provided record is part of a country that is not allowed to be processed\
            \ by the GR process (example: Brazil).\n* `UnknownSpecialCharacters`:\
            \ The provided record contains unallowed special characters.\n"
          enum:
            - Timeout
            - Unspecified
            - NaturalPersonError
            - BpnErrorNotFound
            - BpnErrorTooManyOptions
            - MandatoryFieldValidationFailed
            - BlacklistCountryPresent
            - UnknownSpecialCharacters
        description:
          type: string
          description: "The free text, detailed description of the error"
      required:
        - description
        - type
    TaskProcessingRelationsStateDto:
      type: object
      description: Contains detailed information about the current processing state
        of a relations golden record task
      properties:
        resultState:
          type: string
          description: "The processing result of the task, can also still be pending"
          enum:
            - Pending
            - Success
            - Error
        step:
          type: string
          description: The last step this task has entered
          enum:
            - CleanAndSync
            - PoolSync
            - Clean
        stepState:
          type: string
          description: Whether the task is queued or already reserved for the latest
            step
          enum:
            - Queued
            - Reserved
            - Success
            - Error
        errors:
          type: array
          description: The actual errors that happened during processing if the task
            has an error result state. The errors refer to the latest step.
          items:
            $ref: "#/components/schemas/TaskRelationsErrorDto"
        createdAt:
          type: string
          format: date-time
          description: When the task has been created
        modifiedAt:
          type: string
          format: date-time
          description: When the task has last been modified
        timeout:
          type: string
          format: date-time
          deprecated: true
          description: The timestamp until the task is removed from the Orchestrator
      required:
        - createdAt
        - errors
        - modifiedAt
        - resultState
        - step
        - stepState
    TaskProcessingStateDto:
      type: object
      description: Contains detailed information about the current processing state
        of a golden record task
      properties:
        resultState:
          type: string
          description: "The processing result of the task, can also still be pending"
          enum:
            - Pending
            - Success
            - Error
        step:
          type: string
          description: The last step this task has entered
          enum:
            - CleanAndSync
            - PoolSync
            - Clean
        stepState:
          type: string
          description: Whether the task is queued or already reserved for the latest
            step
          enum:
            - Queued
            - Reserved
            - Success
            - Error
        errors:
          type: array
          description: The actual errors that happened during processing if the task
            has an error result state. The errors refer to the latest step.
          items:
            $ref: "#/components/schemas/TaskErrorDto"
        createdAt:
          type: string
          format: date-time
          description: When the task has been created
        modifiedAt:
          type: string
          format: date-time
          description: When the task has last been modified
        timeout:
          type: string
          format: date-time
          deprecated: true
          description: The timestamp until the task is removed from the Orchestrator
      required:
        - createdAt
        - errors
        - modifiedAt
        - resultState
        - step
        - stepState
    TaskRelationsErrorDto:
      type: object
      description: "Describes an error that happened during processing of a task \n"
      properties:
        type:
          type: string
          description: The type of error that occurred.
          enum:
            - Timeout
            - Unspecified
        description:
          type: string
          description: "The free text, detailed description of the error"
      required:
        - description
        - type
    TaskRelationsStateResponse:
      type: object
      description: Response object for giving a list of task states
      properties:
        tasks:
          type: array
          items:
            $ref: "#/components/schemas/TaskClientRelationsStateDto"
    TaskRelationsStepReservationEntryDto:
      type: object
      description: Task reservation entry
      properties:
        taskId:
          type: string
          description: The identifier of the reserved task
        recordId:
          type: string
          description: The identifier of the gate record for which this task has been
            created
        businessPartnerRelations:
          $ref: "#/components/schemas/BusinessPartnerRelations"
          description: The business partner relations data to process
    TaskRelationsStepReservationResponse:
      type: object
      description: Response object for giving a list of reserved tasks
      properties:
        reservedTasks:
          type: array
          description: The reserved tasks with their business partner relations data
            to process
          items:
            $ref: "#/components/schemas/TaskRelationsStepReservationEntryDto"
        timeout:
          type: string
          format: date-time
          deprecated: true
          description: The timestamp until the reservation is valid and results are
            accepted
    TaskRelationsStepResultEntryDto:
      type: object
      description: A step result for a relations golden record task
      properties:
        taskId:
          type: string
          description: The identifier of the task for which this is a result
        businessPartnerRelations:
          $ref: "#/components/schemas/BusinessPartnerRelations"
          description: The actual result in form of business partner relations data.
            Maybe null if an error occurred during processing of this task.
        errors:
          type: array
          description: Errors that occurred during processing of this task
          items:
            $ref: "#/components/schemas/TaskRelationsErrorDto"
      required:
        - taskId
    TaskRelationsStepResultRequest:
      type: object
      description: Request object for posting step results of previously reserved
        tasks
      properties:
        step:
          type: string
          description: The step queue containing the tasks for which results are posted
          enum:
            - CleanAndSync
            - PoolSync
            - Clean
        results:
          type: array
          items:
            $ref: "#/components/schemas/TaskRelationsStepResultEntryDto"
      required:
        - step
    TaskResultStateSearchRequest:
      type: object
      properties:
        taskIds:
          type: array
          items:
            type: string
    TaskResultStateSearchResponse:
      type: object
      properties:
        resultStates:
          type: array
          items:
            type: string
            enum:
              - Pending
              - Success
              - Error
    TaskStateRequest:
      type: object
      description: Request object for giving a list of task identifiers to search
        for the state of tasks
      properties:
        entries:
          type: array
          items:
            $ref: "#/components/schemas/Entry"
    TaskStateResponse:
      type: object
      description: Response object for giving a list of task states
      properties:
        tasks:
          type: array
          items:
            $ref: "#/components/schemas/TaskClientStateDto"
    TaskStepReservationEntryDto:
      type: object
      description: Task reservation entry
      properties:
        taskId:
          type: string
          description: The identifier of the reserved task
        recordId:
          type: string
          description: The identifier of the gate record for which this task has been
            created
        businessPartner:
          $ref: "#/components/schemas/BusinessPartner"
          description: The business partner data to process
        requestKey:
          type: string
    TaskStepReservationRequest:
      type: object
      description: Request object for reserving a number of tasks waiting in a step
        queue.
      properties:
        amount:
          type: integer
          format: int32
          description: The maximum number of tasks to reserve. Can be fewer if queue
            is not full enough.
        step:
          type: string
          description: The step queue to reserve from
          enum:
            - CleanAndSync
            - PoolSync
            - Clean
      required:
        - amount
        - step
    TaskStepReservationResponse:
      type: object
      description: Response object for giving a list of reserved tasks
      properties:
        reservedTasks:
          type: array
          description: The reserved tasks with their business partner data to process
          items:
            $ref: "#/components/schemas/TaskStepReservationEntryDto"
        timeout:
          type: string
          format: date-time
          deprecated: true
          description: The timestamp until the reservation is valid and results are
            accepted
    TaskStepResultEntryDto:
      type: object
      description: A step result for a golden record task
      properties:
        taskId:
          type: string
          description: The identifier of the task for which this is a result
        businessPartner:
          $ref: "#/components/schemas/BusinessPartner"
          description: The actual result in form of business partner data. Maybe null
            if an error occurred during processing of this task.
        errors:
          type: array
          description: Errors that occurred during processing of this task
          items:
            $ref: "#/components/schemas/TaskErrorDto"
      required:
        - taskId
    TaskStepResultRequest:
      type: object
      description: Request object for posting step results of previously reserved
        tasks
      properties:
        step:
          type: string
          description: The step queue containing the tasks for which results are posted
          enum:
            - CleanAndSync
            - PoolSync
            - Clean
        results:
          type: array
          items:
            $ref: "#/components/schemas/TaskStepResultEntryDto"
      required:
        - step
    UncategorizedProperties:
      type: object
      description: Business partner data that has not yet or can not be categorized
      properties:
        nameParts:
          type: array
          items:
            type: string
        identifiers:
          type: array
          items:
            $ref: "#/components/schemas/Identifier"
        states:
          type: array
          items:
            $ref: "#/components/schemas/BusinessState"
        address:
          $ref: "#/components/schemas/PostalAddressWithScriptVariants"
  securitySchemes:
    open_id_scheme:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: http://localhost:8180/realms/CX-Central/protocol/openid-connect/token
          scopes: {}
        authorizationCode:
          authorizationUrl: http://localhost:8180/realms/CX-Central/protocol/openid-connect/auth
          tokenUrl: http://localhost:8180/realms/CX-Central/protocol/openid-connect/token
          refreshUrl: http://localhost:8180/realms/CX-Central/protocol/openid-connect/token
          scopes: {}
    bearer_scheme:
      type: http
      scheme: bearer
      bearerFormat: JWT
