openapi: 3.0.0
servers:
  - url: 'https://api.devbank.apiture.com/documents'
info:
  title: Documents
  description: |-
    The Documents API provides operations for all bank customers to
    [list their banking documents](#op-getDocuments), such as :

      * account statements
      * agreements
      * notices
      * user documents or organization documents not associated with specific accounts, such as tax
    documents.


    Users may request lists of documents based on document category,
    document type, and/or date intervals based on query parameters:

       * the start and end date
       * a start or end date and a period, such as statements for the first 6 months of a year
       * an end date and a period, such as statements for the last 6 months.


    The caller can [fetch the document resource](#op-getDocument) for each document.
    This document metadata includes properties which
    describe the document, such as the document name, label, [document types](#op-getDocumentTypes),
    [document category](#op-getDocumentCategories), content
    type, the date range the document applies to, the document context (usually an account).


    Each document resource has an `apiture:content`
    [link](https://developer.apiture.com/docs/concepts/links) to
    [download the document's content](#op-getContent).
    The content is typically a PDF (`application/pdf`) file.
  version: 0.2.2
  contact:
    name: Apiture
    url: 'https://developer.apiture.com'
    email: api@apiture.com
  termsOfService: 'https://developer.apiture.com/docs/Apiture-Open-API-License-Agreement.pdf'
tags:
  - name: Documents
    description: Documents
  - name: Statements
    description: Monthly Account Statements
  - name: Document Types
    description: Documents Types
  - name: Document Categories
    description: Documents Cateories
  - name: Configuration
    description: Documents Service Configuration
  - name: API
    description: The Documents API
paths:
  /documents:
    get:
      summary: Return a collection of documents
      description: >-
        Return a [paginated](http://developer.apiture.com/docs/concepts/pagination) [filterable](http://developer.apiture.com/docs/concepts/filtering)
        collection of documents. The [links](http://developer.apiture.com/docs/concepts/links) in the response include pagination links. Periodic or
        recurring documents such as statements or tax documents may be filtered in several ways:
          1. Pass `endOn` and a `period` which represents how far in the past to include. The `endOn` is the current date if omitted. For example, to fetch documents for the last six months, request `?period=P6M` query parameters. Each `prev` link will return the previous six months of documents. The default period if ommitted is `P6M`. Thus, the default request if none of `startOn`, `endOn` and `period` are passed is the last 6 months of documents. This implies a result sorted in _descending_ order by time.
          1. Pass `startOn` and `endOn`, to find any documents which overlap that date range. This implies a result sorted in ascending order by time.
          1. Pass the `startOn` and a `period` which represents how far after the start date to include. For example, to fetch documents for the first six months of 2018, request `?startOn=2018-01-01&period=P6M` query parameters. Each `next` link in the response collection will return the next six months of documents, if available. This implies a result sorted in ascending order by time.
          1. If one or ore accounts are included in the the optional `account` query parameter, only documents associated with those accounts will be returned; the caller must be a primary owner, joint owner, or authorized signer of the accounts. An empty list of `_embedded.items` will be returned if the user is not entitled to any of the requested accounts.
      operationId: getDocuments
      tags:
        - Documents
      parameters:
        - name: start
          in: query
          description: The zero-based index of the first document item to include in this page. The default 0 denotes the beginning of the collection.
          schema:
            type: integer
            format: int64
            default: 0
        - name: limit
          in: query
          description: The maximum number of document representations to return in this page.
          schema:
            type: integer
            format: int32
            default: 100
        - name: account
          in: query
          description: >-
            An optional pipe (`|`) separated list of one or more account IDs. Note: these are _not_ account numbers but are the unique resource `_id`
            of the corresponding financial institution accounts via the Accounts API. The user must have access to the corresponding accounts in order
            to view documents associated with the accounts. If omitted, the listed documents may match any account the user is entitled to view, or
            may not be account-specific documents. Examples:<br> `?account=e486ebd0-167d-4fc6-8fd0-0edf275ef431`<br>
            `?account=e486ebd0-167d-4fc6-8fd0-0edf275ef431|43ae102e-4cec-488f-a3c5-7f15c3659960`<br>
          style: pipeDelimited
          schema:
            type: array
            items:
              type: string
        - name: startOn
          description: The start date of the query range. May be combined with `endOn` _or_ `period` but not both.
          in: query
          schema:
            type: string
            format: date
        - name: endOn
          description: The end date of the query range. May be combined with `endOn` _or_ `period` but not both.
          in: query
          schema:
            type: string
            format: date
        - name: period
          description: >-
            The time period for the date range, looking backwards from `endOn` (or today, if `endOn` is omitted), or forward from `startOn`. For
            example, to list the documents for the last 6 months, use `?period=P6m`.
          in: query
          schema:
            type: string
            format: period
        - name: type
          description: >-
            Match documents by document category. This matches any of the values in the `|`-seprated list. Note: `type` and `category` are _mutually
            exclusive_. Examples: <br>`?category=form1099Int` <br> `?category=form1099Int|form1099Sa`
          in: query
          style: pipeDelimited
          schema:
            type: array
            items:
              type: string
        - name: category
          description: >-
            Match documents by document category. This matches any of the values in the `|`-seprated list. Note: `type` and `category` are _mutually
            exclusive_. Examples: <br> `?category=accountStatement` <br> `?category=accountStatement|agreements`
          in: query
          style: pipeDelimited
          schema:
            type: array
            items:
              type: string
        - name: filter
          in: query
          description: >-
            Optional filter criteria. See [filtering](http://developer.apiture.com/docs/concepts/filtering).<br>This collection may be filtered by
            following properties and functions:<br>&bullet;  Property `startOn` using functions `eq`,  `ne`,  `lt`,  `le`,  `gt`,  `ge`<br>&bullet; 
            Property `endOn` using functions `eq`,  `ne`,  `lt`,  `le`,  `gt`,  `ge`<br>&bullet;  Property `type` using functions `eq`, 
            `in`<br>&bullet;  Property `category` using functions `eq`,  `in`
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/documents'
            application/json:
              schema:
                $ref: '#/components/schemas/documents'
        '400':
          $ref: '#/components/responses/400'
        '422':
          $ref: '#/components/responses/422'
      x-apiture-implemented: true
      x-apiture-traits:
        itemSchema: document
        filters:
          startOn:
            filter:
              - eq
              - ne
              - lt
              - le
              - gt
              - ge
          endOn:
            filter:
              - eq
              - ne
              - lt
              - le
              - gt
              - ge
          type:
            filter:
              - eq
              - in
          category:
            filter:
              - eq
              - in
      security:
        - apiKey: []
          accessToken:
            - banking/read
  '/documents/{documentId}':
    get:
      summary: Fetch a representation of this document
      description: >-
        Return a [HAL](http://developer.apiture.com/docs/concepts/hal) representation of this document resource. This returns a JSON object which
        describes the document, its category, type. The document representation includes a [n `apiture:content`
        link](http://developer.apiture.com/docs/concepts/links) to the [`getContent`](#op-getContent) operation for downloading the document's
        content.
      operationId: getDocument
      tags:
        - Documents
      parameters:
        - $ref: '#/components/parameters/documentIdPathParam'
        - $ref: '#/components/parameters/unmaskedQueryParam'
      responses:
        '200':
          description: OK
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which must be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this document resource.
              schema:
                type: string
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/document'
            application/json:
              schema:
                $ref: '#/components/schemas/document'
        '304':
          $ref: '#/components/responses/304'
        '404':
          $ref: '#/components/responses/404Document'
        '422':
          $ref: '#/components/responses/422'
      x-apiture-implemented: true
      security:
        - apiKey: []
          accessToken:
            - banking/read
  '/documents/{documentId}/content':
    get:
      summary: Return the raw content of the document
      description: >-
        Return the raw content of the document as a stream of bytes. This operation normally returns a 302 to redirect the caller to the actual URL
        where the file content is available.
      operationId: getContent
      security:
        - apiKey: []
          accessToken:
            - banking/read
      tags:
        - Documents
      parameters:
        - $ref: '#/components/parameters/documentIdPathParam'
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              description: The media type of the file content.
              schema:
                type: string
          content:
            '*/*':
              schema:
                type: string
                format: binary
            application/hal+json:
              schema:
                type: string
                format: binary
            application/json:
              schema:
                type: string
                format: binary
        '302':
          description: Found. The URL where the file's content is located. This is the most likely response.
          headers:
            Location:
              description: The URL where the file's content is located.
              schema:
                type: string
        '404':
          $ref: '#/components/responses/404Document'
  /statements:
    get:
      summary: Return a collection of statements
      description: >-
        Return a [paginated](http://developer.apiture.com/docs/concepts/pagination) [filterable](http://developer.apiture.com/docs/concepts/filtering)
        collection of account activity statements. The [links](http://developer.apiture.com/docs/concepts/links) in the response include pagination
        links. This operation is a convenience for [`getDocuments?type=accountStatement`](#op-getDocuments). Thus, this operation does not support
        passing or augmenting the `type` or `category` query parameters or collection filters as allowed by that operation. Statements may be filtered
        using the `?startOn`, `?endOn` and `period` query parameters of that operation. Note that the items in the response are summary document
        representations, and the nested document resources are located at [`/documents/{documentId}`](#op-getDocument).
      operationId: getStatements
      tags:
        - Statements
      parameters:
        - name: start
          in: query
          description: The zero-based index of the first statement item to include in this page. The default 0 denotes the beginning of the collection.
          schema:
            type: integer
            format: int64
            default: 0
        - name: limit
          in: query
          description: The maximum number of statement representations to return in this page.
          schema:
            type: integer
            format: int32
            default: 100
        - name: accounts
          in: query
          description: >-
            An optional pipe (`|`) separated list of one or more account IDs. Note: these are _not_ account numbers but are the unique resource `_id`
            of the corresponding financial institution accounts via the Accounts API. The user must have access to the corresponding accounts in order
            to view documents associated with the accounts. If omitted, the listed documents may match any account the user is entitled to view, be
            account-specific documents. Examples:<br> `?account=e486ebd0-167d-4fc6-8fd0-0edf275ef431`<br>
            `?account=e486ebd0-167d-4fc6-8fd0-0edf275ef431|43ae102e-4cec-488f-a3c5-7f15c3659960`<br>
          style: pipeDelimited
          schema:
            type: array
            items:
              type: string
        - name: startOn
          description: The start date of the query range.  May be combined with `endOn` _or_ `period` but not both.
          in: query
          schema:
            type: string
            format: date
        - name: endOn
          description: The end date of the query range. May be combined with `endOn` _or_ `period` but not both.
          in: query
          schema:
            type: string
            format: date
        - name: period
          description: >-
            The time period for the date range, looking backwards from `endOn` (or today, if `endOn` is omitted), or forward from `startOn`. For
            example, to list the statements for the last 6 months, use `?period=P6m`.
          in: query
          schema:
            type: string
            format: period
        - name: filter
          in: query
          description: >-
            Optional filter criteria. See [filtering](http://developer.apiture.com/docs/concepts/filtering).<br>This collection may be filtered by
            following properties and functions:<br>&bullet;  Property `startOn` using functions `eq`,  `lt`,  `le`,  `gt`,  `ge`<br>&bullet;  Property
            `endOn` using functions `eq`,  `lt`,  `le`,  `gt`,  `ge`
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/documents'
            application/json:
              schema:
                $ref: '#/components/schemas/documents'
        '400':
          $ref: '#/components/responses/400'
        '422':
          $ref: '#/components/responses/422'
      x-apiture-implemented: true
      x-apiture-traits:
        itemSchema: statement
        filters:
          startOn:
            filter:
              - eq
              - lt
              - le
              - gt
              - ge
          endOn:
            filter:
              - eq
              - lt
              - le
              - gt
              - ge
      security:
        - apiKey: []
          accessToken:
            - banking/read
  /documentCategories:
    get:
      summary: Return a list of document categories
      description: Return a list of document categories.
      operationId: getDocumentCategories
      tags:
        - Document Categories
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/documentCategories'
            application/json:
              schema:
                $ref: '#/components/schemas/documentCategories'
  /documentTypes:
    get:
      summary: Return a list of document types
      description: Return a list of document types.
      operationId: getDocumentTypes
      tags:
        - Document Types
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/documentTypes'
            application/json:
              schema:
                $ref: '#/components/schemas/documentTypes'
  /labels:
    get:
      summary: Localized Labels
      description: >-
        Return a JSON object which defines labels for enumeration types defined by the schemas defined in this API. The labels in the response may not
        all match the requested language; some may be in the default language (`en-us`).
      operationId: getLabels
      security:
        - apiKey: []
      parameters:
        - name: Accept-Language
          in: header
          description: >-
            The weighted language tags which indicate the user's preferred natural language for the localized labels in the response, as per [RFC
            7231](https://tools.ietf.org/html/rfc7231#section-5.3.5).
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/localizedLabels'
            application/json:
              schema:
                $ref: '#/components/schemas/localizedLabels'
      tags:
        - API
  /:
    get:
      summary: Top-level resources and operations in this API
      description: Return links to the top-level resources and operations in this API.
      operationId: getApi
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/root'
            application/json:
              schema:
                $ref: '#/components/schemas/root'
      tags:
        - API
      x-apiture-implemented: true
      security:
        - apiKey: []
  /apiDoc:
    get:
      summary: Return API definition document
      description: Return the OpenAPI document that describes this API.
      operationId: getApiDoc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
            application/openapi+json;version=2.0:
              schema:
                type: object
            application/openapi+yaml;version=2.0:
              schema:
                type: object
            application/hal+json:
              schema:
                type: object
      tags:
        - API
      x-apiture-implemented: true
      security:
        - apiKey: []
  /configurations/groups:
    get:
      summary: Return a collection of configuration groups
      description: >-
        Return a [paginated](https://developer.apiture.com/docs/concepts/pagination) [sortable](https://developer.apiture.com/docs/concepts/sorting)
        [filterable](https://developer.apiture.com/docs/concepts/filtering) [searchable](https://developer.apiture.com/docs/concepts/searchable)
        collection of configuration groups. The [links](https://developer.apiture.com/docs/concepts/links) in the response include pagination links.
      operationId: getConfigurationGroups
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Configuration
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/configurationGroups'
            application/json:
              schema:
                $ref: '#/components/schemas/configurationGroups'
        '400':
          $ref: '#/components/responses/400'
        '422':
          $ref: '#/components/responses/422'
  '/configurations/groups/{groupName}':
    get:
      summary: Fetch a representation of this configuration group
      description: 'Return a [HAL](https://developer.apiture.com/docs/concepts/hal) representation of this configuration group resource.'
      operationId: getConfigurationGroup
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Configuration
      parameters:
        - $ref: '#/components/parameters/configurationGroupNamePathParam'
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-None-Match` request header for *`GET`* operations
                for this configuration group resource.
              schema:
                type: string
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/configurationGroup'
            application/json:
              schema:
                $ref: '#/components/schemas/configurationGroup'
        '304':
          $ref: '#/components/responses/304'
        '404':
          $ref: '#/components/responses/404ConfigurationGroup'
  '/configurations/groups/{groupName}/schema':
    get:
      summary: Fetch the schema for this configuration group
      description: 'Return a [HAL](https://developer.apiture.com/docs/concepts/hal) representation of this configuration group schema resource.'
      operationId: getConfigurationGroupSchema
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Configuration
      parameters:
        - $ref: '#/components/parameters/configurationGroupNamePathParam'
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK
          headers:
            ETag:
              description: The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`*
              schema:
                type: string
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/configurationSchema'
            application/json:
              schema:
                $ref: '#/components/schemas/configurationSchema'
        '304':
          $ref: '#/components/responses/304'
        '404':
          $ref: '#/components/responses/404ConfigurationGroup'
  '/configurations/groups/{groupName}/values':
    get:
      summary: Fetch the values for the specified configuration group
      description: Return a representation of this configuration group values resource.
      operationId: getConfigurationGroupValues
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Configuration
      parameters:
        - $ref: '#/components/parameters/configurationGroupNamePathParam'
        - $ref: '#/components/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK
          headers:
            ETag:
              description: The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`*
              schema:
                type: string
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/configurationValues'
            application/json:
              schema:
                $ref: '#/components/schemas/configurationValues'
        '304':
          $ref: '#/components/responses/304'
        '404':
          $ref: '#/components/responses/404ConfigurationGroup'
    put:
      summary: Update the values for the specified configuration group
      description: Perform a complete replacement of this set of values
      operationId: updateConfigurationGroupValues
      security:
        - apiKey: []
          accessToken:
            - admin/write
      tags:
        - Configuration
      parameters:
        - $ref: '#/components/parameters/configurationGroupNamePathParam'
        - $ref: '#/components/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK
          headers:
            ETag:
              description: The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`*
              schema:
                type: string
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/configurationSchema'
            application/json:
              schema:
                $ref: '#/components/schemas/configurationSchema'
        '400':
          $ref: '#/components/responses/400'
        '403':
          description: Access denied. Only user allowed to update configurations is an admin.
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/errorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '404':
          $ref: '#/components/responses/404ConfigurationGroup'
        '412':
          $ref: '#/components/responses/412'
      requestBody:
        content:
          application/hal+json:
            schema:
              $ref: '#/components/schemas/configurationValues'
          application/json:
            schema:
              $ref: '#/components/schemas/configurationValues'
        required: true
  '/configurations/groups/{groupName}/values/{valueName}':
    get:
      summary: Fetch a single value associated with the specified configuration group
      description: >-
        Fetch a single value associated with this configuration group. This provides convenient access to individual values of the configuration
        group. The response is always a JSON value which can be parsed with a strict JSON parser. The response may be
          * a primitive number, boolean, or quoted JSON string.
          * a JSON array.
          * a JSON object.
          * `null`.
        Examples:
          * `"a string configuration value"`
          * `120`
          * `true`
          * `null`
          * `{ "borderWidth": 8, "foregroundColor": "blue" }`
        To update a specific value, use `PUT /documents/configurations/groups/{groupName}/values/{valueName}` (operation
        `updateConfigurationGroupValue`).
      operationId: getConfigurationGroupValue
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Configuration
      parameters:
        - $ref: '#/components/parameters/configurationGroupNamePathParam'
        - $ref: '#/components/parameters/configurationGroupValueNamePathParam'
      responses:
        '200':
          description: 'OK. The value of the named configuration value as a JSON string, number, boolean, array, or object.'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this configuration group resource.
              schema:
                type: string
          content:
            application/hal+json:
              schema:
                type: string
            application/json:
              schema:
                type: string
        '404':
          $ref: '#/components/responses/404ConfigurationGroupOrValue'
    put:
      summary: Update a single value associated with the specified configuration group
      description: >-
        Update a single value associated with this configuration group. This provides convenient access to individual values of the configuration
        group as defined in the configuration group's `schema`. The request body must conform to  the configuration group's schema for the named
        `{valueName}`. This operation is idempotent. The request body must be a JSON value which can be parsed with a strict JSON parser. The response
        may be
          * a primitive number, boolean, or quoted JSON string.
          * a JSON array.
          * a JSON object.
          * `null`.
        Examples:
          * `"a string configuration value"`
          * `120`
          * `true`
          * `null`
          * `{ "borderWidth": 8, "foregroundColor": "blue" }`
        To fetch specific value, use `GET /documents/configurations/groups/{groupName}/values/{valueName}`  (operation `getConfigurationGroupValue`).
      operationId: updateConfigurationGroupValue
      security:
        - apiKey: []
          accessToken:
            - admin/write
      tags:
        - Configuration
      parameters:
        - $ref: '#/components/parameters/configurationGroupNamePathParam'
        - $ref: '#/components/parameters/configurationGroupValueNamePathParam'
      responses:
        '200':
          description: OK
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this configuration group resource.
              schema:
                type: string
          content:
            application/hal+json:
              schema:
                type: string
            application/json:
              schema:
                type: string
        '403':
          description: Access denied. Only user allowed to update configurations is an admin.
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/errorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
      requestBody:
        content:
          application/hal+json:
            schema:
              type: string
          application/json:
            schema:
              type: string
        description: >-
          The request body must a valid JSON value and should be parsable with a JSON parser. The result may be a string, number, boolean, array, or
          object.
        required: true
x-apiture-traits:
  - api:
      links:
        - getStatements
        - getDocuments
        - getDocumentTypes
        - getDocumentCategories
        - getApi
        - getApiDoc
        - getLabels
      applied: true
  - resource:
      name: document
      description: Banking document
      readOnly: true
      sortable: false
      searchable: false
      applied: true
  - resource:
      name: document type
      description: Banking document type
      readOnly: true
      simpleModelSchema: true
      excludeMethods:
        - post
        - patch
        - put
        - delete
        - get
      applied: true
  - resource:
      name: document category
      pluralName: document categories
      description: Banking document category
      readOnly: true
      simpleModelSchema: true
      excludeMethods:
        - post
        - patch
        - put
        - delete
        - get
      applied: true
x-apiture-annotated-at: '2020-10-20T14:17:02.244Z'
components:
  schemas:
    documentCategory:
      title: Document Category (v1.0.0)
      description: Representation of document category resources.
      example:
        _id: 0399abed-fd3d-4830-a88b-30f38b8a365c
        name: taxForms
        label: Tax Forms
        content: user
        _profile: 'https://api.apiture.com/schemas/documents/documentCategory/v1.0.0/profile.json'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - properties:
            - name
            - label
            - context
      properties:
        name:
          description: >-
            The name of this document category. This is an identifier. This corresponds to an item in the
            [`getDocumentCategories`](#op-getDocumentCategories) response.
          type: string
          pattern: '^[a-z][a-zA-Z0-9_$]{1,48}$'
          example: agreements
        label:
          description: The human-presentable label of this document category.
          type: string
          example: Account Statement
        context:
          description: The type of resource that documents in this category are associated with.
          allOf:
            - $ref: '#/components/schemas/documentContext'
      type: object
      x-apiture-flattened: true
    documentContext:
      title: Document Context (v1.0.0)
      description: |-
        The type of resource that documents in this category are associated with.

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

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

        <tr>
            <td><strong><code>account</code></strong></td><td>Account: The document is associated with the account referenced by the `apiture:account` link.</td>
            </tr>
        <tr>
            <td><strong><code>organization</code></strong></td><td>organization: The document is associated with an organization referenced by the `apiture:organization` link.</td>
            </tr>
        <tr>
            <td><strong><code>user</code></strong></td><td>Account: The document is associated with a user referenced by the `apiture:user` link.</td>
            </tr>
        </table>


        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
        named `documentContext` in the response from the [`getLabels`](#op-getLabels) operation.
      type: string
      x-apiture-enum: documentContext
      enum:
        - account
        - organization
        - user
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    documentCategories:
      title: Document Categories (v1.0.0)
      description: Array of document categories.
      example:
        _profile: 'https://api.apiture.com/schemas/documents/documentCategories/v1.0.0/profile.json'
        items:
          anyOf:
            - name: agreements
              label: Account Agreements
              _profile: 'https://api.apiture.com/schemas/documents/documentCategory/v1.0.0/profile.json'
            - name: taxForm
              label: Tax Forms
              _profile: 'https://api.apiture.com/schemas/documents/documentCategory/v1.0.0/profile.json'
        _links:
          self:
            href: /documents/documentCategories
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - items
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        items:
          description: An array containing document category items.
          type: array
          items:
            $ref: '#/components/schemas/documentCategory'
      type: object
      x-apiture-flattened: true
    documentType:
      title: Document Type (v1.0.0)
      description: Representation of document type resources.
      example:
        name: accountStatement
        label: Account Statement
        period: P1M
        category:
          name: accountStatements
          label: Account Statements
        _profile: 'https://api.apiture.com/schemas/documents/documentType/v1.0.0/profile.json'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - properties:
            - name
            - label
            - period
            - category
      properties:
        name:
          description: 'The name of this document type. This corresponds to an item in the [`getDocumentTypes`](#op-getDocumentTypes) response.'
          type: string
          pattern: '^[a-z][a-zA-Z0-9_$]{1,48}$'
          example: accountStatement
        label:
          description: The human-presentable label of this document category.
          type: string
          example: Account Statement
        period:
          description: >-
            The document issue period document for documents issued on a regular periodic basis. For example, account statements are issued monthly
            (`P1M`), and tax statements annually (`P1Y'). If empty, the documents are issued on an ad-hoc schedule, such as in response to banking or
            account activity.
          type: string
          format: period
          example: P1M
        category:
          description: This document type's category.
          allOf:
            - $ref: '#/components/schemas/documentCategory'
      type: object
      x-apiture-flattened: true
    documentTypes:
      title: Document Type Collection (v1.0.1)
      description: An array of document types.
      x-apiture-version: 1.0.1
      example:
        _profile: 'https://api.apiture.com/schemas/documents/documentTypes/v1.0.1/profile.json'
        items:
          anyOf:
            - name: accountStatement
              label: Account Statement
              period: P1M
              category:
                name: accountStatements
                label: Account Statements
              _profile: 'https://api.apiture.com/schemas/documents/documentType/v1.0.0/profile.json'
            - name: form1099Int
              label: Form 1099-INT
              period: P1Y
              category:
                name: taxStatements
                label: Tax Statements
              _profile: 'https://api.apiture.com/schemas/documents/documentType/v1.0.0/profile.json'
        _links:
          self:
            href: /documents/documentTypes
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - items
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        items:
          description: An array containing a page of document type items.
          type: array
          items:
            $ref: '#/components/schemas/documentType'
      type: object
      x-apiture-flattened: true
    documentFields:
      title: Document Fields (v1.0.0)
      description: Each statement resource includes summary properties which describe the account.
      properties:
        name:
          description: The document name.
          type: string
          readOnly: true
        label:
          description: A more descriptive label for the document.
          type: string
          readOnly: true
        typeName:
          description: The name of the document type
          type: string
          readOnly: true
          example: accountStatement
        categoryName:
          description: The name of the document category.
          type: string
          readOnly: true
          example: accountStatement
        contentType:
          description: >-
            The [media type](https://tools.ietf.org/html/rfc6838) for this file. This is `document/pdf` (Portable Document Format) for most document
            types. For text documents, the content type should include the text encoding; if omitted, the encoding type is assumed to be utf-8.
          type: string
          example: application/pdf
          readOnly: true
        startOn:
          description: >-
            The inclusive beginning date in [RFC 3339](https://tools.ietf.org/html/rfc3339) `YYYY-MM-DD` format for this document. For example, for
            statements or other recurring documents, this is the beginning of the statement period. The document type indicates if the the document is
            recurring/periodical.
          type: string
          format: date
          readOnly: true
          example: '2020-01-01'
        endOn:
          description: >-
            The inclusive end date in [RFC 3339](https://tools.ietf.org/html/rfc3339) `YYYY-MM-DD` format for this document. For example, for
            statements or other recurring documents, this is the end of the statement period. The document type indicates if the the document is
            recurring/periodical.
          type: string
          format: date
          readOnly: true
          example: '2020-01-30'
        createdAt:
          description: 'The date-time of the document''s creation, in [RFC 3339](https://tools.ietf.org/html/rfc3339) `YYYY-MM-DDThh:mm:ss.sssZ` format.'
          type: string
          format: date-time
          example: '2020-02-01T00:01:38.375Z'
        account:
          description: 'Identifying attributes of the account that this document pertains to. If omitted, the document is not associated with an account.'
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/accountIdentification'
      x-apiture-fragment: true
      x-apiture-version: 1.0.0
      type: object
      x-apiture-flattened: true
    summaryDocument:
      title: Document Summary (v1.0.0)
      description: >-
        Summary representation of a document resource in documents collections. This representation normally does not contain any `_embedded` objects.
        If needed, call the `GET` operation on the item's `self` link to get `_embedded` objects. This object also contains a link (`apiture:content`)
        to the downloadable document, typically PDF.
      example:
        _id: 0399abed-fd3d-4830-a88b-30f38b8a365c
        _profile: 'https://api.apiture.com/schemas/documents/summaryDocument/v1.0.0/profile.json'
        _links:
          self:
            href: /documents/documents/0399abed-fd3d-4830-a88b-30f38b8a365c
          'apiture:content':
            href: /documents/documents/0399abed-fd3d-4830-a88b-30f38b8a365c/content
          'apiture:account':
            documents: '/accounts/accounts/{accountId}'
        name: 532a0e1b82f592e40803-1099-INT.pdf
        label: 1099 INT for Account ******3210 for 2019
        contentType: application/pdf
        typeName: form1099Int
        categoryName: taxForm
        startOn: '2020-01-01'
        endOn: '2020-01-31'
        createdAt: '2020-02-01T00:01:38.375Z'
        period: P1Y
        account:
          name: Personal Savings
          title: John Smith
          institutionName: 3rd Party Bank
          routingNumber: '021000021'
          accountNumbers:
            masked: '******3210'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - $ref: '#/components/schemas/documentFields'
        - properties:
            - _id
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        name:
          description: The document name.
          type: string
          readOnly: true
        label:
          description: A more descriptive label for the document.
          type: string
          readOnly: true
        typeName:
          description: The name of the document type
          type: string
          readOnly: true
          example: accountStatement
        categoryName:
          description: The name of the document category.
          type: string
          readOnly: true
          example: accountStatement
        contentType:
          description: >-
            The [media type](https://tools.ietf.org/html/rfc6838) for this file. This is `document/pdf` (Portable Document Format) for most document
            types. For text documents, the content type should include the text encoding; if omitted, the encoding type is assumed to be utf-8.
          type: string
          example: application/pdf
          readOnly: true
        startOn:
          description: >-
            The inclusive beginning date in [RFC 3339](https://tools.ietf.org/html/rfc3339) `YYYY-MM-DD` format for this document. For example, for
            statements or other recurring documents, this is the beginning of the statement period. The document type indicates if the the document is
            recurring/periodical.
          type: string
          format: date
          readOnly: true
          example: '2020-01-01'
        endOn:
          description: >-
            The inclusive end date in [RFC 3339](https://tools.ietf.org/html/rfc3339) `YYYY-MM-DD` format for this document. For example, for
            statements or other recurring documents, this is the end of the statement period. The document type indicates if the the document is
            recurring/periodical.
          type: string
          format: date
          readOnly: true
          example: '2020-01-30'
        createdAt:
          description: 'The date-time of the document''s creation, in [RFC 3339](https://tools.ietf.org/html/rfc3339) `YYYY-MM-DDThh:mm:ss.sssZ` format.'
          type: string
          format: date-time
          example: '2020-02-01T00:01:38.375Z'
        account:
          description: 'Identifying attributes of the account that this document pertains to. If omitted, the document is not associated with an account.'
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/accountIdentification'
        _id:
          description: The unique identifier for this document resource. This is an immutable opaque string.
          readOnly: true
          type: string
      type: object
      x-apiture-flattened: true
    document:
      title: Document (v1.0.0)
      description: >
        Representation of document metadata. The links on a document include the content download URL, and for documents associated with an account,
        organization, or user, a link to the associated account organization, or user resource.



        <h3 class='schema-links' id="document-links" >Links</h3>


        Response and request bodies using this <strong><code>document</code></strong> schema may contain

        the following <a href='https://developer.apiture.com/docs/concepts/links'>links</a>:


        <table>

        <tr>
          <th>Rel</th><th>Summary</th><th>Method</th>
        </tr>


        <tr>

        <td><a href='#op-getDocument'><strong><code>self</code></strong></a></td><td>Fetch a representation of this
        document</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><a href='#op-getContent'><strong><code>apiture:content</code></strong></a></td><td>Return the raw content of the
        document</td><td><code>GET</code></td>

        </tr>


        <tr>

        <td><strong><code>apiture:account</code></strong></td>

        <td>Account associated with this document</td><td><code>GET</code></td>


        <tr>

        <td><strong><code>apiture:user</code></strong></td>

        <td>User associated with this document</td><td><code>GET</code></td>


        <tr>

        <td><strong><code>apiture:organization</code></strong></td>

        <td>Organization associated with this document</td><td><code>GET</code></td>

        </table>
      example:
        _id: 0399abed-fd3d-4830-a88b-30f38b8a365c
        _profile: 'https://api.apiture.com/schemas/documents/document/v1.0.0/profile.json'
        _links:
          self:
            href: /documents/documents/0399abed-fd3d-4830-a88b-30f38b8a365c
          'apiture:content':
            href: /documents/documents/0399abed-fd3d-4830-a88b-30f38b8a365c/content
          'apiture:account':
            href: /accounts/account/100a6159-7811-4986-b1df-99555b059757
        name: 532a0e1b82f592e40803-1099-INT.pdf
        label: 1099 INT for Account ******3210 for 2019
        contentType: application/pdf
        typeName: form1099Int
        categoryName: taxForm
        startOn: '2020-01-01'
        endOn: '2020-01-31'
        createdAt: '2020-02-01T00:01:38.375Z'
        type:
          name: accountStatement
          label: Account Statement
          period: P1M
          category:
            name: accountStatements
            label: Account Statements
        account:
          name: Personal Savings
          title: John Smith
          institutionName: 3rd Party Bank
          routingNumber: '021000021'
          accountNumbers:
            masked: '******3210'
      x-apiture-links:
        - rel: self
          operationId: getDocument
        - rel: 'apiture:content'
          operationId: getContent
        - rel: 'apiture:account'
          verb: get
          title: Account associated with this document
          description: 'The account resource associated with this document, if `context` is `account`.'
        - rel: 'apiture:user'
          verb: get
          title: User associated with this document
          description: 'The account resource associated with this document, if `context` is `user`.'
        - rel: 'apiture:organization'
          verb: get
          title: Organization associated with this document
          description: 'The organization resource associated with this document, if `context` is `organization`.'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/summaryDocument'
        - properties:
            - type
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        name:
          description: The document name.
          type: string
          readOnly: true
        label:
          description: A more descriptive label for the document.
          type: string
          readOnly: true
        typeName:
          description: The name of the document type
          type: string
          readOnly: true
          example: accountStatement
        categoryName:
          description: The name of the document category.
          type: string
          readOnly: true
          example: accountStatement
        contentType:
          description: >-
            The [media type](https://tools.ietf.org/html/rfc6838) for this file. This is `document/pdf` (Portable Document Format) for most document
            types. For text documents, the content type should include the text encoding; if omitted, the encoding type is assumed to be utf-8.
          type: string
          example: application/pdf
          readOnly: true
        startOn:
          description: >-
            The inclusive beginning date in [RFC 3339](https://tools.ietf.org/html/rfc3339) `YYYY-MM-DD` format for this document. For example, for
            statements or other recurring documents, this is the beginning of the statement period. The document type indicates if the the document is
            recurring/periodical.
          type: string
          format: date
          readOnly: true
          example: '2020-01-01'
        endOn:
          description: >-
            The inclusive end date in [RFC 3339](https://tools.ietf.org/html/rfc3339) `YYYY-MM-DD` format for this document. For example, for
            statements or other recurring documents, this is the end of the statement period. The document type indicates if the the document is
            recurring/periodical.
          type: string
          format: date
          readOnly: true
          example: '2020-01-30'
        createdAt:
          description: 'The date-time of the document''s creation, in [RFC 3339](https://tools.ietf.org/html/rfc3339) `YYYY-MM-DDThh:mm:ss.sssZ` format.'
          type: string
          format: date-time
          example: '2020-02-01T00:01:38.375Z'
        account:
          description: 'Identifying attributes of the account that this document pertains to. If omitted, the document is not associated with an account.'
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/accountIdentification'
        _id:
          description: The unique identifier for this document resource. This is an immutable opaque string.
          readOnly: true
          type: string
        type:
          description: 'The document type, which also includes the document''s category.'
          allOf:
            - $ref: '#/components/schemas/documentType'
      type: object
      x-apiture-flattened: true
    documents:
      title: Document Collection (v1.0.1)
      description: |-
        Collection of documents. The items in the collection are ordered in the `_embedded.items` array; the `name` is `documents`.
         The top-level `_links` object may contain pagination links (`self`, `next`, `prev`, `first`, `last`, `collection`).
      x-apiture-version: 1.0.1
      example:
        _profile: 'https://api.apiture.com/schemas/documents/documents/v1.0.1/profile.json'
        name: documents
        start: 10
        limit: 10
        count: 67
        _links:
          self:
            href: /documents/documents?start=10&limit=10
          first:
            href: /documents/documents?start=0&limit=10
          next:
            href: /documents/documents?start=20&limit=10
          collection:
            href: /documents/documents
        _embedded:
          items:
            anyOf:
              - _id: 0399abed-fd3d-4830-a88b-30f38b8a365c
                _profile: 'https://api.apiture.com/schemas/documents/document/v1.0.0/profile.json'
                _links:
                  self:
                    href: /documents/documents/0399abed-fd3d-4830-a88b-30f38b8a365c
                  'apiture:content':
                    href: /some/expiring/download/location
                  'apiture:account':
                    href: '/accounts/accounts/{accountId}'
                name: 532a0e1b82f592e40803-1099-INT.pdf
                label: 1099 INT for Account ******3210 for 2019
                typeName: form1099Int
                categoryName: taxForm
                contentType: application/pdf
                startOn: '2020-01-01'
                endOn: '2020-01-31'
                createdAt: '2020-02-01T00:01:38.375Z'
                account:
                  name: Personal Savings
                  title: John Smith
                  institutionName: 3rd Party Bank
                  routingNumber: '021000021'
                  accountNumbers:
                    masked: '******3210'
              - _id: 83babc98-f0bf-4c14-b7d6-4cb1539e2b47
                _profile: 'https://api.apiture.com/schemas/documents/document/v1.0.0/profile.json'
                _links:
                  self:
                    href: /documents/documents/83babc98-f0bf-4c14-b7d6-4cb1539e2b47
                  'apiture:content':
                    href: /some/expiring/download/location
                  'apiture:account':
                    href: '/accounts/accounts/{accountId}'
                name: 532a0e1b82f592e40803-1099-SA.pdf
                label: 1099 SA for Account ******3210 for 2019
                typeName: form1099Sa
                categoryName: taxForm
                contentType: application/pdf
                startOn: '2020-01-01'
                endOn: '2020-01-31'
                createdAt: '2020-02-01T00:01:38.375Z'
                account:
                  name: Personal Savings
                  title: John Smith
                  institutionName: 3rd Party Bank
                  routingNumber: '021000021'
                  accountNumbers:
                    masked: '******3210'
      x-apiture-composition:
        - $ref: '#/components/schemas/collection'
        - properties:
            - _embedded
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: Embedded objects.
          allOf:
            - $ref: '#/components/schemas/documentsEmbeddedObjects'
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        count:
          description: >-
            The number of items in the collection. This value is _optional_ and may be omitted if the count is not computable efficiently. If a filter
            is applied to the collection (either implicitly or explicitly), the count, if present, indicates the number of items that satisfy the
            filter.
          type: integer
        start:
          description: The start index of this page of items.
          type: integer
        limit:
          description: The maximum number of items per page.
          type: integer
        name:
          description: The name of the collection.
          type: string
      type: object
      x-apiture-flattened: true
    documentsEmbeddedObjects:
      title: Documents Embedded Objects (v1.0.0)
      description: Objects embedded in the `documents` collection.
      type: object
      properties:
        items:
          description: An array containing a page of document items.
          type: array
          items:
            $ref: '#/components/schemas/summaryDocument'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    localizedLabels:
      title: Localized Labels (v1.0.0)
      description: >-
        A map that defines lables for an enumeration or other item in a JSON schema. This is a map which maps enumeration schema names to an
        `localizedLabel` object. This schema is deprecated. Use [`labelGroups`](#schema-labelgroups)` instead.
      x-apiture-version: 1.0.0
      x-apiture-deprecated:
        since: 1.0.0
        replacement: labelGroups
      additionalProperties:
        $ref: '#/components/schemas/localizedLabel'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/localizedLabels/v1.0.0/model.json'
      x-apiture-namespace: common
      type: object
      properties: {}
      x-apiture-flattened: true
    root:
      x-apiture-version: 2.0.1
      title: API Root (v2.0.1)
      description: 'A HAL response, with hypermedia `_links` for the top-level resources and operations in API.'
      example:
        id: apiName
        name: API name
        apiVersion: 1.0.0
        _profile: 'https://production.api.apiture.com/schemas/common/root/v2.0.1/profile.json'
        _links: {}
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/root/v2.0.1/model.json'
      x-apiture-namespace: common
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - _id
            - name
            - apiVersion
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        _id:
          description: This API's unique ID.
          readOnly: true
          type: string
        name:
          type: string
          description: This API's name.
        apiVersion:
          type: string
          description: This API's version.
      type: object
      x-apiture-flattened: true
    configurationGroups:
      x-apiture-version: 2.0.1
      title: Configuration Group Collection (v2.0.1)
      description: >-
        Collection of configuration groups. The items in the collection are ordered in the `_embedded` object with name `items`. The top-level
        `_links` object may contain pagination links (`self`, `next`, `prev`, `first`, `last`, `collection`).
      example:
        _profile: 'https://production.api.apiture.com/schemas/configurations/configurationGroups/v2.0.1/profile.json'
        start: 10
        limit: 10
        count: 67
        name: configurationGroups
        _links:
          self:
            href: /configurations/configurations/groups?start=10&limit=10
          first:
            href: /configurations/configurations/groups?start=0&limit=10
          next:
            href: /configurations/configurations/groups?start=20&limit=10
          collection:
            href: /configurations/configurations/groups
        _embedded:
          items:
            anyOf:
              - _profile: 'https://api.apiture.com/schemas/configurations/configurationGroup/v2.0.1/profile.json'
                _links:
                  self:
                    href: /configurations/groups/basic
                name: basic
                label: Basic Settings
                description: The basic settings for the Transfers API
              - _profile: 'https://api.apiture.com/schemas/configurations/configurationGroup/v2.0.1/profile.json'
                _links:
                  self:
                    href: /configurations/groups/calendar
                name: calendar
                label: Calendar
                description: 'A calendar that specifies which dates are valid for performing transfers (e.g., weekdays excluding federal holidays)'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/configurations/configurationGroups/v2.0.1/model.json'
      x-apiture-namespace: configurations
      x-apiture-composition:
        - $ref: '#/components/schemas/collection'
        - properties:
            - _embedded
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: Embedded objects.
          allOf:
            - $ref: '#/components/schemas/configurationGroupsEmbedded'
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        count:
          description: >-
            The number of items in the collection. This value is _optional_ and may be omitted if the count is not computable efficiently. If a filter
            is applied to the collection (either implicitly or explicitly), the count, if present, indicates the number of items that satisfy the
            filter.
          type: integer
        start:
          description: The start index of this page of items.
          type: integer
        limit:
          description: The maximum number of items per page.
          type: integer
        name:
          description: The name of the collection.
          type: string
      type: object
      x-apiture-flattened: true
    configurationGroup:
      x-apiture-version: 2.0.1
      title: Configuration Group (v2.0.1)
      description: Represents a configuration group.
      example:
        _profile: 'https://api.apiture.com/schemas/configurations/configurationGroup/v2.0.1/profile.json'
        _links:
          self:
            href: /configurations/groups/basic
        name: basic
        label: Basic Settings
        description: The basic settings for the Transfers API
        schema:
          type: object
          properties:
            dailyLimit:
              type: number
              description: The daily limit for the number of transfers
            cutoffTime:
              type: string
              format: time
              description: The cutoff time for scheduling transfers for the current day
        values:
          dailyLimit: 5
          cutoffTime: 63000
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/configurations/configurationGroup/v2.0.1/model.json'
      x-apiture-namespace: configurations
      x-apiture-composition:
        - $ref: '#/components/schemas/configurationGroupSummary'
        - properties:
            - schema
            - values
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        name:
          description: 'The name of this configuration group, must be unique within the set of all resources of this type.'
          type: string
          maxLength: 48
          minLength: 1
          pattern: '[a-zA-Z][-\w_]*'
          example: transfers
        label:
          description: 'The text label for this resource, suitable for presentation to the client.'
          type: string
          maxLength: 128
          minLength: 1
          example: Transfers Configuration
        description:
          description: 'The full description for this resource, suitable for presentation to the client.'
          type: string
          maxLength: 4096
          minLength: 1
          example: The configuration for the Transfers API.
        schema:
          $ref: '#/components/schemas/configurationSchema'
        values:
          $ref: '#/components/schemas/configurationValues'
      type: object
      x-apiture-flattened: true
    configurationSchema:
      x-apiture-version: 2.0.0
      title: Configuration Schema
      description: |-
        The schema which defines the name and types of the
        variables that are part of this configuration definition.
        Property names must be simple identifiers
        which follow the pattern
        `letter [letter | digit | - | _]*`.

        This is implicitly a schema for `type: object`
        and contains the properties.


        The `values` in a configuration conform to the schema.
        The names and types are described with a subset of
        [JSON Schema Core](https://tools.ietf.org/html/draft-zyp-json-schema-04)
        and [JSON Schema Validation](https://tools.ietf.org/html/draft-fge-json-schema-validation-00)
        similar to that used to define schemas in
        [OpenAPI Specification 2.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#schemaObject).
      type: object
      additionalProperties:
        $ref: '#/components/schemas/configurationSchemaValue'
      example:
        type: object
        properties:
          dailyLimit:
            type: number
            description: The daily limit for the number of transfers
          cutoffTime:
            type: string
            format: time
            description: The cutoff time for scheduling transfers for the current day
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/configurations/configurationSchema/v2.0.0/model.json'
      x-apiture-namespace: configurations
      properties: {}
      x-apiture-flattened: true
    configurationValues:
      x-apiture-version: 2.0.0
      title: Configuration Values (v2.0.0)
      description: |-
        The data values associated with this configuration group:
        the group's variable names and values. These values must conform to this
        item's `schema`.


        *Note*: the `schema` may also contain `default` values
        which, if present, are used if a value is *not* set in the
        definition's `values`.


        For example, multiple configurations may use the same schema
        that defines values `a`, `b`, and `c`, but each configuration
        may have their own unique values for `a`, `b`, and `c`
        which is separate from the schema.
      type: object
      additionalProperties:
        $ref: '#/components/schemas/configurationValue'
      example:
        dailyLimit: 5
        cutoffTime: 63000
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/configurations/configurationValues/v2.0.0/model.json'
      x-apiture-namespace: configurations
      properties: {}
      x-apiture-flattened: true
    errorResponse:
      x-apiture-version: 2.0.0
      title: Error Response (v2.0.0)
      description: 'Describes an error response, typically returned on 4xx or 5xx errors from API operations. The `_error` object contains the error details.'
      example:
        _profile: 'https://api.apiture.com/schemas/common/errorResponse/v2.0.0/profile.json'
        _error:
          _id: 2eae46e1-575c-4d69-8a8f-0a7b0115a4b3
          message: The value for deposit must be greater than 0.
          statusCode: 422
          type: positiveNumberRequired
          attributes:
            value: -125.5
          remediation: Provide a value which is greater than 0
          occurredAt: '2018-01-25T05:50:52.375Z'
          _links:
            describedby:
              href: 'https://api.apiture.com/errors/positiveNumberRequired'
          _embedded:
            errors: []
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/errorResponse/v2.0.0/model.json'
      x-apiture-namespace: common
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
      type: object
      x-apiture-flattened: true
    abstractResource:
      x-apiture-version: 2.0.0
      title: Abstract Resource (v2.0.0)
      description: >-
        An abstract schema used to define other schemas for request and response bodies. This is a
        [HAL](https://tools.ietf.org/html/draft-kelly-json-hal-08) resource representation. This model contains hypermedia `_links`, and either
        optional domain object data with `_profile` and optional `_embedded` objects, or an `_error` object. In responses, if the operation was
        successful, this object will not include the `_error`, but if the operation was a 4xx or 5xx error, this object will not include `_embedded`
        or any data fields, only `_error` and optionally `_links`.
      example:
        _profile: '{uri of resource profile.json}'
        _links:
          self:
            href: '{uri of current resource}'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/abstractResource/v2.0.0/model.json'
      x-apiture-namespace: common
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractRequest'
        - properties:
            - _error
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
      type: object
      x-apiture-flattened: true
    accountIdentification:
      title: Account Identification (v1.0.0)
      description: Properties which identify a specific account.
      type: object
      properties:
        name:
          description: The account name.
          type: string
        title:
          description: 'The title of the account. Traditionally, this is the name of the account holder.'
          maxLength: 512
          type: string
          example: John Smith
        institutionName:
          description: The name of the financial institution which manages the account.
          type: string
          minLength: 2
          maxLength: 128
          example: 3rd Party Bank
          readOnly: true
        routingNumber:
          description: >-
            The account routing number which identifies the financial institution. The full routing number and full account number are required to
            fully identify the account.
          type: string
          minLength: 9
          maxLength: 9
          example: '021000021'
          readOnly: true
        accountNumbers:
          description: The masked and full account numbers for this account. The `full` value only appears when `?unmasked=true` is passed on the `GET` request.
          type: object
          allOf:
            - $ref: '#/components/schemas/accountNumbers'
          readOnly: true
          example:
            masked: '*************3210'
            full: '9876543210'
      example:
        name: My Premiere Savings
        title: John Smith
        routingNumber: '021000021'
        accountNumbers:
          masked: '*************3210'
        institutionName: 3rd Party Bank
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/accounts/accountIdentification/v1.0.0/model.json'
      x-apiture-namespace: accounts
      x-apiture-flattened: true
    collection:
      x-apiture-version: 2.0.0
      title: Collection (v2.0.0)
      description: A collection of resources. This is an abstract model schema which is extended to define specific resource collections.
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/collection/v2.0.0/model.json'
      x-apiture-namespace: common
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - count
            - start
            - limit
            - name
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        count:
          description: >-
            The number of items in the collection. This value is _optional_ and may be omitted if the count is not computable efficiently. If a filter
            is applied to the collection (either implicitly or explicitly), the count, if present, indicates the number of items that satisfy the
            filter.
          type: integer
        start:
          description: The start index of this page of items.
          type: integer
        limit:
          description: The maximum number of items per page.
          type: integer
        name:
          description: The name of the collection.
          type: string
      type: object
      x-apiture-flattened: true
    localizedLabel:
      title: Localized Label (v1.0.0)
      description: >-
        A localized label and optional description for localizable content defined in this API. This schema is deprecated; use
        [`labelItem`](#schema-labelitem) instead.
      x-apiture-version: 1.0.0
      x-apiture-deprecated:
        since: 1.0.0
        replacement: labelGroups
      type: object
      properties:
        label:
          type: string
          description: A localized label or title which may be used labels or other UI controls which present a value.
          example: Limited Liability Corporation
        description:
          type: string
          description: A more detailed localized description of a localizable label.
        language:
          type: string
          description: >-
            The actual natural language tag to which this localized label is associated, as per [RFC
            7231](https://tools.ietf.org/html/rfc7231#section-3.1.3.1)
          example: en-us
        code:
          type: string
          description: 'If the localized value is associated with an external standard, this is a lookup code or key or URI for that value.'
          example: '31'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/localizedLabel/v1.0.0/model.json'
      x-apiture-namespace: common
      x-apiture-flattened: true
    configurationValue:
      x-apiture-version: 2.0.0
      title: Configuration Value (v2.0.0)
      description: The data associated with this configuration.
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/configurations/configurationValue/v2.0.0/model.json'
      x-apiture-namespace: configurations
      type: object
      properties: {}
      x-apiture-flattened: true
    configurationSchemaValue:
      x-apiture-version: 2.0.0
      title: Configuration Schema Value (v2.0.0)
      description: The data associated with this configuration schema.
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/configurations/configurationSchemaValue/v2.0.0/model.json'
      x-apiture-namespace: configurations
      type: object
      properties: {}
      x-apiture-flattened: true
    configurationGroupsEmbedded:
      title: Configuration Groups Embedded Objects (v1.0.0)
      description: 'Objects embedded in the [`configurationGroups`](#schema-configurationGroups)collection.'
      type: object
      properties:
        items:
          description: An array containing a page of configuration group items.
          type: array
          items:
            $ref: '#/components/schemas/configurationGroupSummary'
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/configurations/configurationGroupsEmbedded/v1.0.0/model.json'
      x-apiture-namespace: configurations
      x-apiture-flattened: true
    configurationGroupSummary:
      x-apiture-version: 2.0.0
      title: Configuration Group Summary (v2.0.0)
      description: A summary of the data contained within a configuration group resource.
      example:
        _profile: 'https://api.apiture.com/schemas/configurations/configurationGroupSummary/v2.0.0/profile.json'
        _links:
          self:
            href: /configurations/groups/basic
        name: basic
        label: Basic Settings
        description: The basic settings for the Transfers API
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/configurations/configurationGroupSummary/v2.0.0/model.json'
      x-apiture-namespace: configurations
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - name
            - label
            - description
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
        _error:
          description: An object which describes an error. This value is omitted if the operation succeeded without error.
          type: object
          allOf:
            - $ref: '#/components/schemas/error'
        name:
          description: 'The name of this configuration group, must be unique within the set of all resources of this type.'
          type: string
          maxLength: 48
          minLength: 1
          pattern: '[a-zA-Z][-\w_]*'
          example: transfers
        label:
          description: 'The text label for this resource, suitable for presentation to the client.'
          type: string
          maxLength: 128
          minLength: 1
          example: Transfers Configuration
        description:
          description: 'The full description for this resource, suitable for presentation to the client.'
          type: string
          maxLength: 4096
          minLength: 1
          example: The configuration for the Transfers API.
      type: object
      x-apiture-flattened: true
    abstractRequest:
      x-apiture-version: 2.0.0
      title: Abstract Request (v2.0.0)
      description: >-
        An abstract schema used to define other request-only schemas. This is a [HAL](https://tools.ietf.org/html/draft-kelly-json-hal-08) resource
        representation, minus the `_error` defined in `abstractResource`.
      properties:
        _links:
          description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
          allOf:
            - $ref: '#/components/schemas/links'
        _embedded:
          description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
          type: object
        _profile:
          description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
          type: string
          format: uri
      example:
        _profile: '{uri of resource profile.json}'
        _links:
          self:
            href: '{uri of current resource}'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/abstractRequest/v2.0.0/model.json'
      x-apiture-namespace: common
      type: object
      x-apiture-flattened: true
    error:
      x-apiture-version: 2.0.0
      title: Error (v2.0.0)
      description: Describes an error in an API request or in a service called via the API.
      required:
        - message
      properties:
        message:
          type: string
          description: A localized message string describing the error condition.
        _id:
          description: >-
            A unique identifier for this error instance. This may be used as a correlation ID with the root cause error (i.e. this ID may be logged at
            the source of the error). This is is an opaque string.
          readOnly: true
          type: string
        statusCode:
          description: The HTTP status code associate with this error.
          type: integer
          minimum: 100
          maximum: 599
          example: 422
        type:
          type: string
          description: >-
            An error identifier which indicates the category of error and associate it with API support documentation or which the UI tier can use to
            render an appropriate message or hint. This provides a finer level of granularity than the `statusCode`. For example, instead of just 400
            Bad Request, the `type` may be much more specific. such as `integerValueNotInAllowedRange` or `numericValueExceedsMaximum` or
            `stringValueNotInAllowedSet`.
        occurredAt:
          type: string
          format: date-time
          description: 'An [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC time stamp indicating when the error occurred.'
          example: '2018-02-02T03:37:15.375Z'
        attributes:
          description: >-
            Informative values or constraints which describe the error. For example, for a value out of range error, the attributes may specify the
            `minimum` and `maximum` values. This allows clients to present error messages as they see fit (the API does not assume the
            client/presentation tier). The set of attributes varies by error `type`.
          allOf:
            - $ref: '#/components/schemas/attributes'
        remediation:
          type: string
          description: An optional localized string which provides hints for how the user or client can resolve the error.
        errors:
          description: An optional array of nested error objects. This property is not always present.
          type: array
          items:
            $ref: '#/components/schemas/error'
        _links:
          $ref: '#/components/schemas/links'
      example:
        _id: 2eae46e1575c0a7b0115a4b3
        message: Descriptive error message...
        statusCode: 422
        type: errorType1
        remediation: Remediation string...
        occurredAt: '2018-01-25T05:50:52.375Z'
        errors:
          - _id: ccdbe2c5c938a230667b3827
            message: An optional embedded error
          - _id: dbe9088dcfe2460f229338a3
            message: Another optional embedded error
        _links:
          describedby:
            href: 'https://developer.apiture.com/errors/errorType1'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/error/v2.0.0/model.json'
      x-apiture-namespace: common
      type: object
      x-apiture-flattened: true
    accountNumbers:
      title: Account Numbers (v1.0.0)
      description: Different representations of an account number.
      properties:
        masked:
          description: >-
            A partial account number that does not contain all the digits of the full account number. This masked number appears in statements or in
            user experience presentation. It is sufficient for a user to differentiate this account from other accounts they hold, but is not
            sufficient for initiating transfers, etc. The first character is the mask character and is repeated; this does not indicate that the full
            account number is the same as the mask length. This value is derived and immutable.
          type: string
          minLength: 8
          maxLength: 32
          readOnly: true
          example: '*************3210'
        full:
          description: >-
            The full account number. This value only appears when `?unmasked=true` is passed on the `GET` request. Not included in the summary
            representation of the account that is included in account collection responses. This value is derived and immutable.
          type: string
          minLength: 4
          maxLength: 17
          example: '9876543210'
          readOnly: true
      x-apiture-version: 1.0.0
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/accountNumbers/v1.0.0/model.json'
      x-apiture-namespace: common
      type: object
      x-apiture-flattened: true
    links:
      title: Links (v1.0.0)
      x-apiture-version: 1.0.0
      description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
      type: object
      x-apiture-key: linkRelationName
      additionalProperties:
        $ref: '#/components/schemas/link'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/links/v1.0.0/model.json'
      x-apiture-namespace: common
      properties: {}
      x-apiture-flattened: true
    attributes:
      x-apiture-version: 2.0.0
      title: Attributes (v2.0.0)
      description: An optional map of name/value pairs which contains additional dynamic data about the resource.
      type: object
      x-apiture-key: attributeName
      additionalProperties:
        $ref: '#/components/schemas/attributeValue'
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/attributes/v2.0.0/model.json'
      x-apiture-namespace: common
      properties: {}
      x-apiture-flattened: true
    link:
      x-apiture-version: 1.0.0
      title: Link (v1.0.0)
      description: >-
        Describes a hypermedia link within a `_links` object in HAL representations. In Apiture APIs, links are [HAL
        links](https://developer.apiture.com/docs/concepts/links), but Apiture APIs do not use the `name` or `hreflang` properties of HAL. Apiture
        links _may_ include a `method` property.
      required:
        - href
      properties:
        href:
          type: string
          format: uri
          description: The URI or URI template for the resource/operation this link refers to.
        type:
          type: string
          description: The media type for the resource.
        templated:
          type: boolean
          description: 'If true, the link''s href is a [URI template](https://tools.ietf.org/html/rfc6570).'
        title:
          type: string
          description: An optional human-readable localized title for the link.
        deprecation:
          type: string
          format: uri
          description: 'If present, the containing link is deprecated and the value is a URI which provides human-readable text information about the deprecation.'
        profile:
          type: string
          format: uri
          description: 'The URI of a profile document, a JSON document which describes the target resource/operation.'
      example:
        href: /contacts/contacts/328f6bf6-d762-422f-a077-ab91ca4d0b6f
        title: Applicant
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/link/v1.0.0/model.json'
      x-apiture-namespace: common
      type: object
      x-apiture-flattened: true
    attributeValue:
      x-apiture-version: 2.0.0
      title: Attribute Value (v2.0.0)
      description: The data associated with this attribute.
      x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/attributeValue/v2.0.0/model.json'
      x-apiture-namespace: common
      type: object
      properties: {}
      x-apiture-flattened: true
  responses:
    '304':
      description: Not Modified. The resource has not been modified since it was last fetched.
    '400':
      description: >-
        Bad Request.  The request body or one or more of the query parameters was not well formed.  The `_error` field in the response will contain
        details about the request error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    '412':
      description: >-
        Precondition Failed. The supplied `If-Match` header value does not match the most recent `ETag` response header value. The resource has
        changed in the interim.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    '422':
      description: >-
        Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The `_error` field in the response will
        contain details about the request error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    404Document:
      description: >-
        Not Found. There is no such document resource at the specified `{documentId}`. The `_error` field in the response will contain details about
        the request error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    404ConfigurationGroup:
      description: >-
        Not Found. There is no such configuration group resource at the specified `{groupName}` The `_error` field in the response will contain
        details about the request error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    404ConfigurationGroupOrValue:
      description: >-
        Not Found. There is either no such configuration group resource at the specified `{groupName}` or no such value at the specified
        `{valueName}`. The `_error` field in the response will contain details about the request error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
  parameters:
    documentCategoryIdPathParam:
      name: documentCategoryId
      description: The unique identifier of this document category. This is an opaque string.
      in: path
      required: true
      schema:
        type: string
    filterQueryParam:
      name: filter
      in: query
      description: 'Optional filter criteria. See [filtering](http://developer.apiture.com/docs/concepts/filtering).'
      schema:
        type: string
    qQueryParam:
      name: q
      in: query
      description: 'Optional search string. See [searching](https://developer.apiture.com/docs/concepts/searching).'
      schema:
        type: string
    documentTypeIdPathParam:
      name: documentTypeId
      description: The unique identifier of this document type. This is an opaque string.
      in: path
      required: true
      schema:
        type: string
    documentIdPathParam:
      name: documentId
      description: The unique identifier of this document. This is an opaque string.
      in: path
      required: true
      schema:
        type: string
    statementIdPathParam:
      name: statementId
      description: The unique identifier of this statement. This is an opaque string.
      in: path
      required: true
      schema:
        type: string
    ifMatchHeaderParam:
      name: If-Match
      description: The entity tag that was returned in the `ETag` response. This must match the current entity tag of the resource.
      in: header
      required: true
      schema:
        type: string
    ifNoneMatchHeaderParam:
      name: If-None-Match
      description: >-
        The entity tag that was returned in the `ETag` response. If the resource's current entity tag matches, the `GET` will return 304 (Not
        Modified) and no response body, else the resource representation will be returned.
      in: header
      schema:
        type: string
    unmaskedQueryParam:
      name: unmasked
      description: >-
        When requesting an account, the full account number is not included in the response by default, for security reasons. Include this query
        parameter, with a value of `true`, to request that the response body includes the full account number. Such requests are auditable.
      in: query
      required: false
      schema:
        type: boolean
        default: false
    configurationGroupNamePathParam:
      name: groupName
      description: The unique name of this configuration group.
      in: path
      required: true
      schema:
        type: string
    configurationGroupValueNamePathParam:
      name: valueName
      description: >-
        The unique name of a value in a configuration group. This is the name of the value in the `schema`. A `{valueName}` must be a simple
        identifier following the pattern _`letter [letter | digit | '-' | '_']*`_
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    apiKey:
      type: apiKey
      name: API-Key
      in: header
      description: >-
        API Key based authentication. Each client application must pass its private, unique API key, allocated in the developer portal, via the
        `API-Key: {api-key}` request header.
    accessToken:
      type: oauth2
      description: >-
        OAuth2 client access token authentication. The client authenticates against the server at `authorizationUrl`, passing the client's private
        `clientId` (and optional `clientSecret`) as part of this flow. The client obtains an access token from the server at `tokenUrl`. It then
        passes the received access token via the `Authorization: Bearer {access-token}` header in subsequent API calls. The authorization process also
        returns a refresh token which the client should use to renew the access token before it expires.
      flows:
        authorizationCode:
          authorizationUrl: 'https://auth.devbank.apiture.com/auth/oauth2/authorize'
          tokenUrl: 'https://api.devbank.apiture.com/auth/oauth2/token'
          scopes:
            banking/read: Read access to accounts and account-related resources such as transfers and transactions.
            banking/full: Full access to accounts and account-related resources such as transfers and transactions.
