openapi: 3.0.0
info:
  description: |
    This is the specification of the bLink 'order-placement' module API.
    This API is used to place orders and check on the order status.
  version: 2.2.1.1-six_caas
  title: bLink API - order placement module
  contact:
    name: SIX BBS AG
    url: https://www.six-group.com/en/products-services/banking-services/blink.html
servers:
  - url: https://api.six-group.com/api/bankingservices/b-link/order-placement/v2
tags:
  - name: orderplacement
    description: Order placement operations.
  - name: orderstatus
    description: Order status operations.
  - name: accountaccess
    description: Account access operations.
  - name: event-notification-subscription
    description: Event notification subscription operations.
  - name: event-notification-webhook
    description: Event notification webhook operations.
  - name: event-notification-aggregated-polling
    description: Event notification aggregated polling operations.
  - name: diagnostics
    description: Diagnostics operations.
paths:
  /orders:
    parameters:
      - $ref: '#/components/parameters/permissionid_in_header'
      - $ref: '#/components/parameters/correlation_in_header'
      - $ref: '#/components/parameters/agent_in_header'
      - $ref: '#/components/parameters/targetid_in_header'
      - $ref: '#/components/parameters/psu_ip_in_header'
      - $ref: '#/components/parameters/psu_user_agent_in_header'
      - $ref: '#/components/parameters/optional_authorization_in_header'
      - $ref: '#/components/parameters/optional_instance_id_in_header'
    post:
      tags:
        - orderplacement
      summary: Posts a new order
      description: Posts a new order.
      operationId: postOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestedOrder'
      responses:
        '202':
          description: Order accepted for further processing.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/order'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
    get:
      tags:
        - orderstatus
      summary: Returns a list of open security orders
      description: >
        Returns all open orders to which the user of the API has access to.
        Paging is done based on the order object,

        i.e. if limit is set to 1, then 1 order will be returned per page.
      operationId: getOrders
      parameters:
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Order list.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-nextCursor:
              $ref: '#/components/headers/X-nextCursor'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/order'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /orders/{clientOrderId}:
    parameters:
      - $ref: '#/components/parameters/path_clientOrderId'
      - $ref: '#/components/parameters/permissionid_in_header'
      - $ref: '#/components/parameters/correlation_in_header'
      - $ref: '#/components/parameters/agent_in_header'
      - $ref: '#/components/parameters/targetid_in_header'
      - $ref: '#/components/parameters/psu_ip_in_header'
      - $ref: '#/components/parameters/psu_user_agent_in_header'
      - $ref: '#/components/parameters/optional_authorization_in_header'
      - $ref: '#/components/parameters/optional_instance_id_in_header'
    get:
      tags:
        - orderstatus
      summary: Returns a single security order
      description: Returns a specific security order.
      operationId: getOrderByClientOrderId
      responses:
        '200':
          description: >-
            Receive a specific order with the corresponding allocations and
            status.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/order'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
    delete:
      tags:
        - orderplacement
      summary: Cancellation of a specific order
      description: Places the cancellation request for a specific order.
      operationId: deleteOrderByClientOrderId
      responses:
        '202':
          description: Order cancellation received for further processing.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/order'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /accountaccesses:
    parameters:
      - $ref: '#/components/parameters/permissionid_in_header'
      - $ref: '#/components/parameters/correlation_in_header'
      - $ref: '#/components/parameters/agent_in_header'
      - $ref: '#/components/parameters/targetid_in_header'
      - $ref: '#/components/parameters/psu_ip_in_header'
      - $ref: '#/components/parameters/psu_user_agent_in_header'
      - $ref: '#/components/parameters/optional_authorization_in_header'
      - $ref: '#/components/parameters/optional_instance_id_in_header'
    get:
      tags:
        - accountaccess
      summary: Returns list of accounts the requestor has access to
      description: >
        Returns list of accounts the requestor has access to with the type of
        access the requestor has. Paging is done based on the accountaccess

        object, i.e. if limit is set to 1, then 1 accountaccess object will be
        returned per page.
      operationId: getAccountAccesses
      parameters:
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Returns list of accounts the requestor has access to.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/accountAccess'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /event-subscriptions:
    parameters:
      - $ref: '#/components/parameters/permissionid_in_header'
      - $ref: '#/components/parameters/correlation_in_header'
      - $ref: '#/components/parameters/agent_in_header'
      - $ref: '#/components/parameters/targetid_in_header'
      - $ref: '#/components/parameters/psu_ip_in_header'
      - $ref: '#/components/parameters/psu_user_agent_in_header'
      - $ref: '#/components/parameters/optional_authorization_in_header'
      - $ref: '#/components/parameters/optional_instance_id_in_header'
    post:
      tags:
        - event-notification-subscription
      summary: Subscribe to Events
      description: Allows TPP to subscribe to specific events for the API.
      operationId: postEventSubscription
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/eventSubscriptionRequest'
      responses:
        '201':
          description: Subscription created.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/eventSubscription'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '409':
          $ref: '#/components/responses/standard409'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
    get:
      tags:
        - event-notification-subscription
      summary: View Subscriptions
      description: Allows TPP to view the event subscriptions.
      operationId: getEventSubscriptions
      parameters:
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Event Subscription read.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-nextCursor:
              $ref: '#/components/headers/X-nextCursor'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/eventSubscriptions'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /event-subscriptions/{eventSubscriptionId}:
    parameters:
      - $ref: '#/components/parameters/path_eventSubscriptionId'
      - $ref: '#/components/parameters/permissionid_in_header'
      - $ref: '#/components/parameters/correlation_in_header'
      - $ref: '#/components/parameters/agent_in_header'
      - $ref: '#/components/parameters/targetid_in_header'
      - $ref: '#/components/parameters/psu_ip_in_header'
      - $ref: '#/components/parameters/psu_user_agent_in_header'
      - $ref: '#/components/parameters/optional_authorization_in_header'
      - $ref: '#/components/parameters/optional_instance_id_in_header'
    get:
      tags:
        - event-notification-subscription
      summary: View Subscription
      description: Allows TPP to view the event subscription.
      operationId: getEventSubscriptionByEventSubscriptionId
      responses:
        '200':
          description: Event Subscription read.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/eventSubscription'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
    put:
      tags:
        - event-notification-subscription
      summary: Change event subscription
      description: Changes event subscription.
      operationId: changeEventSubscriptionByEventSubscriptionId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/eventSubscription'
      responses:
        '200':
          description: Event subscription changed
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/eventSubscription'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
    delete:
      tags:
        - event-notification-subscription
      summary: Delete event subscription
      description: Deletes event subscriptions.
      operationId: deleteEventSubscriptionByEventSubscriptionId
      responses:
        '204':
          description: Event subscription deleted.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /event-subscriptions/search:
    parameters:
      - $ref: '#/components/parameters/cursor'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/fromEventDateTime'
      - $ref: '#/components/parameters/correlation_in_header'
      - $ref: '#/components/parameters/agent_in_header'
      - $ref: '#/components/parameters/targetid_in_header'
      - $ref: '#/components/parameters/psu_ip_in_header'
      - $ref: '#/components/parameters/psu_user_agent_in_header'
      - $ref: '#/components/parameters/optional_authorization_in_header'
      - $ref: '#/components/parameters/optional_instance_id_in_header'
    get:
      summary: Search Subscription
      description: Allows TPP to search for event subscriptions.
      operationId: searchEventSubscriptions
      tags:
        - event-notification-subscription
      responses:
        '200':
          description: List of event subscriptionIds found.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-nextCursor:
              $ref: '#/components/headers/X-nextCursor'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/subscriptionSearchResponse'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /event-subscriptions/{eventSubscriptionId}/event-notifications:
    parameters:
      - $ref: '#/components/parameters/path_eventSubscriptionId'
      - $ref: '#/components/parameters/fromEventDateTime'
      - $ref: '#/components/parameters/cursor'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/correlation_in_header'
      - $ref: '#/components/parameters/agent_in_header'
      - $ref: '#/components/parameters/targetid_in_header'
      - $ref: '#/components/parameters/psu_ip_in_header'
      - $ref: '#/components/parameters/psu_user_agent_in_header'
      - $ref: '#/components/parameters/optional_authorization_in_header'
      - $ref: '#/components/parameters/optional_instance_id_in_header'
    get:
      tags:
        - event-notification-aggregated-polling
      summary: Get event notifications
      description: Get aggregated event-notification list.
      operationId: getEventNotificationsByEventSubscriptionId
      responses:
        '200':
          description: aggregated event-notification list.
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-nextCursor:
              $ref: '#/components/headers/X-nextCursor'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/aggregatedNotificationOrderPlacement'
        '400':
          $ref: '#/components/responses/standard400'
        '401':
          $ref: '#/components/responses/standard401'
        '403':
          $ref: '#/components/responses/standard403'
        '404':
          $ref: '#/components/responses/standard404'
        '429':
          $ref: '#/components/responses/standard429'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /event-notifications:
    parameters:
      - $ref: '#/components/parameters/api_version_in_header'
      - $ref: '#/components/parameters/event_type_in_header'
      - $ref: '#/components/parameters/event_id_in_header'
      - $ref: '#/components/parameters/event_created_at_in_header'
      - $ref: '#/components/parameters/event_subscription_id_in_header'
      - $ref: '#/components/parameters/correlation_in_header'
      - $ref: '#/components/parameters/agent_in_header'
      - $ref: '#/components/parameters/targetid_in_header'
      - $ref: '#/components/parameters/psu_ip_in_header'
      - $ref: '#/components/parameters/psu_user_agent_in_header'
    post:
      summary: Push notification towards TPP
      description: Push notifications for subscribed event notifications.
      operationId: postEventNotification
      tags:
        - event-notification-webhook
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/notificationOrderPlacement'
      responses:
        '202':
          description: Notification accepted
          headers:
            X-Correlation-ID:
              $ref: '#/components/headers/X-Correlation-ID'
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
        '400':
          $ref: '#/components/responses/standard400'
        '404':
          $ref: '#/components/responses/standard404'
        '405':
          $ref: '#/components/responses/standard405'
        '429':
          $ref: '#/components/responses/standard429'
        '500':
          $ref: '#/components/responses/standard500'
        '501':
          $ref: '#/components/responses/standard501'
        '502':
          $ref: '#/components/responses/standard502'
        '503':
          $ref: '#/components/responses/standard503'
        '504':
          $ref: '#/components/responses/standard504'
  /healthcheck:
    parameters:
      - $ref: '#/components/parameters/optional_correlation_in_header'
      - $ref: '#/components/parameters/optional_authorization_in_header'
      - $ref: '#/components/parameters/optional_agent_in_header'
      - $ref: '#/components/parameters/targetid_in_header'
      - $ref: '#/components/parameters/optional_psu_ip_in_header'
      - $ref: '#/components/parameters/optional_psu_user_agent_in_header'
      - $ref: '#/components/parameters/optional_instance_id_in_header'
    get:
      tags:
        - diagnostics
      summary: >-
        Returns all specified request headers and additional diagnostic
        information
      operationId: healthCheckGet
      responses:
        '200':
          description: Health Check Response
          headers:
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/healthCheckResponse'
    post:
      tags:
        - diagnostics
      summary: >-
        Returns all specified request headers, the request body and additional
        diagnostic information
      operationId: healthCheckPost
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: string
      responses:
        '200':
          description: Health Check Response
          headers:
            X-CorAPI-Source:
              $ref: '#/components/headers/X-CorAPI-Source'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/healthCheckResponse'
