openapi: 3.1.0
info:
  title: Notes Administration
  description: Manage text notes and attachments, associated with a resource within banking administration. Each note has plain text content of up to 400 characters, and an array of up to 8 attachments. Notes are mostly immutable, although a note creator can delete attachments.
  version: 0.1.2
  contact:
    name: Apiture
    url: https://developer.apiture.com/help/support/
    email: api@apiture.com
  termsOfService: https://developer.apiture.com/docs/Apiture-API-License-Agreement.pdf
  license:
    name: Apiture API License
    url: https://developer.apiture.com/docs/Apiture-API-License-Agreement.pdf
x-apiture-namespace: bankingAdminNotes
servers:
  - url: /bankingAdmin
tags:
  - name: Notes Administration
    description: Banking Notes Administration
paths: {}
components:
  schemas:
    adminNoteContext_url:
      title: Admin Note Context URI (v1.0.0)
      description: Identifies a resource or other context that the note is associated with. For example, to associate a note with an account application, use the application resource's URI.
      type: string
      format: uri-reference
      maxLength: 2048
      x-apiture-version: 1.0.0
    adminNoteFields:
      title: Admin Note Fields (v1.0.0)
      description: Common fields of the admin note resource used to build other model schemas.
      type: object
      x-apiture-fragment: true
      properties:
        text:
          description: The text of this note.
          type: string
          format: text
          minLength: 2
          maxLength: 400
      x-apiture-version: 1.0.0
    newAdminNote:
      title: New Admin Note (v1.0.0)
      description: Request body to create a new admin note. The attachments, if any, refer to documents the client has previously uploaded to a shared document store.
      type: object
      required:
        - text
        - context_url
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/adminNoteFields'
        - type: object
          properties:
            context_url:
              $ref: '#/components/schemas/adminNoteContext_url'
            attachments:
              description: Optional files attached to this note. Omit this property if there are no attachments.
              type: array
              maxItems: 8
              items:
                $ref: '#/components/schemas/newAdminNoteAttachment'
      example:
        text: Please review this fraud report.
        context_url: https://static.api.apiture.com/dao/accountApplications/applications/c595c7f85ab257a063bc
        attachments:
          - id: 79e2721877a865eaeaf7
            contentType: application/pdf
            url: https://cdn.apiture.com/admin-documents/fb45d9c8ce9980bc5e96.pdf
            name: fraud-report-489fjk.pdf
      x-apiture-version: 1.0.0
    adminNoteItem:
      x-apiture-version: 1.0.1
      title: Admin Note Item (v1.0.1)
      description: Summary representation of an admin note resource in admin notes collections. To fetch the full representation of this admin note, use the [`getAdminNote`](#op-getAdminNote) operation, passing this item's `id` field as the `adminNoteId` path parameter.
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/adminNoteFields'
        - $ref: '#/components/schemas/createdAtField'
        - type: object
          required:
            - id
            - text
            - creator
            - createdAt
          properties:
            id:
              description: The unique identifier for this admin note resource. This is an immutable opaque string.
              allOf:
                - $ref: '#/components/schemas/readOnlyResourceId'
            creator:
              description: Who created this note.
              allOf:
                - $ref: '#/components/schemas/adminUserReference'
            attachments:
              description: Optional description of files attached to this note. This property is omitted if there are no attachments. Use the [`getAdminNoteAttachment`](#op-getAdminNoteAttachment) with the attachment `id` to fetch its content.
              type: array
              maxItems: 8
              items:
                $ref: '#/components/schemas/adminNoteAttachmentItem'
      example:
        id: 0399abed-fd3d
        text: Please review this fraud report.
        createdAt: '2023-04-19T10:49:28.375Z'
        creator:
          id: 0399abed-fd3d
          firstName: Benny
          lastName: Billings
          username: bbillings
          state: active
        attachments:
          - id: 0399abed-fd3d
            name: fraud-report-389398.pdf
            contentType: application/pdf
            url: https://cdn.apiture.com/admin-documents/fb45d9c8ce9980bc5e96.pdf
            contentLength: 276000
    adminNote:
      x-apiture-version: 1.0.1
      title: Admin Note (v1.0.1)
      description: Representation of admin note resources.
      allOf:
        - $ref: '#/components/schemas/adminNoteItem'
        - type: object
          required:
            - context_url
            - createdAt
          properties:
            context_url:
              $ref: '#/components/schemas/adminNoteContext_url'
      example:
        id: 0399abed-fd3d
        text: Please review this fraud report.
        createdAt: '2023-04-19T10:49:28.375Z'
        context_url: https://static.api.apiture.com/dao/accountApplications/applications/c595c7f85ab257a063bc
        creator:
          id: 0399abed-fd3d
          firstName: Benny
          lastName: Billings
          username: bbillings
          state: active
        attachments:
          - id: 0399abed-fd3d
            name: fraud-report-389398.pdf
            contentType: application/pdf
            url: https://cdn.apiture.com/admin-documents/fb45d9c8ce9980bc5e96.pdf
            contentLength: 276000
    adminNotes:
      x-apiture-version: 1.0.1
      title: Admin Note Collection (v1.0.1)
      description: Collection of admin notes. The items in the collection are ordered in the `items` array.
      allOf:
        - type: object
          required:
            - context_url
            - items
          properties:
            context_url:
              $ref: '#/components/schemas/adminNoteContext_url'
            items:
              description: An array containing admin note items.
              type: array
              maxItems: 10000
              items:
                $ref: '#/components/schemas/adminNoteItem'
      example:
        context_url: https://static.api.apiture.com/dao/accountApplications/applications/c595c7f85ab257a063bc
        items:
          - id: 0399abed-fd3d
            text: Please review this fraud report.
            createdAt: '2023-04-19T10:48:28.375Z'
            creator:
              id: 0399abed-fd3d
              firstName: Benny
              lastName: Billings
              username: bbillings
              state: active
            attachments:
              - id: 0399abed-fd3d
                name: fraud-report-389398.pdf
                contentType: application/pdf
                url: https://cdn.apiture.com/admin-documents/fb45d9c8ce9980bc5e96.pdf
                contentLength: 276000
          - id: 0399abed-fd3d
            text: Thanks!
            createdAt: '2023-04-19T10:50:04.375Z'
            creator:
              id: 0399abed-fd3d
              firstName: Benny
              lastName: Billings
              username: bbillings
              state: active
    adminNoteAttachmentFields:
      title: Admin Note Attachment Fields (v1.0.0)
      description: Common fields of the admin note attachment resource used to build other model schemas.
      x-apiture-fragment: true
      type: object
      properties:
        name:
          description: The name of this attachment.
          type: string
          format: text
          maxLength: 128
        contentType:
          description: The content type (media type) of the attachment. Media types with `*` wildcards are not allowed.
          type: string
          pattern: ^[-a-z0-9]{4,48}\/[-+a-z0-9.]{3,142}$
          minLength: 8
          maxLength: 191
          example: image/png
          allOf:
            - $ref: '#/components/schemas/adminNoteContentType'
        url:
          description: The URL of the attachment. This URL should be directly viewable by admin users without requiring an additional `Authorization` or other request headers.
          type: string
          format: uri
          maxLength: 2048
      x-apiture-version: 1.0.0
    newAdminNoteAttachment:
      title: New Admin Note Attachment (v1.0.0)
      description: An attachment to associate with this new admin note. The user must first upload the attachment via a document storage service and include the URL of the document here.
      type: object
      allOf:
        - $ref: '#/components/schemas/adminNoteAttachmentFields'
      required:
        - name
        - contentType
        - url
      example:
        contentType: application/pdf
        url: https://cdn.apiture.com/admin-documents/fb45d9c8ce9980bc5e96.pdf
        name: fraud-report-489fjk.pdf
      x-apiture-version: 1.0.0
    adminNoteAttachmentItem:
      title: Admin Note Attachment Item (v1.0.0)
      description: Summary representation of an admin note attachment in a list of admin note attachments.
      type: object
      allOf:
        - $ref: '#/components/schemas/adminNoteAttachmentFields'
        - type: object
          required:
            - id
            - name
            - contentType
            - url
            - contentLength
          properties:
            id:
              description: The unique identifier for this admin note attachment resource. This is an immutable opaque string.
              allOf:
                - $ref: '#/components/schemas/readOnlyResourceId'
            contentLength:
              description: The content length (size in bytes) of the attachment.
              type: integer
              format: int32
              readOnly: true
              minimum: 1
              maximum: 100000000
      example:
        id: 0399abed-fd3d
        name: fraud-report-389398.pdf
        contentType: application/pdf
        url: https://cdn.apiture.com/admin-documents/fb45d9c8ce9980bc5e96.pdf
        contentLength: 276000
      x-apiture-version: 1.0.0
    adminNoteContentType:
      title: Admin Note Content Type (v1.0.0)
      description: The list of allowed content types for admin notes.
      type: string
      enum:
        - text/plain
        - image/bmp
        - image/gif
        - image/png
        - image/jpeg
        - image/tiff
        - application/msword
        - application/pdf
        - application/vnd.openxmlformats-officedocument.wordprocessingml.document
      x-apiture-version: 1.0.0
    abstractBody:
      title: Abstract Body (v0.2.0)
      x-apiture-version: 0.2.0
      description: An abstract schema used to define other request and response body model schemas.
      x-apiture-fragment: true
      type: object
      properties: {}
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/abstractBody
    createdAtField:
      description: A field used to represent the `createdAt` date-time for a resource.
      x-apiture-fragment: true
      type: object
      properties:
        createdAt:
          description: The date-time when this resource was created, in [RFC 3339](https://tools.ietf.org/html/rfc3339) date-time `YYYY-MM-DDThh:mm:ss.sssZ` format, UTC. This is derived and immutable.
          $ref: '#/components/schemas/readOnlyTimestamp'
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/createdAtField
      x-apiture-version: 1.0.0
      title: ' (v1.0.0)'
    readOnlyResourceId:
      x-apiture-version: 1.0.1
      title: Read-only Resource Identifier (v1.0.1)
      description: The unique, opaque system-assigned identifier for a resource. This case-sensitive ID is also used in URLs as path parameters or in other properties or parameters that reference a resource by ID rather than URL. Resource IDs are immutable.
      readOnly: true
      allOf:
        - $ref: '#/components/schemas/resourceId'
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/readOnlyResourceId
    adminUserReference:
      title: Admin User Reference (v1.0.0)
      description: A small object representing an administrative user's login account.
      type: object
      required:
        - id
        - firstName
        - lastName
        - username
        - state
      properties:
        id:
          description: The immutable, unique, opaque identifier for the user.
          $ref: '#/components/schemas/readOnlyResourceId'
        firstName:
          description: The user's first name.
          type: string
          format: text
          maxLength: 56
        lastName:
          description: The user's last name.
          type: string
          format: text
          maxLength: 56
        username:
          description: The user's login username.
          type: string
          format: text
          maxLength: 255
        state:
          $ref: '#/components/schemas/adminUserState'
      example:
        id: 0399abed-fd3d
        firstName: Benny
        lastName: Billings
        username: bbillings
        state: active
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/adminUserReference
      x-apiture-version: 1.0.0
    readOnlyTimestamp:
      title: Read-Only Timestamp (v1.0.0)
      description: 'A readonly or derived timestamp (an instant in time) formatted in [RFC 3339](https://tools.ietf.org/html/rfc3339) `date-time` UTC format: `YYYY-MM-DDThh:mm:ss.sssZ`.'
      type: string
      minLength: 20
      maxLength: 30
      format: date-time
      readOnly: true
      example: '2021-10-30T19:06:04.250Z'
      x-apiture-since: 0.4.0
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/readOnlyTimestamp
      x-apiture-version: 1.0.0
    resourceId:
      x-apiture-version: 1.0.1
      title: Resource Identifier (v1.0.1)
      description: The unique, opaque system identifier for a resource. This case-sensitive ID is also used as path parameters in URLs or in other properties or parameters that reference a resource by ID rather than URL.
      type: string
      pattern: ^[-_:.~$a-zA-Z0-9]{6,48}$
      minLength: 6
      maxLength: 48
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/resourceId
    adminUserState:
      title: Admin User State (v1.0.0)
      description: |+
        The current state of the admin user.

        <strong><code>adminUserState</code></strong> strings may have one of the following
        [enumerated values](https://developer.apiture.com/docs/concepts/label-groups#enumerations):

        <table>
        <tr>
          <th>Value</th><th>Description</th>
        </tr>

        <tr>
            <td><strong><code>active</code></strong></td><td>Active: <p>The admin user is active</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>locked</code></strong></td><td>Locked: <p>The admin user&#39;s account is locked</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>removed</code></strong></td><td>Removed: <p>The admin user has been been removed from the system</p>
        </td>
            </tr>
        </table>

      type: string
      x-apiture-enum: adminUserState
      enum:
        - active
        - locked
        - removed
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/adminUserState
      x-apiture-version: 1.0.0
  securitySchemes:
    apiKey:
      type: apiKey
      name: API-Key
      in: header
      description: API Key based client identification. See details at [Secure Access](https://developer.apiture.com/docs/secure-access).
      x-resolved-from: ../../common/openapi.yaml#/components/securitySchemes/apiKey
    accessToken:
      type: openIdConnect
      description: OpenId Connect (OIDC) authentication/authorization. The client uses the `authorization_endpoint` and `token_endpoint` to obtain an access token to pass in the `Authorization` header. Those endpoints are available via the OIDC Configuration URL. The actual URL may vary with each financial institution. See details at [Secure Access](https://dx.apiture.com/docs/api/concepts/api-keys/).
      openIdConnectUrl: https://auth.apiture.com/oidc/.well-known/openid-configuration
      x-resolved-from: ../../common/openapi.yaml#/components/securitySchemes/accessToken
x-resolved-from: ../../adminNotes/status-codes-openapi.yaml
x-resolved-at: '2024-12-09T22:08:52.529Z'
x-apiture-annotated-at: '2024-12-09T22:08:52.735Z'
