openapi: 3.1.0
info:
  title: Admin Files
  description: |-
    The Files API provides a way to manage files within an application. Files have content that can be uploaded and viewed. Files also have metadata that describes the file. The file can be retrieved using the `url`.

    Files also contain details that are specific to the type of file. For instance, a file with a `type` of `image` will have a set of image specific metadata in the `image` property.
  version: 0.7.0
  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: bankingAdminFiles
servers:
  - url: /bankingAdmin
tags:
  - name: Files
    description: Files
paths:
  /files:
    get:
      summary: Return a list of files.
      description: Return a [paginated](https://developer.apiture.com/docs/concepts/pagination) collection of files. The [nextPage_url](https://developer.apiture.com/docs/concepts/links) in the response is a pagination link.
      operationId: listFiles
      x-apiture-api: bankingAdminFiles
      x-apiture-group: files
      tags:
        - Files
      security:
        - accessToken:
            - adminData/read
      parameters:
        - $ref: '#/components/parameters/startIndexQueryParam'
        - $ref: '#/components/parameters/limitQueryParam'
        - name: q
          in: query
          description: Optional search string. This search is case insensitive and will return files where any part of the name or description matches the search string. See "Using Search Strings" in the Admin Search API for details on searching for multiple words.
          schema:
            type: string
            format: text
            minLength: 1
            maxLength: 1000
        - name: sortBy
          description: The sort order for the items in the response. Use `?sortBy=updatedAt` or `?sortBy=-updatedAt` to sort by ascending or descending order of the file's `updatedAt` date.
          in: query
          style: form
          explode: false
          schema:
            type: array
            uniqueItems: true
            $comment: Defined as an array so we can pass multiple sort keys in the future.
            maxItems: 1
            minItems: 1
            items:
              description: The sort key defining which value to sort by. A `-` prefix means descending.
              type: string
              pattern: ^-?(createdAt|updatedAt|name)
              minLength: 4
              maxLength: 10
        - name: name
          in: query
          description: Return only files whose name equals this value. This search is case insensitive.
          schema:
            type: string
            format: text
            minLength: 3
            maxLength: 255
            pattern: ^[\w\-. ]{3,255}$
        - name: context
          in: query
          description: Return only files whose `context` equals this value. This search is case insensitive.
          schema:
            $ref: '#/components/schemas/resourceId'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/files'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/files'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: listFiles
    post:
      summary: Create a new file
      description: Create a new file.
      operationId: createFile
      x-apiture-api: bankingAdminFiles
      x-apiture-group: files
      tags:
        - Files
      security:
        - accessToken:
            - adminData/write
      requestBody:
        description: The data necessary to create a new file.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/newFile'
          application/vnd.restful+json:
            schema:
              $ref: '#/components/schemas/newFile'
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/file'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/file'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
            Location:
              description: The URI of the new file.
              schema:
                type: string
                format: uri-reference
                maxLength: 128
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '409':
          $ref: '#/components/responses/409FileContent'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: createFile
  /files/{fileId}:
    parameters:
      - $ref: '#/components/parameters/fileIdPathParam'
    get:
      summary: Fetch a representation of this file
      description: Return the JSON representation of the file metadata.
      operationId: getFile
      x-apiture-api: bankingAdminFiles
      x-apiture-group: files
      tags:
        - Files
      security:
        - accessToken:
            - adminData/read
      parameters:
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/file'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/file'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '304':
          $ref: '#/components/responses/304'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404File'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: getFile
    patch:
      summary: Update this file
      description: Perform a partial update of this file as per [JSON Merge Patch](https://datatracker.ietf.org/doc/html/rfc7396) format and processing rules. Only fields in the request body are updated on the resource; fields which are omitted are not updated.
      operationId: patchFile
      x-apiture-api: bankingAdminFiles
      x-apiture-group: files
      tags:
        - Files
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      requestBody:
        description: The file parameters to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/filePatch'
          application/vnd.restful+json:
            schema:
              $ref: '#/components/schemas/filePatch'
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/file'
            application/vnd.restful+json:
              schema:
                $ref: '#/components/schemas/file'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          $ref: '#/components/responses/409FileContent'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: patchFile
    delete:
      summary: Delete this file resource
      description: Delete this file resource and its content.
      operationId: deleteFile
      x-apiture-api: bankingAdminFiles
      x-apiture-group: files
      tags:
        - Files
      security:
        - accessToken:
            - adminData/write
      responses:
        '204':
          $ref: '#/components/responses/204'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404File'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: deleteFile
  /files/{fileId}/content:
    parameters:
      - $ref: '#/components/parameters/fileIdPathParam'
    get:
      summary: Fetch the file's content
      description: Return the content of the file. If the file was uploaded without any content, then return a 409 response.
      operationId: getFileContent
      x-apiture-api: bankingAdminFiles
      x-apiture-group: files
      tags:
        - Files
      security:
        - accessToken:
            - adminData/read
      parameters:
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK.
          content:
            text/html:
              schema:
                description: An HTML `<img>` tag with embedded image data (Base 64 encoded), such as ``` <img src='data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mNkYPhfz0AEYBxVSF+FAP5FDvcfRYWgAAAAAElFTkSuQmCC'> ```
                type: string
                format: html
                maxLength: 6500000
            '*/*':
              schema:
                description: The raw bytes of the file contents.
                $ref: '#/components/schemas/adminFileContent'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
        '304':
          $ref: '#/components/responses/304'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404File'
        '409':
          description: |
            Conflict.

            This problem response may have one of the following `type` values:
            * [`https://static.api.apiture.com/errors/missingFileContent/v1.0.0`](https://static.api.apiture.com/errors/missingFileContent/v1.0.0)<br>
              The given file is valid but has no content.
              Remediation: Set content on the file and retry the operation.
          x-apiture-errors:
            - missingFileContent
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problemResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/problemResponse'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: getFileContent
    put:
      summary: Update the file's content.
      description: Replace the content of this file.
      operationId: setFileContent
      x-apiture-api: bankingAdminFiles
      x-apiture-group: files
      tags:
        - Files
      security:
        - accessToken:
            - adminData/write
      parameters:
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      requestBody:
        content:
          '*/*':
            schema:
              description: The raw bytes of the file contents.
              $ref: '#/components/schemas/adminFileContent'
      responses:
        '204':
          description: No Content. The file content was successfully uploaded.
          $ref: '#/components/responses/204'
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
            Location:
              description: The URI of the new file content.
              schema:
                type: string
                format: uri-reference
                maxLength: 255
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404File'
        '409':
          $ref: '#/components/responses/409FileContent'
        '412':
          $ref: '#/components/responses/412'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        4XX:
          $ref: '#/components/responses/4XX'
        5XX:
          $ref: '#/components/responses/5XX'
      x-apiture-permission: setFileContent
components:
  securitySchemes:
    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
  responses:
    '204':
      description: No Content. The operation succeeded but returned no response body.
      x-resolved-from: ../../common/openapi.yaml#/components/responses/204
    '304':
      description: Not Modified. The resource has not been modified since it was last fetched.
      x-resolved-from: ../../common/openapi.yaml#/components/responses/304
    '400':
      description: |
        Bad Request. The request body, request headers, and/or query parameters are not well-formed.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/badRequest/v1.0.0`](https://static.api.apiture.com/errors/badRequest/v1.0.0)<br>
          The request body and/or parameters was not well-formed.
          Remediation: Correct any syntax or schema errors in the request body or parameters.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/badRequest'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/badRequest/v1.0.0
              title: Bad Request
              status: 400
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: Input did not parse as JSON
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/badRequest/v1.0.0
              title: Bad Request
              status: 400
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: Input did not parse as JSON
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/400
    '401':
      description: |
        Unauthorized. The operation requires authentication but no authentication or insufficient authentication was given.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/unauthorized/v1.0.0`](https://static.api.apiture.com/errors/unauthorized/v1.0.0)<br>
          The request lacks valid authentication credentials for the target resource or operation.
          Remediation: Authenticate the user and pass the required authorization with the request.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/unauthorized'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/unauthorized/v1.0.0
              title: Unauthorized
              status: 401
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request lacks valid authentication credentials
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/unauthorized/v1.0.0
              title: Unauthorized
              status: 401
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request lacks valid authentication credentials
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/401
    '403':
      description: |
        Forbidden. The authenticated caller is not authorized to perform the requested operation.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/forbidden/v1.0.0`](https://static.api.apiture.com/errors/forbidden/v1.0.0)<br>
          The user or agent is not allowed to perform this operation; authentication credentials were provided in the request, but the server considers them insufficient to grant access.
          Remediation: Check the user's permissions and entitlements before attempting the operation.

        * [`https://static.api.apiture.com/errors/customerDisabled/v1.0.0`](https://static.api.apiture.com/errors/customerDisabled/v1.0.0)<br>
          The customer is disabled.
          Remediation: Have the customer contact the financial institution for support.

        * [`https://static.api.apiture.com/errors/antiMalwareRequired/v1.0.0`](https://static.api.apiture.com/errors/antiMalwareRequired/v1.0.0)<br>
          The financial institution requires the customer to have anti-malware software installed.
          Remediation: Direct the user to the software requirements guide to install the correct anti-malware software.

        * [`https://static.api.apiture.com/errors/modificationForbidden/v1.0.0`](https://static.api.apiture.com/errors/modificationForbidden/v1.0.0)<br>
          The customer is properly authenticated but not authorized to create, modify, or delete resources.
          Remediation: Avoid modification operation for customers with read-only authorization.

        * [`https://static.api.apiture.com/errors/challengeRequired/v1.0.0`](https://static.api.apiture.com/errors/challengeRequired/v1.0.0)<br>
          The operation requires the customer to complete an identity challenge.
          Remediation: Complete the challenge as per the problem response, and add an additional `Challenge` header to the call.
        The `attributes` object in the error may have the properties defined by the [`requiredIdentityChallenge` schema](#schema-requiredIdentityChallenge).
        * [`https://static.api.apiture.com/errors/challengeBlocked/v1.0.0`](https://static.api.apiture.com/errors/challengeBlocked/v1.0.0)<br>
          The user has failed challenges too many times and is blocked from attempting more or performing operations which require additional authentication.
          Remediation: Have the user end their login session and login again.

        * [`https://static.api.apiture.com/errors/noIdentityChallengeFactors/v1.0.0`](https://static.api.apiture.com/errors/noIdentityChallengeFactors/v1.0.0)<br>
          This operation requires an identity challenge, but the user does not have the necessary registered authentication factors.
          Remediation: Have the user register one or more challenge security code delivery factors.

        * [`https://static.api.apiture.com/errors/invalidIdentityChallengeHeader/v1.0.0`](https://static.api.apiture.com/errors/invalidIdentityChallengeHeader/v1.0.0)<br>
          The additional on-time `Challenge` header in this request is expired, already used, or otherwise invalid.
          Remediation: Supply a valid, unexpired, unclaimed `Challenge` header in the request.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/forbidden'
        - $ref: '#/components/x-apiture-errors/customerDisabled'
        - $ref: '#/components/x-apiture-errors/antiMalwareRequired'
        - $ref: '#/components/x-apiture-errors/modificationForbidden'
        - $ref: '#/components/x-apiture-errors/challengeRequired'
        - $ref: '#/components/x-apiture-errors/challengeBlocked'
        - $ref: '#/components/x-apiture-errors/noIdentityChallengeFactors'
        - $ref: '#/components/x-apiture-errors/invalidIdentityChallengeHeader'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/forbidden/v1.0.0
              title: Forbidden
              status: 403
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request has valid authentication, but the authenticated agent is forbidden from accessing this resource or operation
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/forbidden/v1.0.0
              title: Forbidden
              status: 403
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request has valid authentication, but the authenticated agent is forbidden from accessing this resource or operation
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/403
    '404':
      description: |
        Not found. There is no such resource at the request URL.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/notFound/v1.0.0`](https://static.api.apiture.com/errors/notFound/v1.0.0)<br>
          The resource at the requested URL does not exist.
          Remediation: Use the URL of an existing resource.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/notFound'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/notFound/v1.0.0
              title: Not Found
              status: 404
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The resource at the request URL does not exist.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/notFound/v1.0.0
              title: Not Found
              status: 404
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The resource at the request URL does not exist.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/404
    '412':
      description: |
        Precondition Failed. One or more conditions given in the request header fields evaluated to false when tested on the server.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/preconditionFailed/v1.0.0`](https://static.api.apiture.com/errors/preconditionFailed/v1.0.0)<br>
          One or more conditions given in the request header fields evaluated to false when tested on the server.
          Remediation: Update resources and use it's most recent ETag or modification time stamp.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/preconditionFailed'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
      x-resolved-from: ../../common/openapi.yaml#/components/responses/412
    '422':
      description: |
        Unprocessable Entity. The request body and/or query parameters were well-formed but otherwise invalid.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/unprocessableEntity/v1.0.0`](https://static.api.apiture.com/errors/unprocessableEntity/v1.0.0)<br>
          The syntax of the request entity is correct but was unable to process the contained instructions.
          Remediation: Provide a semantically correct request.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/unprocessableEntity'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/unprocessableEntity/v1.0.0
              title: Unprocessable Entity
              status: 422
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request body and/or query parameters were well-formed but otherwise invalid.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/unprocessableEntity/v1.0.0
              title: Unprocessable Entity
              status: 422
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The request body and/or query parameters were well-formed but otherwise invalid.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/422
    '429':
      description: |
        Too Many Requests. The client has sent too many requests in a given amount of time.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/tooManyRequests/v1.0.0`](https://static.api.apiture.com/errors/tooManyRequests/v1.0.0)<br>
          The client has sent too many requests in a given amount of time, exceeding rate limiting.
          Remediation: Slow down the rate of API calls.
      x-apiture-errors:
        - $ref: '#/components/x-apiture-errors/tooManyRequests'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/tooManyRequests/v1.0.0
              title: Too Many Requests
              status: 429
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The user has sent too many requests in a given amount of time.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/tooManyRequests/v1.0.0
              title: Too Many Requests
              status: 429
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The user has sent too many requests in a given amount of time.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/429
    404File:
      description: Not Found. There is no such file resource at the specified `{fileId}`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
    409FileContent:
      description: |
        Conflict.

        This problem response may have one of the following `type` values:
        * [`https://static.api.apiture.com/errors/missingFileContent/v1.0.0`](https://static.api.apiture.com/errors/missingFileContent/v1.0.0)<br>
          The given file is valid but has no content.
          Remediation: Set content on the file and retry the operation.

        * [`https://static.api.apiture.com/errors/duplicateFileContent/v1.0.0`](https://static.api.apiture.com/errors/duplicateFileContent/v1.0.0)<br>
          The given file content is valid but has already been uploaded.
          Remediation: Use the existing copy of the given file or delete the existing file and resubmit the upload request.
      x-apiture-errors:
        - missingFileContent
        - duplicateFileContent
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
    4XX:
      description: Client Request Problem. The client request had a problem not listed under another specific 400-level HTTP response code. View the `detail` in the problem response for additional details.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/methodNotAllowed/v1.0.0
              title: Method Not Allowed
              status: 405
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: This HTTP method is not allowed for the given resource URL.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/methodNotAllowed/v1.0.0
              title: Method Not Allowed
              status: 405
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: This HTTP method is not allowed for the given resource URL.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/4XX
    5XX:
      description: Server Problem. The server encountered a problem not listed under another specific 500-level HTTP response code. View the `detail` in the problem response for additional details.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/gatewayTimeout/v1.0.0
              title: Insufficient Storage
              status: 507
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The server is unable to store the representation needed to successfully complete the request.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
        application/json:
          schema:
            $ref: '#/components/schemas/problemResponse'
            example:
              id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
              type: https://static.api.apiture.com/errors/gatewayTimeout/v1.0.0
              title: Insufficient Storage
              status: 507
              occurredAt: '2022-04-25T12:42:21.375Z'
              detail: The server is unable to store the representation needed to successfully complete the request.
              instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/responses/5XX
  schemas:
    fileType:
      title: File Type (v1.0.0)
      description: The file type.
      type: string
      enum:
        - image
        - document
        - other
      x-apiture-version: 1.0.0
    imageFile:
      title: Image File (v1.0.0)
      description: Properties of files whose `type` is `image`. These are derived from the uploaded image.
      type: object
      properties:
        width:
          description: The width of the image, in pixels.
          type: integer
          format: int32
          minimum: 0
          maximum: 8192
        height:
          description: The height of the image, in pixels.
          type: integer
          format: int32
          minimum: 0
          maximum: 8192
        thumbnail_url:
          description: The URL where the thumbnail is located. This must be publicly accessible without authentication.
          type: string
          format: uri
          maxLength: 400
      x-apiture-version: 1.0.0
    immutableFileFields:
      title: Immutable File Fields (v1.0.0)
      description: Fields used to define other File schemas.
      x-apiture-fragment: true
      type: object
      properties:
        id:
          description: The ID of the file.
          allOf:
            - $ref: '#/components/schemas/readOnlyResourceId'
        size:
          description: The size of the file, in bytes. The maximum length constraint allows for a (non-Base64 encoded) file of at most 6,500,000 bytes.
          type: integer
          format: int32
          minimum: 0
          maximum: 6500000
        url:
          description: The URL where the file is located. This must be publicly accessible without authentication.
          type: string
          format: uri
          maxLength: 400
          example: http://cdn.apiture.com/files/ad-images/ab45d9c8ce1280bc5eab.jpeg
        image:
          $ref: '#/components/schemas/imageFile'
        createdAt:
          description: The date-time when the resource was last updated, in [RFC 3339](https://tools.ietf.org/html/rfc3339) date-time `YYYY-MM-DDThh:mm:ss.sssZ` format, UTC. This is derived and immutable.
          allOf:
            - $ref: '#/components/schemas/readOnlyTimestamp'
        createdBy:
          description: The user that created this resource.
          allOf:
            - $ref: '#/components/schemas/userAccountReference'
        updatedAt:
          description: The date-time when the resource was last updated, in [RFC 3339](https://tools.ietf.org/html/rfc3339) date-time `YYYY-MM-DDThh:mm:ss.sssZ` format, UTC. This is derived and immutable.
          allOf:
            - $ref: '#/components/schemas/readOnlyTimestamp'
        updatedBy:
          description: The user that last updated this resource.
          allOf:
            - $ref: '#/components/schemas/userAccountReference'
      x-apiture-version: 1.0.0
    fileFields:
      x-apiture-version: 1.3.0
      title: File Fields (v1.3.0)
      description: Common fields of the file resource used to build other model schemas.
      type: object
      x-apiture-fragment: true
      properties:
        name:
          description: The name of the file. The name does not need to be unique.
          type: string
          format: text
          minLength: 3
          maxLength: 255
          pattern: ^[\w\-. ]{3,255}$
        description:
          description: The description of this file.
          type: string
          format: text
          minLength: 3
          maxLength: 500
        contentType:
          $ref: '#/components/schemas/contentType'
        type:
          $ref: '#/components/schemas/fileType'
        publish:
          description: If `true`, the file should be publicly published. This defaults to `true` if the file `type` is `image` and defaults to `false` otherwise.
          type: boolean
        context:
          description: An optional string which identifies the client application or system that owns the file. This allows different application/systems to segregate their files from the files of others.
          $ref: '#/components/schemas/readOnlyResourceId'
    newFile:
      x-apiture-version: 1.4.0
      title: New File (v1.4.0)
      description: Representation used to create a new file.
      required:
        - name
        - type
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/fileFields'
        - type: object
          properties:
            content:
              description: The encoded content of the file to create. This is not required since the file can be uploaded after creation using the [`setFileContent`](#op-setFileContent) operation
              allOf:
                - $ref: '#/components/schemas/encodedAdminFileContent'
      example:
        name: advertisement.png
        description: An advertisement to display on a web page.
        type: image
        contentType: image/png
        content: iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mNkYPhfz0AEYBxVSF+FAP5FDvcfRYWgAAAAAElFTkSuQmCC
        context: campaignAds
        publish: true
    filePatch:
      x-apiture-version: 1.3.0
      title: File Patch (v1.3.0)
      description: Request to patch a file.
      allOf:
        - $ref: '#/components/schemas/fileFields'
        - type: object
          properties:
            content:
              description: The encoded content of the file to create. This is not required since the file can be uploaded after creation using the [`setFileContent`](#op-setFileContent) operation
              allOf:
                - $ref: '#/components/schemas/encodedAdminFileContent'
      example:
        name: advertisement.png
        description: An advertisement to display on a web page.
        type: image
        contentType: image/png
        content: iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mNkYPhfz0AEYBxVSF+FAP5FDvcfRYWgAAAAAElFTkSuQmCC
        context: campaignAds
        publish: true
    file:
      x-apiture-version: 1.3.0
      title: File (v1.3.0)
      description: Metadata about the file resource.
      type: object
      required:
        - id
        - name
        - type
        - size
        - createdBy
        - createdAt
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/fileFields'
        - $ref: '#/components/schemas/immutableFileFields'
      example:
        id: 1cd2f01c-a9d9
        name: advertisement.jpeg
        description: An advertisement to display on a web page.
        type: image
        contentType: image/jpeg
        publish: true
        image:
          width: 1028
          height: 1028
          thumbnail_url: http://cdn.apiture.com/files/ab45d9c8ce1280bc5eaa.jpeg
        size: 1000000
        url: http://cdn.apiture.com/files/ab45d9c8ce1280bc5eab.jpeg
        createdAt: '2024-07-27T08:15:24.125Z'
        createdBy:
          id: 22707c1196c6f1c6938a
          username: TheUploader
          firstName: Phil
          lastName: Alexander
        updatedAt: '2024-07-27T08:15:24.125Z'
        updatedBy:
          id: 22707c1196c6f1c6938a
          username: TheUploader
          firstName: Phil
          lastName: Alexander
        context: campaignAds
    fileItem:
      x-apiture-version: 1.3.0
      title: File Item (v1.3.0)
      description: Summary representation of a file resource in the files collections. To fetch the full representation of the `file`, use the [`getFile`](#op-getFile) operation, passing this item's `id` field as the `fileId` path parameter.
      required:
        - id
        - name
        - type
        - size
        - createdBy
        - createdAt
        - updatedBy
        - updatedAt
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/fileFields'
        - $ref: '#/components/schemas/immutableFileFields'
      example:
        id: 1cd2f01c-a9d9
        name: advertisement.jpeg
        description: An advertisement to display on a web page.
        type: image
        contentType: image/jpeg
        context: campaignAds
        publish: true
        image:
          width: 1028
          height: 1028
          thumbnail_url: http://cdn.apiture.com/files/ab45d9c8ce1280bc5eaa.jpeg
        size: 1000000
        url: http://cdn.apiture.com/files/ab45d9c8ce1280bc5eab.jpeg
        createdAt: '2024-07-27T08:15:24.125Z'
        createdBy:
          id: 22707c1196c6f1c6938a
          username: TheUploader
          firstName: Phil
          lastName: Alexander
        updatedAt: '2024-07-27T08:15:24.125Z'
        updatedBy:
          id: 22707c1196c6f1c6938a
          username: TheUploader
          firstName: Phil
          lastName: Alexander
    files:
      x-apiture-version: 1.3.0
      title: File Collection (v1.3.0)
      description: Collection of files. The items in the collection are ordered in the `items` array. The response object may contain the `nextPage_url` pagination link.
      required:
        - items
      allOf:
        - $ref: '#/components/schemas/abstractIndexPagedBody'
        - type: object
          properties:
            items:
              description: An array containing a page of files.
              type: array
              maxItems: 1000
              items:
                $ref: '#/components/schemas/fileItem'
            count:
              description: The total number of files which satisfy the request filters. This is optional and only included if the service can calculate it.
              type: integer
              format: int32
              minimum: 0
              maximum: 1000000
      example:
        start: 0
        limit: 10
        count: 2240
        nextPage_url: https://static.api.apiture.com/bankingAdmin/files?start=2117a4dcedb842cab7316cef1ac8b58c&limit=10
        items:
          - id: 1cd2f01c-a9d9
            name: advertisement.jpeg
            description: An advertisement to display on a web page.
            type: image
            contentType: image/jpeg
            context: campaignAds
            publish: true
            image:
              width: 1028
              height: 1028
              thumbnail_url: http://cdn.apiture.com/files/ab45d9c8ce1280bc5eaa.jpeg
            size: 1000000
            url: http://cdn.apiture.com/files/ab45d9c8ce1280bc5eab.jpeg
            createdAt: '2024-07-27T08:15:24.125Z'
            createdBy:
              id: 22707c1196c6f1c6938a
              username: TheUploader
              firstName: Phil
              lastName: Alexander
            updatedAt: '2024-07-27T08:15:24.125Z'
            updatedBy:
              id: 22707c1196c6f1c6938a
              username: TheUploader
              firstName: Phil
              lastName: Alexander
          - id: eee05d39-8a92
            name: header.jpeg
            description: An advertisement to display in a header.
            type: image
            contentType: image/jpeg
            context: campaignAds
            publish: true
            image:
              width: 1028
              height: 1028
              thumbnail_url: http://cdn.apiture.com/files/ixuluktl1efawtcyfx1q.jpeg
            size: 1000000
            url: http://cdn.apiture.com/files/ugbuoesbreajto86qzgbtw.jpeg
            createdAt: '2024-07-27T08:15:24.125Z'
            createdBy:
              id: 22707c1196c6f1c6938a
              username: TheUploader
              firstName: Phil
              lastName: Alexander
            updatedAt: '2024-07-27T08:15:24.125Z'
            updatedBy:
              id: 22707c1196c6f1c6938a
              username: TheUploader
              firstName: Phil
              lastName: Alexander
    adminFileContent:
      title: Admin File Content (v1.0.0)
      description: The raw data bytes of the file's content. The maximum length constraint allows for a file of at most 6,500,000 bytes.
      type: string
      format: binary
      maxLength: 6500000
      example: 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 0a 00 00 00 0a 08 06 00 00 00 8d 32 cf bd 00 00 00 15 49 44 41 54 78 da 63 64 60 f8 5f cf 40 04 60 1c 55 48 5f 85 00 fe 45 0e f7 1f 45 85 a0 00 00 00 00 49 45 4e 44 ae 42 60 82
      x-apiture-version: 1.0.0
    encodedAdminFileContent:
      title: Encoded Admin File Content (v1.0.0)
      description: The [Base64-encoded](https://en.wikipedia.org/wiki/Base64) content of the file. The maximum length constraint allows for a file of at most 6,500,000 bytes.
      type: string
      format: byte
      contentEncoding: base64
      maxLength: 8775000
      example: iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mNkYPhfz0AEYBxVSF+FAP5FDvcfRYWgAAAAAElFTkSuQmCC
      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
    problemResponse:
      title: Problem Response (v0.4.1)
      x-apiture-version: 0.4.1
      description: API problem or error response, as per [RFC 9457 application/problem+json](https://tools.ietf.org/html/rfc9457).
      type: object
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/apiProblem'
      example:
        id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
        type: https://static.api.apiture.com/errors/noSuchAccount/v1.0.0
        title: Account Not Found
        status: 422
        occurredAt: '2022-04-25T12:42:21.375Z'
        detail: No account exists for the given account reference
        instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/problemResponse
    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
    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
    userAccountReference:
      x-apiture-version: 2.0.0
      title: User Account Reference (v2.0.0)
      description: The representation of a user account.
      type: object
      required:
        - id
        - firstName
        - lastName
        - username
      properties:
        id:
          description: The immutable, unique, opaque identifier for the user.
          $ref: '#/components/schemas/resourceId'
        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 name.
          $ref: '#/components/schemas/customerUsername'
      example:
        id: 0399abed-fd3d
        firstName: Benny
        lastName: Billings
        username: bbillings
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/userAccountReference
    contentType:
      x-apiture-version: 1.0.1
      title: Content Type (v1.0.1)
      description: The [media type](https://tools.ietf.org/html/rfc6838) of a file.
      type: string
      minLength: 8
      maxLength: 191
      pattern: ^[-a-z0-9]{4,48}\/[-+a-z0-9.]{3,142}$
      example: application/pdf
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/contentType
    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
    abstractIndexPagedBody:
      title: Abstract Index Paged Body (v0.4.1)
      x-apiture-version: 0.4.1
      description: An abstract schema used to define paginated collections of resources. Collection classes which extend this schema define an array of `items` which represent a page of data.
      type: object
      x-apiture-fragment: true
      allOf:
        - $ref: '#/components/schemas/abstractBody'
        - $ref: '#/components/schemas/abstractPagedBodyFields'
        - type: object
          properties:
            start:
              description: The index of the first item in this page. 0 represents the index of the first item in the collection.
              type: integer
              format: int64
              minimum: 0
              maximum: 4000000000
      example:
        nextPage_url: https://static.api.apiture.com/banking/resources?start=200&limit=100
        start: 100
        limit: 100
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/abstractIndexPagedBody
    apiProblem:
      x-apiture-version: 1.2.1
      title: API Problem (v1.2.1)
      description: API problem or error, as per [RFC 7807 application/problem+json](https://tools.ietf.org/html/rfc7807).
      type: object
      properties:
        type:
          type: string
          format: uri-reference
          description: |
            A [URI reference (RFC3986)](https://tools.ietf.org/html/rfc3986) that identifies the problem type. If present, this is the URL of human-readable HTML documentation for the problem type. When this member is not present, its value is assumed to be `"about:blank"`.
          example: https://static.api.apiture.com/errors/forbidden/v1.0.0
          maxLength: 2048
        title:
          type: string
          description: |
            A short, human-readable summary of the problem type. The title is usually the same for all problem with the same `type`.
          maxLength: 120
          format: text
          example: User is not authorized to perform the requested action or access the requested resource.
        status:
          type: integer
          format: int32
          description: |
            The [HTTP status code](https://datatracker.ietf.org/doc/html/rfc7231#section-6) for this occurrence of the problem.
          minimum: 100
          maximum: 599
          example: 403
        detail:
          type: string
          description: |
            A human-readable explanation specific to this occurrence of the problem.
          maxLength: 256
          format: text
          example: User is not authorized to perform this operation.
        instance:
          type: string
          format: uri-reference
          description: |
            A URI reference that identifies the specific occurrence of the problem. This is the URI of an API resource that the problem is related to, with a unique error correlation ID URI fragment
          example: https://prduction.api.apiture.com/banking/accounts/ad80fc3e722q5402a#189c13ff-c54c-45f7-b8e0-c88984ba724d
          maxLength: 2048
        id:
          description: The unique identifier for this problem. This is an immutable opaque string.
          $ref: '#/components/schemas/readOnlyResourceId'
        occurredAt:
          description: The timestamp when the problem occurred, in [RFC 3339](https://tools.ietf.org/html/rfc3339) date-time `YYYY-MM-DDThh:mm:ss.sssZ` format, UTC.
          $ref: '#/components/schemas/readOnlyTimestamp'
        problems:
          description: Optional root-causes if there are multiple problems in the request or API call processing.
          type: array
          maxItems: 128
          items:
            $ref: '#/components/schemas/apiProblem'
        attributes:
          type: object
          description: Additional optional attributes related to the problem. This data conforms to the schema associated with the error type.
      example:
        id: 3fbad566-be86-4b22-9ba6-3ca99fdc0799
        type: https://static.api.apiture.com/errors/accountNotFound/v1.0.0
        title: Account Not Found
        status: 422
        occurredAt: '2022-04-25T12:42:21.375Z'
        detail: No account exists at the given account_url
        instance: https://static.api.apiture.com/banking/transfers/bb709151-575041fcd617
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/apiProblem
    entityTag:
      title: Entity Tag (v1.0.0)
      description: An strong or weak [HTTP Entity Tag (ETag)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag). Strong ETags take the form `"{printable-non-control-ASCII-characters}"` but for backwards compatibility the surrounding double quotes are optional. Weak ETags take the form `W/"{printable-non-control-ASCII-characters}"`.
      type: string
      minLength: 3
      maxLength: 512
      pattern: ^(([\x21\x23-\x7e]{1,512})|(W\/\"[\x21\x23-\x7e]{1,509}\"))$
      example: W/"325cf1cc-e370-4baf-8faf-c6db23f195a2"
      x-apiture-version: 1.0.0
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/entityTag
    customerUsername:
      x-apiture-version: 2.0.0
      title: Customer Username (v2.0.0)
      description: A customer's login username.
      type: string
      format: text
      minLength: 5
      maxLength: 20
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/customerUsername
    abstractPagedBodyFields:
      x-apiture-version: 1.1.1
      title: Abstract Paged Body Fields (v1.1.1)
      description: Common properties of collection page responses.
      x-apiture-fragment: true
      type: object
      required:
        - limit
      properties:
        limit:
          description: The number of items requested for this page response. The length of the `items` array may be less that `limit`.
          type: integer
          format: int32
          minimum: 0
          maximum: 10000
        nextPage_url:
          description: The URL of the next page of resources. If this URL is omitted, there are no more resources in the collection.
          readOnly: true
          maxLength: 8000
          type: string
          format: uri-reference
          example: https://static.api.apiture.com/banking/resources/8b76b4a97dccad88890e
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/abstractPagedBodyFields
    requiredIdentityChallenge:
      x-apiture-version: 1.2.3
      title: Required Challenge (v1.2.3)
      description: A request from the service for the user to verify their identity. This contains a challenge ID, the corresponding operation ID, and a list of challenge factors for identity verification. The user must complete one of these challenge factors to satisfy the challenge. This schema defines the attributes in the 401 [Unauthorized problem response](#schema-apiProblem) when the 401 problem type name is `challengeRequired`. See the "Challenge API" for details.
      type: object
      required:
        - operationId
        - challengeId
        - factors
      properties:
        operationId:
          $ref: '#/components/schemas/challengeOperationId'
        challengeId:
          description: The unique ID of this challenge instance. This is an opaque string. This is passed when starting a challenge factor or when validating the identity challenge responses.
          $ref: '#/components/schemas/readOnlyResourceId'
        factors:
          description: 'A list of challenge factors. The user must complete one of these challenge factors. The `labels` in each factor identify one or more channels the user may use, such as a list of email addresses the system may use to send a one-time passcode to the user. ***Note**: The same channel may be used by multiple factors in the array of factors. For example, the user''s primary mobile phone number may be used for both an `sms` factor and a `voice` factor.'
          type: array
          minItems: 1
          maxItems: 8
          items:
            $ref: '#/components/schemas/challengeFactor'
      example:
        operationId: createTransfer
        challengeId: 0504076c566a3cf7009c
        factors:
          - type: sms
            labels:
              - '9876'
            id: 85c0ee5753fcd0b0953f
          - type: voice
            labels:
              - '9876'
            id: d089e10a80a8627df37b
          - type: voice
            labels:
              - '6754'
            id: 10506ecf9d1c2ee00403
          - type: email
            labels:
              - an****nk@example.com
              - an****98@example.com
            id: e917d671cb2f030b56f1
          - type: authenticatorToken
            labels:
              - Acme fob
            id: fe6c452d7da0bbb4e407
          - type: securityQuestions
            securityQuestions:
              questions:
                - id: q1
                  prompt: What is your mother's maiden name?
                - id: q4
                  prompt: What is your high school's name?
                - id: q9
                  prompt: What is the name of your first pet?
            id: df33c6f88a37d6b3f0a6
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/requiredIdentityChallenge
    challengeOperationId:
      x-apiture-version: 1.0.1
      title: Challenge Operation ID (v1.0.1)
      description: The ID of an operation/action for which the user must verify their identity via an identity challenge. This is passed when starting a challenge factor or when validating the identity challenge responses.
      type: string
      pattern: ^[-a-zA-Z0-9$_]{6,48}$
      minLength: 6
      maxLength: 48
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeOperationId
    challengeFactor:
      x-apiture-version: 1.2.1
      title: Challenge Factor (v1.2.1)
      description: A challenge factor. See [`requiredIdentityChallenge`](#schema-requiredIdentityChallenge) for multiple examples.
      type: object
      required:
        - type
      properties:
        id:
          description: |-
            The ID of an a challenge factor. This ID is unique within the challenge factors associated with a challenge. The client should pass this `id` value as the `factorId` when starting or verifying a challenge factor.

            *Note*: The `id` will become `required` in a future update to this schema.
          $ref: '#/components/schemas/challengeFactorId'
        type:
          $ref: '#/components/schemas/challengeFactorType'
        labels:
          description: A list of text label which identifies the channel(s) through which the user completes the challenge. For an `sms` or `voice` challenge, the only label item is the last four digits of the corresponding phone number. For an `email` challenge, each label is the masked email address.
          type: array
          minItems: 1
          maxItems: 4
          items:
            type: string
            maxLength: 300
            format: text
        securityQuestions:
          $ref: '#/components/schemas/challengeSecurityQuestions'
      example:
        type: sms
        labels:
          - '9876'
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeFactor
    challengeFactorId:
      title: Challenge Factor ID (v1.0.0)
      description: The ID of an a challenge factor. This ID is unique within the factors offered with a challenge.
      type: string
      pattern: ^[-a-zA-Z0-9$_]{3,48}$
      minLength: 3
      maxLength: 48
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeFactorId
      x-apiture-version: 1.0.0
    challengeFactorType:
      title: Challenge Factor Type (v1.0.0)
      description: |+
        The name of challenge factor.

        <strong><code>challengeFactorType</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>sms</code></strong></td><td>SMS: <p>One-time passcode sent to the primary mobile phone number</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>email</code></strong></td><td>Email: <p>One-time passcode sent to the primary email address</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>voice</code></strong></td><td>Voice: <p>One-time passcode communicated via automated voice phone call</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>authenticatorToken</code></strong></td><td>authenticator Token: <p>One-time passcode issued by a pre-registered hardware device, such as a token key fob, or an authenticator app</p>
        </td>
            </tr>
        <tr>
            <td><strong><code>securityQuestions</code></strong></td><td>Security Questions: <p>Prompt with the user&#39;s security questions registered with their security profile</p>
        </td>
            </tr>
        </table>

      type: string
      x-apiture-enum: challengeFactorType
      enum:
        - sms
        - email
        - voice
        - securityQuestions
        - authenticatorToken
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeFactorType
      x-apiture-version: 1.0.0
    challengeSecurityQuestions:
      x-apiture-version: 1.0.1
      title: Challenge Security Questions (v1.0.1)
      description: Describes a `securityQuestions` challenge. This is omitted if the challenge `type` is not `securityQuestions`.
      type: object
      required:
        - questions
      properties:
        questions:
          description: The array of security questions.
          type: array
          minItems: 1
          maxItems: 8
          items:
            $ref: '#/components/schemas/challengeSecurityQuestion'
      example:
        questions:
          - id: q1
            prompt: What is your mother's maiden name?
          - id: q4
            prompt: What is your high school's name?
          - id: q9
            prompt: What is the name of your first pet?
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeSecurityQuestions
    challengeSecurityQuestion:
      x-apiture-version: 1.0.1
      title: Challenge Security Question (v1.0.1)
      description: A single security question within the `questions` array of the [`challengeSecurityQuestions`](#schema-challengeSecurityQuestions)
      type: object
      required:
        - id
        - prompt
      properties:
        id:
          description: The unique ID of security question prompt. This should be included in the [`challengeVerification`](#schema-challengeVerification) response as the `promptId`.
          $ref: '#/components/schemas/challengePromptId'
        prompt:
          description: The text prompt of this security question.
          type: string
          format: text
          maxLength: 80
      example:
        id: 74699fa628911e762ea5
        prompt: What is your mother's maiden name?
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengeSecurityQuestion
    challengePromptId:
      title: Challenge Prompt ID (v1.0.0)
      description: The unique ID of a prompt (such as a security question) in a challenge factor.
      type: string
      pattern: ^[-_:.~$a-zA-Z0-9]+$
      minLength: 1
      maxLength: 48
      x-resolved-from: ../../common/openapi.yaml#/components/schemas/challengePromptId
      x-apiture-version: 1.0.0
  parameters:
    fileIdPathParam:
      name: fileId
      description: The unique identifier of this file. This is an opaque string.
      in: path
      schema:
        $ref: '#/components/schemas/resourceId'
      required: true
    startIndexQueryParam:
      name: start
      in: query
      description: The zero-based index of the first {{item}} item to include in this page. Omit this or pass 0 to start at the beginning of the collection. The services automatically passes the `?start=` parameter on the `nextPage_url`.
      schema:
        type: integer
        format: int64
        minimum: 0
        maximum: 4000000000
        default: 0
      x-resolved-from: ../../common/openapi.yaml#/components/parameters/startIndexQueryParam
    limitQueryParam:
      name: limit
      in: query
      description: The maximum number of items to return in this paged response.
      schema:
        type: integer
        format: int32
        minimum: 0
        maximum: 1000
        default: 100
      x-resolved-from: ../../common/openapi.yaml#/components/parameters/limitQueryParam
    ifNoneMatchHeaderParam:
      name: If-None-Match
      description: The entity tag that was returned in the `ETag` response header of a previous call. If the resource's current entity tag value matches this header value, the `GET` will return 304 (Not Modified) and no response body, else the current resource representation and updated `ETag` is returned.
      in: header
      schema:
        $ref: '#/components/schemas/entityTag'
      x-resolved-from: ../../common/openapi.yaml#/components/parameters/ifNoneMatchHeaderParam
    ifMatchHeaderParam:
      name: If-Match
      description: The entity tag that was returned in the `ETag` response header of a previous call. If passed, this must match the current entity tag of the resource, else the operation fails with a 412 Precondition Failed error.
      in: header
      schema:
        $ref: '#/components/schemas/entityTag'
      x-resolved-from: ../../common/openapi.yaml#/components/parameters/ifMatchHeaderParam
  headers:
    ETag:
      description: The value of this resource's _entity tag_, to be passed with `If-Match` and `If-None-Match` request headers in other conditional API calls for this resource.
      schema:
        $ref: '#/components/schemas/entityTag'
      x-resolved-from: ../../common/openapi.yaml#/components/headers/ETag
  x-apiture-errors:
    badRequest:
      description: The request body and/or parameters was not well-formed.
      remediation: Correct any syntax or schema errors in the request body or parameters.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/badRequest
    unauthorized:
      description: The request lacks valid authentication credentials for the target resource or operation.
      remediation: Authenticate the user and pass the required authorization with the request.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/unauthorized
    forbidden:
      description: The user or agent is not allowed to perform this operation; authentication credentials were provided in the request, but the server considers them insufficient to grant access.
      remediation: Check the user's permissions and entitlements before attempting the operation.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/forbidden
    customerDisabled:
      description: The customer is disabled.
      remediation: Have the customer contact the financial institution for support.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/customerDisabled
    antiMalwareRequired:
      description: The financial institution requires the customer to have anti-malware software installed.
      remediation: Direct the user to the software requirements guide to install the correct anti-malware software.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/antiMalwareRequired
    modificationForbidden:
      description: The customer is properly authenticated but not authorized to create, modify, or delete resources.
      remediation: Avoid modification operation for customers with read-only authorization.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/modificationForbidden
    challengeRequired:
      description: The operation requires the customer to complete an identity challenge.
      remediation: Complete the challenge as per the problem response, and add an additional `Challenge` header to the call.
      attributes:
        $ref: '#/components/schemas/requiredIdentityChallenge'
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/challengeRequired
    challengeBlocked:
      description: The user has failed challenges too many times and is blocked from attempting more or performing operations which require additional authentication.
      remediation: Have the user end their login session and login again.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/challengeBlocked
    noIdentityChallengeFactors:
      description: This operation requires an identity challenge, but the user does not have the necessary registered authentication factors.
      remediation: Have the user register one or more challenge security code delivery factors.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/noIdentityChallengeFactors
    invalidIdentityChallengeHeader:
      description: The additional on-time `Challenge` header in this request is expired, already used, or otherwise invalid.
      remediation: Supply a valid, unexpired, unclaimed `Challenge` header in the request.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/invalidIdentityChallengeHeader
    notFound:
      description: The resource at the requested URL does not exist.
      remediation: Use the URL of an existing resource.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/notFound
    preconditionFailed:
      description: One or more conditions given in the request header fields evaluated to false when tested on the server.
      remediation: Update resources and use it's most recent ETag or modification time stamp.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/preconditionFailed
    unprocessableEntity:
      description: The syntax of the request entity is correct but was unable to process the contained instructions.
      remediation: Provide a semantically correct request.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/unprocessableEntity
    tooManyRequests:
      description: The client has sent too many requests in a given amount of time, exceeding rate limiting.
      remediation: Slow down the rate of API calls.
      x-resolved-from: ../../common/openapi.yaml#/components/x-apiture-errors/tooManyRequests
x-apiture-errors:
  missingFileContent:
    description: The given file is valid but has no content.
    remediation: Set content on the file and retry the operation.
  duplicateFileContent:
    description: The given file content is valid but has already been uploaded.
    remediation: Use the existing copy of the given file or delete the existing file and resubmit the upload request.
x-apiture-traits:
  - resource:
      name: file
      immutable: true
      readOnly: true
      applied: true
  - security:
      baseScope: adminData
      applied: true
x-resolved-from: ../../adminFiles/status-codes-openapi.yaml
x-resolved-at: '2024-12-09T22:07:13.288Z'
x-apiture-annotated-at: '2024-12-09T22:07:13.526Z'