components:
  parameters:
    optional_psu_ip_in_header:
      name: X-PSU-IP-Address
      in: header
      description: >-
        IP address of the user initiating the operation (SCOPE: FI /
        NOTIFICATION_RECIPIENT - optional)
      required: false
      schema:
        type: string
    optional_psu_user_agent_in_header:
      name: X-PSU-User-Agent
      in: header
      description: >-
        User of the client software (SCOPE: FI / NOTIFICATION_RECIPIENT -
        optional)
      required: false
      schema:
        type: string
    correlation_in_header:
      name: X-Correlation-ID
      in: header
      description: >-
        Unique ID (defined by the caller) which will be reflected back in the
        response.
      required: true
      schema:
        type: string
        maxLength: 64
    agent_in_header:
      name: User-Agent
      in: header
      description: Name and version of the of the Client software
      required: true
      schema:
        type: string
    limit:
      in: query
      name: limit
      required: false
      schema:
        type: integer
        format: int32
        minimum: 1
      description: Maximum number of items to return.
    cursor:
      in: query
      name: cursor
      required: false
      schema:
        type: string
      description: An opaque string value used for pagination.
    path_eventSubscriptionId:
      in: path
      name: eventSubscriptionId
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 40
      description: >-
        Unique identification as assigned by the API exposing party to uniquely
        identify the callback URL resource.
    path_clientOrderId:
      in: path
      name: clientOrderId
      required: true
      schema:
        type: string
        maxLength: 20
      description: >-
        The security order id. This Id corresponds with the
        clientOrderIdentification.
    optional_correlation_in_header:
      name: X-Correlation-ID
      in: header
      description: >-
        Unique ID (defined by the caller) which will be reflected back in the
        response.
      required: false
      schema:
        type: string
        maxLength: 64
    optional_agent_in_header:
      name: User-Agent
      in: header
      description: Name and version of the of the client software
      required: false
      schema:
        type: string
    optional_authorization_in_header:
      name: Authorization
      in: header
      description: Bearer followed by a base64 encoded OAuth access token
      required: false
      schema:
        type: string
    api_version_in_header:
      name: X-CorApi-API-Version
      in: header
      description: The API Version
      example: 1.0.0
      required: true
      schema:
        type: string
    event_type_in_header:
      name: X-CorApi-Event-Type
      in: header
      description: The Event-Type
      example: Order:Created
      required: true
      schema:
        type: string
    event_id_in_header:
      name: X-CorApi-Event-ID
      in: header
      description: The Event-ID
      example: 7c5f40fc-1b29-4263-a2dd-e127a22a947f
      required: true
      schema:
        type: string
    event_created_at_in_header:
      name: X-CorApi-Event-Created-At
      in: header
      description: The Event-Created Date
      example: '2024-05-28T13:44:53Z'
      required: true
      schema:
        type: string
        format: date-time
    event_subscription_id_in_header:
      name: X-CorApi-Event-Subscription-ID
      in: header
      description: The ID of the Subscription the event was created for
      example: 7c5f40fc-1b29-4263-a2dd-e127a22a947f
      required: true
      schema:
        type: string
    targetid_in_header:
      name: X-CorAPI-Target-ID
      in: header
      description: >-
        ID that identifies the provider (e.g., a financial institution). (SCOPE:
        SIX required)
      required: true
      schema:
        type: string
    psu_ip_in_header:
      name: X-PSU-IP-Address
      in: header
      description: >-
        IP address of the user initiating the operation or AUTO for system
        triggered processes (SCOPE: SIX required)
      required: true
      schema:
        type: string
    psu_user_agent_in_header:
      name: X-PSU-User-Agent
      in: header
      description: >-
        User agent of the user initiating the operation or AUTO for system
        triggered processes (SCOPE: SIX required)
      required: true
      schema:
        type: string
    fromEventDateTime:
      name: fromEventDateTime
      in: query
      schema:
        type: string
        format: date-time
      example: '2022-10-26T07:58:30.996+01:00'
    permissionid_in_header:
      name: Permission-ID
      in: header
      description: >-
        This contains the permission Id returned by the post permission, which
        was performed prior to any request.
      required: true
      schema:
        format: uuid
        type: string
    optional_instance_id_in_header:
      name: X-Instance-ID
      in: header
      description: >-
        (Deprecated) Identifies an on-prem application instance which uses a
        legacy on-prem certificate in the mTLS connection. Do not use the header
        otherwise. (SCOPE: SIX_CAAS - optional, SIX_CAAS_INTERNAL - optional).
      required: false
      schema:
        type: string
        maxLength: 64
  headers:
    X-Correlation-ID:
      description: >-
        Client defined ID from request to correlates HTTP requests between a
        client and server.
      schema:
        type: string
        maxLength: 64
        example: f058ebd6-02f7-4d3f-942e-904344e8cde5
    Content-Language:
      schema:
        type: string
        description: Response language - always en
        example: en
    X-nextCursor:
      description: An opaque string value, or an empty string if there are no more results.
      required: false
      schema:
        type: string
    X-CorAPI-Source:
      schema:
        type: string
        enum:
          - PLATFORM
          - PROVIDER
          - USER
      description: >
        Indicates whether the response was created by the bLink platform or by
        the provider or by the user. (SCOPE: SIX)
  schemas:
    averagePrice:
      type: string
      pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
      maxLength: 22
      description: Calculated average price of all fills on this order.
      example: '17.8'
    dateTime:
      title: DateTime
      type: string
      format: date-time
      example: '2018-04-13T16:00:00+01:00'
    dayAveragePrice:
      type: string
      pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
      maxLength: 22
      description: Calculated average price of all fills on this order.
      example: '17.8'
    dayExecutedQuantity:
      type: string
      pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
      maxLength: 22
      description: Quantity on an order that has traded today.
      example: '5'
    eventSubscriptionId:
      description: >-
        Unique identification as assigned by the API exposing party to uniquely
        identify the callback URL resource.
      type: string
      minLength: 1
      maxLength: 40
      example: 3v3n7subscr1p70n
    eventType:
      description: >-
        Event type the subscription should apply to AND reason why a
        notification is sent.
      type: string
      enum:
        - heartbeat
        - order:doneForDay
        - order:orderStatusUpdated
        - order:pendingReplace
        - order:replaced
        - order:restated
        - order:suspended
        - order:trade
        - order:tradeCancel
        - order:tradeCorrect
      example: order:orderStatusUpdated
    executedQuantity:
      type: string
      pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
      maxLength: 22
      description: Total quantity (e.g. number of shares) filled.
      example: '100'
    orderStatus:
      type: string
      description: Shows in which stage of its life cycle an order is.
      enum:
        - acknowledged
        - accepted
        - customerRelease
        - placed
        - partiallyFilled
        - filled
        - executed
        - cancelled
        - partiallyCancelled
        - marketCancelled
        - pendingCancel
        - rejected
        - partiallyRejected
        - marketRejected
        - expired
        - partiallyExpired
        - marketExpired
      example: partiallyFilled
    remainingQuantity:
      type: string
      pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
      maxLength: 22
      description: >
        Quantity open for further execution.

        If the status is cancelled, expired, or rejected (in which case the
        order is no longer active) then remainingQuantity could be 0,

        otherwise remainingQuantity = orderQuantity - executedQuantity.
      example: '20'
    notificationOrderPlacement:
      description: Notification for the order placement API that is pushed to the TPP.
      type: object
      properties:
        eventSubscriptionId:
          $ref: '#/components/schemas/eventSubscriptionId'
        version:
          $ref: '#/components/schemas/version'
        eventType:
          $ref: '#/components/schemas/eventType'
        resourceLink:
          description: Link to resource that triggered the event notification.
          type: string
          example: /api/openwealth/order-placement/v2/orders/abcd1234
        created:
          $ref: '#/components/schemas/dateTime'
        id:
          $ref: '#/components/schemas/notificationId'
        predecessorId:
          $ref: '#/components/schemas/notificationId'
        orderStatus:
          $ref: '#/components/schemas/orderStatus'
        executedQuantity:
          $ref: '#/components/schemas/executedQuantity'
        averagePrice:
          $ref: '#/components/schemas/averagePrice'
        remainingQuantity:
          $ref: '#/components/schemas/remainingQuantity'
        dayExecutedQuantity:
          $ref: '#/components/schemas/dayExecutedQuantity'
        dayAveragePrice:
          $ref: '#/components/schemas/dayAveragePrice'
        lastQuantity:
          $ref: '#/components/schemas/lastQuantity'
        lastPrice:
          $ref: '#/components/schemas/lastPrice'
    lastPrice:
      type: string
      pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
      maxLength: 22
      description: Price of this (last) fill.
      example: '17.8'
    lastQuantity:
      type: string
      pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
      maxLength: 22
      description: Quantity (e.g. shares) bought/sold on this (last) fill.
      example: '30'
    notificationId:
      description: Identification of the notification.
      type: string
      example: 120066c9-58a1-432b-aa60-712fae7f143e
    version:
      description: >-
        Indicates to which version of the respective API the notification is
        belonging to.
      type: string
      enum:
        - v1
        - v2
        - v3
      example: v2
    currency:
      title: Currency
      type: string
      description: ISO 4217 code
      pattern: ^[A-Z]{3}$
      example: CHF
    date:
      title: Date
      type: string
      format: date
      example: '2018-04-13'
    amount:
      type: string
      pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
      maxLength: 22
      example: '12000'
      description: Absolute amount.
    creditDebitIndicator:
      type: string
      enum:
        - credit
        - debit
      example: debit
      description: >-
        Specifies if the amount is a debit (negative) or credit (positive)
        amount.
    foreignExchangeRate:
      type: object
      properties:
        sourceCurrency:
          $ref: '#/components/schemas/currency'
        rate:
          type: string
          pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
          maxLength: 22
          example: '1.0963'
          description: >
            Indicates the rate of a fx transaction for one source currency unit
            to the target currency. E.g. 1GBP=xxxEUR, where the source

            currency is GBP and the target currency is EUR.
        targetCurrency:
          $ref: '#/components/schemas/currency'
        fxType:
          type: string
          description: >-
            Defines, if the indicated fx rate includes (costPrice) or excludes
            (dealPrice) fees and taxes.
          example: costPrice
          enum:
            - costPrice
            - dealPrice
    statementDateTime:
      type: string
      format: date-time
      example: '2018-04-13T11:11:11Z'
      description: >-
        Date and time of the statement creation (UTC Timestamp). In accordance
        with ISO 8601.
    orderQuantity:
      type: object
      description: Ordered quantity.
      properties:
        amount:
          $ref: '#/components/schemas/amount'
        type:
          type: string
          description: Type of the amount.
          example: unitsNumber
          enum:
            - unitsNumber
            - nominal
    financialInstrumentDetails:
      type: object
      required:
        - financialInstrumentIdentification
      properties:
        financialInstrumentIdentification:
          type: object
          required:
            - identification
            - type
          properties:
            identification:
              type: string
              example: CH0012005267
              description: Instrument identification.
            type:
              type: string
              example: isin
              description: Type of the instrument identification.
              enum:
                - isin
                - sedol
                - cusip
                - ric
                - tickerSymbol
                - bloomberg
                - cta
                - quick
                - wertpapier
                - dutch
                - valoren
                - sicovam
                - belgian
                - common
                - otherProprietaryIdentification
    placeOfTrade:
      type: object
      description: Market in which a trade transaction is to be or has been executed.
      properties:
        marketIdentificationCode:
          type: string
          maxLength: 4
          description: >
            Market Identifier Code. Identification of a financial market, as
            stipulated in the norm ISOMarket Identifier Code.

            Identification of a financial market, as stipulated in the norm ISO
            10383 "Codes for exchanges and market identifications".
          example: XSWX
        marketDescription:
          type: string
          description: >-
            Description of the market when no Market Identification Code is
            available.
          example: OTC
    limitPrice:
      type: string
      pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
      maxLength: 22
      description: Limit price per unit of quantity (e.g. per share).
      example: '17.8'
    stopPrice:
      type: string
      pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
      maxLength: 22
      description: Price of this (last) fill.
      example: '17.8'
    bulkOrderDetails:
      required:
        - side
        - orderQuantity
        - financialInstrumentDetails
        - currency
        - executionType
        - timeInForce
        - numberOfAllocations
      type: object
      properties:
        side:
          type: string
          description: Side taken by a party on an order.
          example: buy
          enum:
            - buy
            - sell
        orderQuantity:
          $ref: '#/components/schemas/orderQuantity'
        displayQuantity:
          $ref: '#/components/schemas/amount'
        numberOfAllocations:
          type: integer
          example: 5
          description: >-
            Indicates number of orders to be combined for average pricing and
            allocation.
        financialInstrumentDetails:
          $ref: '#/components/schemas/financialInstrumentDetails'
        placeOfTrade:
          $ref: '#/components/schemas/placeOfTrade'
        currency:
          $ref: '#/components/schemas/currency'
        executionType:
          type: string
          description: Type of the execution of the order.
          example: limit
          enum:
            - market
            - limit
            - stop
            - stopLimit
        limitPrice:
          $ref: '#/components/schemas/limitPrice'
        stopPrice:
          $ref: '#/components/schemas/stopPrice'
        timeInForce:
          type: string
          description: Specifies how long the order remains in effect.
          example: day
          enum:
            - day
            - goodTillCancel
            - atTheOpening
            - immediateOrCancel
            - fillOrKill
            - goodTillCrossing
            - goodTillDate
            - atTheClose
            - goodThroughCrossing
            - atCrossing
            - goodForTime
            - goodForAuction
            - goodForMonth
        expiryDateTime:
          $ref: '#/components/schemas/dateTime'
        additionalDetails:
          type: string
          maxLength: 128
          description: >-
            Provides additional details on the order which can not be included
            within the structured fields of the message.
          example: at pre Market and today
    account:
      type: object
      properties:
        identification:
          type: string
          maxLength: 35
          example: 8765-43219
          description: Unambiguous identification for the account.
        type:
          type: string
          description: Indicates the type of the account.
          example: safekeepingAccount
          enum:
            - cashAccount
            - safekeepingAccount
            - other
    requestedAllocation:
      type: object
      required:
        - accounts
        - clientAllocationIdentification
        - amount
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/account'
        clientAllocationIdentification:
          type: string
          description: >-
            Unambiguous identifier for the individual allocation of the bulk
            order, as assigned by the instructing party.
          example: '321321321'
        amount:
          $ref: '#/components/schemas/amount'
    allocationCancellationReason:
      type: object
      properties:
        code:
          type: string
          description: Cancelled reason expressed as a code.
          enum:
            - accountIdentificationMissing
            - accountInvalidForOrderPlacement
            - accountTypeMissing
            - accountTypeNotMatchingAccount
            - allocationQuantityTooHigh
            - cashAccountMissing
            - cashAccountNotFound
            - insufficientBuyingPower
            - insufficientQuantityAvailable
            - invalidCurrencyForAccount
            - pretradeCheckFailed
            - safekeepingAccountMissing
            - safekeepingAccountNotFound
            - tooManyCashAccountsIndicated
            - tooManySafekeepingAccounts
            - valueTooHigh
            - zeroQuantity
            - other
          example: zeroQuantity
        proprietary:
          type: string
          description: >-
            Cancelled reason expressed as a proprietary description that
            provides more details about the reason of the cancellation.
          example: Cancelled by client.
    remainingAllocation:
      type: object
      description: >-
        Provides an overview of what quantity has already been allocated to the
        allocation and what quantity is still outstanding.
      properties:
        executedQuantity:
          $ref: '#/components/schemas/executedQuantity'
        remainingQuantity:
          $ref: '#/components/schemas/remainingQuantity'
    bookingDate:
      type: object
      description: Indicates the booking date for an order or allocation.
      properties:
        date:
          $ref: '#/components/schemas/date'
    billingAmount:
      type: object
      properties:
        type:
          type: string
          description: Indicates the type of billing amount.
          example: grossTradeAmount
          enum:
            - grossTradeAmount
            - grossSettlementAmount
            - netSettlementAmount
            - netBillingAmount
        amount:
          $ref: '#/components/schemas/amount'
        currency:
          $ref: '#/components/schemas/currency'
        creditDebitIndicator:
          $ref: '#/components/schemas/creditDebitIndicator'
        foreignExchangeRate:
          $ref: '#/components/schemas/foreignExchangeRate'
    accruedInterest:
      type: object
      properties:
        numberDaysAccrued:
          type: integer
          example: 28
          description: >-
            Specifies the number of days used for calculating the accrued
            interest amount.
        amount:
          $ref: '#/components/schemas/amount'
        currency:
          $ref: '#/components/schemas/currency'
        creditDebitIndicator:
          $ref: '#/components/schemas/creditDebitIndicator'
        foreignExchangeRate:
          $ref: '#/components/schemas/foreignExchangeRate'
    feeOrTax:
      type: object
      properties:
        feeType:
          type: string
          description: Indicates the type of fee/tax.
          enum:
            - stampDuty
            - withholdingTax
            - capitalGainTax
            - financialTransactionTax
            - otherTaxes
            - transactionFee
            - brokerageFee
            - managementFee
            - courtage
            - custodyFee
            - exchangeFee
            - thirdPartyFee
            - otherFee
            - others
          example: stampDuty
        amount:
          $ref: '#/components/schemas/amount'
        currency:
          $ref: '#/components/schemas/currency'
        creditDebitIndicator:
          $ref: '#/components/schemas/creditDebitIndicator'
        foreignExchangeRate:
          $ref: '#/components/schemas/foreignExchangeRate'
    billingDetails:
      type: object
      properties:
        billingAmountList:
          type: array
          items:
            $ref: '#/components/schemas/billingAmount'
        accruedInterests:
          $ref: '#/components/schemas/accruedInterest'
        feesOrTaxList:
          type: array
          items:
            $ref: '#/components/schemas/feeOrTax'
    completeAllocation:
      type: object
      description: Completed allocation
      properties:
        allocationIdentification:
          type: string
          description: >
            Unambiguous identifier of the individual allocation of the bulk
            order, as assigned by the confirming party.

            Corresponds with the transactionIdentification of the OpenWealth
            Custody Services API.
          example: 123-123123
        executedQuantity:
          $ref: '#/components/schemas/executedQuantity'
        averagePrice:
          $ref: '#/components/schemas/averagePrice'
        bookingDate:
          $ref: '#/components/schemas/bookingDate'
        billingDetails:
          $ref: '#/components/schemas/billingDetails'
    allocation:
      required:
        - requestedAllocation
      type: object
      description: >-
        Extended details regarding the allocations including validity of the
        allocation and billing details.
      properties:
        requestedAllocation:
          $ref: '#/components/schemas/requestedAllocation'
        allocationCancellationReasonList:
          type: array
          items:
            $ref: '#/components/schemas/allocationCancellationReason'
        remainingAllocation:
          $ref: '#/components/schemas/remainingAllocation'
        completeAllocationList:
          type: array
          items:
            $ref: '#/components/schemas/completeAllocation'
    extendedOrder:
      required:
        - clientOrderIdentification
        - bulkOrderDetails
      type: object
      description: Order object with extended allocation information.
      properties:
        clientOrderIdentification:
          type: string
          example: 123-123123
          description: >-
            Unambiguous identifier for the bulk order, as assigned by the
            instructing party.
          maxLength: 20
        orderDateTime:
          type: string
          format: date-time
          example: '2018-04-13T11:11:11Z'
          description: >-
            Date and time the order has been received. In accordance with ISO
            8601.
          readOnly: true
        orderIdentification:
          type: string
          description: >-
            Unambiguous identifier for the bulk order, as assigned by the
            confirming party.
          example: 321-321321
          readOnly: true
        bulkOrderDetails:
          $ref: '#/components/schemas/bulkOrderDetails'
        allocationList:
          type: array
          items:
            $ref: '#/components/schemas/allocation'
    statusDateTime:
      type: string
      format: date-time
      example: '2018-04-13T11:11:11Z'
      description: >
        Indicates the date and time at which the status has been updated into
        the status indicated under "status" (UTC Timestamp). In accordance

        with ISO 8601.
    orderCancellationReason:
      type: object
      description: Indicates the reason, why an order is invalid/cancelled/rejected.
      properties:
        code:
          type: string
          description: Cancelled reason expressed as a code.
          enum:
            - allocationInvalid
            - cancelledByHub
            - cancelledByInstructingParty
            - cancelledByOther
            - cannotContainMarketIdentificationAndMarketDescription
            - currencyNotSupportedForFinancialInstrument
            - displayQuantityNotImplemented
            - endOfLife
            - executionTypeInconsequential
            - executionTypeNotSupported
            - expiryDateTimeInThePast
            - expiryDateTimeMissing
            - expiryDateTimeNotAllowed
            - financialInstrumentIdentificationNotUnique
            - financialInstrumentIdentificationTypeNotSupported
            - financialInstrumentNotAllowedViaInterface
            - financialInstrumentNotFound
            - financialInstrumentNotTradedOnMarket
            - icebergOrderTooLarge
            - invalidPrices
            - limitPriceMissingForExecutionType
            - limitPriceNotAllowedForExecutionType
            - marketCurrentlyBlockedForTrading
            - marketQuoteNotAvailableForProduct
            - maximumNumberOfAllocationsExceeded
            - numberOfAllocationsDeviateFromAllocationsProvided
            - numberOfAllocationsEmpty
            - numberOfAllocationsZero
            - orderQuantityDeviatesFromSumOfAllocationQuantities
            - orderQuantityTooHigh
            - orderQuantityTooSmall
            - orderQuantityTypeNotImplemented
            - orderQuantityTypeWrong
            - orderTypeNotSupportedByMarket
            - placeOfTradeNotImplemented
            - placeOfTradeNotSupported
            - productExpired
            - selectedTimeInForceNotImplemented
            - stopPriceMissingForExecutionType
            - stopPriceNotAllowedForExecutionType
            - timeInForceAndExpiryDateInconsistent
            - valueTooHigh
            - wrongDenomination
            - other
          example: endOfLife
        proprietary:
          type: string
          description: >-
            Cancelled reason expressed as a proprietary description that
            provides more details about the reason of the cancellation.
          example: Cancelled by client
    dayOrderQuantity:
      type: string
      pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
      maxLength: 22
      description: >
        The orderQuantity less all quantity (adjusted for stock splits) that
        traded on previous days.

        DayOrderQuantity = OrderQuantity - (executedQuantity -
        dayExecutedQuantity).
      example: '15'
    orderStatusHistory:
      type: object
      description: Provides the status of the order was at a certain time in its lifecycle.
      properties:
        status:
          $ref: '#/components/schemas/orderStatus'
        statusDateTime:
          $ref: '#/components/schemas/statusDateTime'
    orderState:
      required:
        - status
        - executedQuantity
        - remainingQuantity
      type: object
      properties:
        status:
          $ref: '#/components/schemas/orderStatus'
        statusDateTime:
          $ref: '#/components/schemas/statusDateTime'
        orderCancellationReasonList:
          type: array
          items:
            $ref: '#/components/schemas/orderCancellationReason'
        executedQuantity:
          $ref: '#/components/schemas/executedQuantity'
        remainingQuantity:
          $ref: '#/components/schemas/remainingQuantity'
        averagePrice:
          $ref: '#/components/schemas/averagePrice'
        dayOrderQuantity:
          $ref: '#/components/schemas/dayOrderQuantity'
        dayExecutedQuantity:
          $ref: '#/components/schemas/dayExecutedQuantity'
        dayAveragePrice:
          $ref: '#/components/schemas/dayAveragePrice'
        factor:
          type: string
          pattern: ^[0-9]{1,12}([.][0-9]{1,9})?$
          maxLength: 22
          example: '100'
          description: >
            For Fixed Income: Amortization Factor for deriving Current face from
            Original face for ABS or MBS securities.

            Note the fraction may be greater than, equal to or less than.

            In TIPS securities this is the Inflation index.

            Qty * Factor * Price = Gross Trade Amount


            For Derivatives: Contract Value Factor by which price must be
            adjusted to determine the true nominal value of one futures/options

            contract.

            (Qty * Price) * Factor = Nominal Value
        orderStatusHistoryList:
          type: array
          items:
            $ref: '#/components/schemas/orderStatusHistory'
    orderDate:
      type: object
      description: Indicates a date with a dateType relevant for the respective order.
      properties:
        date:
          $ref: '#/components/schemas/date'
        dateType:
          type: string
          example: bookingDate
          enum:
            - transactionDate
            - bookingDate
            - valueDate
    order:
      required:
        - extendedOrder
        - orderState
      type: object
      properties:
        statementDateTime:
          $ref: '#/components/schemas/statementDateTime'
        extendedOrder:
          $ref: '#/components/schemas/extendedOrder'
        orderState:
          $ref: '#/components/schemas/orderState'
        dateList:
          type: array
          items:
            $ref: '#/components/schemas/orderDate'
    requestedOrder:
      required:
        - clientOrderIdentification
        - bulkOrderDetails
        - requestedAllocationList
      type: object
      properties:
        clientOrderIdentification:
          type: string
          example: 123-123123
          description: >-
            Unambiguous identifier for the bulk order, as assigned by the
            instructing party.
          maxLength: 20
        orderDateTime:
          type: string
          format: date-time
          example: '2018-04-13T11:11:11Z'
          description: >-
            Date and time of the order placement (UTC Timestamp). In accordance
            with ISO 8601.
          readOnly: true
        orderIdentification:
          type: string
          description: >-
            Unambiguous identifier for the bulk order, as assigned by the
            confirming party.
          example: 321-321321
          readOnly: true
        bulkOrderDetails:
          $ref: '#/components/schemas/bulkOrderDetails'
        requestedAllocationList:
          type: array
          items:
            $ref: '#/components/schemas/requestedAllocation'
    accountAccess:
      type: object
      required:
        - account
        - accessType
      properties:
        account:
          $ref: '#/components/schemas/account'
        accessType:
          type: string
          description: >-
            Indicates what type of access the requestor has for the specified
            account.
          enum:
            - read
            - write
          example: read
    eventSubscriptions:
      type: object
      properties:
        eventSubscriptions:
          type: array
          items:
            $ref: '#/components/schemas/eventSubscription'
    eventSubscription:
      type: object
      required:
        - eventSubscriptionId
      properties:
        eventSubscriptionId:
          $ref: '#/components/schemas/eventSubscriptionId'
        eventTypes:
          description: >-
            Array of event types the subscription applies to. An empty list
            indicates that no notifications are sent.
          type: array
          items:
            $ref: '#/components/schemas/eventType'
    eventSubscriptionRequest:
      type: object
      properties:
        eventTypes:
          description: >-
            Array of event types the subscription applies to. An empty list
            indicates that no notifications are sent.
          type: array
          items:
            $ref: '#/components/schemas/eventType'
    subscriptionSearchResponse:
      type: object
      properties:
        eventSubscriptionIds:
          type: array
          items:
            $ref: '#/components/schemas/eventSubscriptionId'
    aggregatedNotificationOrderPlacement:
      type: object
      properties:
        eventNotifications:
          type: array
          items:
            $ref: '#/components/schemas/notificationOrderPlacement'
    healthCheckResponse:
      title: Health Check Response
      type: object
      properties:
        requestDateTime:
          title: Request Time
          type: string
          format: date-time
          example: '2018-04-13T11:11:11Z'
        receivedHeaders:
          title: Received Headers
          type: array
          items:
            type: object
            properties:
              headerName:
                type: string
                example: X-Correlation-ID
              headerValue:
                type: string
                description: As received
        receivedPayload:
          title: Received Payload
          type: string
          example: ... as received ...
    commonErrorResponse:
      title: Common Error Response
      type: object
      properties:
        type:
          $ref: '#/components/schemas/commonErrorType'
        title:
          type: string
          example: This is the general problem description
        detail:
          type: string
          example: Detailed problem description with respect to the current request
        instance:
          type: string
          example: path/to/corresponding/resource
    commonErrorType:
      title: Common Error Type
      description: Error Types for commonErrorResponse.
      type: string
      enum:
        - /problems/INVALID_PAYLOAD
        - /problems/MALFORMED_PAYLOAD
        - /problems/INVALID_TOKEN
        - /problems/EXPIRED_TOKEN
        - /problems/INSUFFICIENT_PRIVILEGES
        - /problems/NO_ACCESS_TO_RESOURCE
        - /problems/RESOURCE_DOES_NOT_EXIST
        - /problems/RESOURCE_NOT_READY
        - /problems/RESOURCE_TOO_LARGE
        - /problems/WRONG_METHOD
        - /problems/OPERATION_NOT_ALLOWED
        - /problems/TECHNICAL_ERROR
        - /problems/NOT_IMPLEMENTED
        - /problems/SERVICE_UNAVAILABLE
      example: /problems/TECHNICAL_ERROR
  responses:
    standard400:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Bad Request - The server cannot or will not process the request due to
        something that is perceived to be a client error as malformed request
        syntax.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard401:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Unauthorized - The request has not been applied because it lacks valid
        authentication credentials for the target resource.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard403:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Forbidden - The server understood the request but refuses to authorize
        it.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard404:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Not Found - The origin server did not find a current representation for
        the target resource or is not willing to disclose that one exists.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard405:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Method Not Allowed - The method received in the request-line is known by
        the origin server but not supported by the target resource.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard409:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Conflict - The request conflicts with the current state of the target
        resource.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard429:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Too many requests - The user has sent too many requests in a given
        amount of time.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard500:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Internal Server Error - The server encountered an unexpected condition
        that prevented it from fulfilling the request.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard501:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Not Implemented - The server does not support the functionality required
        to fulfill the request.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard502:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Bad Gateway - The server received an invalid response from the upstream
        server.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard503:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Service Unavailable - The server is currently unable to handle the
        request due to a temporary overload or scheduled maintenance.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
    standard504:
      headers:
        Content-Language:
          $ref: '#/components/headers/Content-Language'
        X-Correlation-ID:
          $ref: '#/components/headers/X-Correlation-ID'
        X-CorAPI-Source:
          $ref: '#/components/headers/X-CorAPI-Source'
      description: >-
        Gateway Timeout - The server did not get a response in time that it
        needed in order to complete the request.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/commonErrorResponse'
