openapi: 3.0.0
servers:
  - url: 'https://api.example.bank/identity'
info:
  title: Identity
  description: |
    This API manages the set of actions that allow financial institutions to
    verify the identity of their customers and applicants. 'Identity' is
    defined as a set of personally identifiable information (PII) that can
    potentially identify a specific individual.


    PII consists of the following attributes:

      * `taxId` The identity's tax or government ID
      * `firstName` The identity's first name
      * `lastName`  The identity's last name
      * `address1` Line 1 of the identity's street address
      * `address2` Line 2 of the identity's street address
      * `city` The identity's city
      * `region` The identity's region
      * `postalCode` The identity's postal code
      * `phone` The identity's phone
      * `birthdate` The identity's birth date in `yyyy-mm-dd` format.
      * `email` The identity's email address
      * `ipAddress` The identity's IP address

    There are two major steps to the identity verification process - fraud-risk
    analysis and knowledge-base authentication (KBA) quizzes.


    A _fraud-risk report_ can be generated by specifying the PII associated with
    an individual.  The report contains a state indicating the result  of
    the operation as well as an optional list of fraud risk factors associated
    with that identity. A `passed` state indicates that the provided PII was
    located and contains no risk factors. A `passedWithRiskFactors` state means
    that the provided PII matches an identity but contains risk factors. A
    `failed` state means that the provided PII does not match any identity
    records.


    In order to generate a report, submit the PII via `POST` to
    `/fraudRiskReports`. This returns a `201` response containing a new
    `fraudRiskReport` resource which includes `outputs` with a collection of
    `fraudRiskCategories`. These categories are:

      * `personalInfoDoesNotMatch` The retrieved identity does not match the provided PII.
      * `addressIsPOBoxOrNonApproved` The provided address is a PO Box or other non-approved address
      * `addressIsHighRisk` The provided address is considered high-risk
      * `identityOnGovernmentWatchlist` The provided identity is located on one or more government watchlists
      * `identityOnAlertList` The provided identity is located on one or more alert lists
      * `ipRestricted` The provided IP address is restricted
      * `emailRestricted` The provided email address is restricted
      * `ageRestricted` The provided identity does not meet the required age. Example: US COPPA laws forbid conducting e-commerce with people under 14 years of age.
      * `nonStandardTaxId` The provided taxId is non-standard. Example: The provided SSN is an ITIN (Individual Taxpayer Identification Number)


    A _quiz_ containing a list of questions and their possible answers can be
    generated with a set of PII.  This information can be used to assist in the
    verification of the identity, by presenting the  customer or applicant with
    the questions and prompting them to choose the appropriate answers.  These
    answers can then be submitted to verify their correctness, confirming the
    identity.


    In order to generate a quiz, submit the PII via `POST` to `/quizzes`. This
    returns a `201` response containing a new `quiz` resource with a state
    of `pending`. You can then `POST` to `/quizzes/{quizId}/questions` by
    following the `apiture:getQuestions` link to generate one-time-use
    (transient) set of questions. Submit the answers to `/quizzes/{quizId}/answers` via `POST` by
    following the `apiture:score` link. This returns the quiz resource with
    an updated state, either  `passed`, `failed` or `expired`.

    # Error Types

    Error responses in this API may have one of the `type` values described below.
    See [Errors](https://developer.apiture.com/docs/concepts/errors) for more information
    on error responses and error types.



    <h2 class='errorType' id="err-invalidUser">invalidUser</h2>

    **Description**: The `user` parameter is not the `_id` or URI of a valid user resource. <br>
    **Remediation**: Supply the `_id` or URI of an existing user resource.


    <h2 class='errorType' id="err-contactOrUser">contactOrUser</h2>

    **Description**: Only one of `contact` or `user` parameter is allowed. <br>
    **Remediation**: Supply either `contact` or `user` but not both.
  version: 0.10.0
  termsOfService: 'https://developer.apiture.com/docs/Apiture-Open-API-License-Agreement.pdf'
  contact:
    name: Apiture
    url: 'https://developer.apiture.com'
    email: api@apiture.com
tags:
  - name: Fraud-Risk Reports
    description: Identity Fraud-Risk Reports
  - name: Quizzes
    description: Identity Verification Quizzes
  - name: Identity Verifications
    description: Identity Verifications
  - name: Approvals
    description: Manual Identity Verification Approvals
  - name: API
    description: The Identity Verification API
paths:
  /fraudRiskReports:
    get:
      summary: Returns a collection of fraud-risk analysis results
      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 fraud-risk analysis reports. The [links](https://developer.apiture.com/docs/concepts/links) in the response include pagination
        links.
      operationId: getFraudRiskReports
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Fraud-Risk Reports
      x-apiture-traits:
        sortBy:
          - type
        itemSchema: Fraud-Risk Reports
        filters:
          type:
            filter:
              - eq
              - ne
              - in
          _id:
            filter:
              - eq
              - in
      parameters:
        - name: start
          in: query
          description: 'The zero-based index of the first fraud-risk analysis report in this page. The default, 0, represents the first report in the collection.'
          schema:
            type: integer
            format: int64
            default: 0
        - name: limit
          in: query
          description: The maximum number of fraud-risk analysis report representations to return in this page.
          schema:
            type: integer
            format: int32
            default: 100
        - name: sortBy
          in: query
          description: >-
            Optional sort criteria. See [sort criteria format](https://developer.apiture.com/docs/concepts/sorting), such as
            `?sortBy=field1,-field2`.<br>This collection may be sorted by following properties:<br>&bullet; `type`
          schema:
            type: string
        - name: filter
          in: query
          description: >-
            Optional filter criteria. See [filtering](https://developer.apiture.com/docs/concepts/filtering).<br>This collection may be filtered by
            following properties and functions:<br>&bullet;  Property `type` using functions `eq`,  `ne`,  `in`<br>&bullet;  Property `_id` using
            functions `eq`,  `in`
          schema:
            type: string
        - $ref: '#/components/parameters/qQueryParam'
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/fraudRiskReports'
            application/json:
              schema:
                $ref: '#/components/schemas/fraudRiskReports'
        '400':
          $ref: '#/components/responses/400'
        '422':
          $ref: '#/components/responses/422'
    post:
      summary: Create a new fraud-risk analysis report
      description: |-
        Create a new fraud-risk analysis report in the fraud-risk analysis
        reports collection.


        If an `apiture:user` or `apiture:contact` link is specified in the request,
        the response includes a verification token.
        If the `apiture:user` or `apiture:contact` link is invalid, the API returns a 400 Bad Request response


        The following links may appear in a successful response under the
        `_links` property:

          * `self`: URI of the created fraud-risk report resource - `/fraudRiskReports/{fraudRiskReportId}`
          * `apiture:user`: If the resource was created with an `apiture:user`, this is the link to the specified resource
          * `apiture:contact`: If the resource was created with an `apiture:contact`, this is the link to the specified resource
      operationId: createFraudRiskReport
      security:
        - apiKey: []
          accessToken:
            - profiles/write
      tags:
        - Fraud-Risk Reports
      responses:
        '201':
          description: Created
          headers:
            Location:
              description: >-
                The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with
                *`schema`*`://host`
              schema:
                type: string
                format: uri
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/fraudRiskReport'
            application/json:
              schema:
                $ref: '#/components/schemas/fraudRiskReport'
        '400':
          $ref: '#/components/responses/400'
      requestBody:
        content:
          application/hal+json:
            schema:
              $ref: '#/components/schemas/createFraudRiskReport'
          application/json:
            schema:
              $ref: '#/components/schemas/createFraudRiskReport'
        description: The identity
        required: true
  '/fraudRiskReports/{fraudRiskReportId}':
    get:
      summary: Fetch a representation of this fraud-risk report
      description: |-
        Return a [HAL](https://developer.apiture.com/docs/concepts/hal) representation of this fraud-risk analysis report resource.
        The following links may appear in a successful response under the `_links` property:

          * `self`: URI of the this fraud-risk report resource - `/fraudRiskReports/{fraudRiskReportId}`
          * `apiture:user`: If the resource was created with an `apiture:user` link, this is the link to the specified resource
          * `apiture:contact`: If the resource was created with an `apiture:contact` link, this is the link to the specified resource
      operationId: getFraudRiskReport
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Fraud-Risk Reports
      parameters:
        - $ref: '#/components/parameters/fraudRiskReportIdPathParam'
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/fraudRiskReport'
            application/json:
              schema:
                $ref: '#/components/schemas/fraudRiskReport'
        '304':
          $ref: '#/components/responses/304'
        '404':
          $ref: '#/components/responses/404FraudRiskReport'
  /quizzes:
    get:
      summary: Returns a collection of quizzes
      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 quizzes. The [links](https://developer.apiture.com/docs/concepts/links) in the response include pagination links.
      operationId: getQuizzes
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Quizzes
      x-apiture-traits:
        sortBy:
          - createdAt
          - expiresAt
        itemSchema: Quizzes
        filters:
          createdAt:
            filter:
              - eq
              - ne
              - lt
              - le
              - gt
              - ge
          expiresAt:
            filter:
              - eq
              - ne
              - lt
              - le
              - gt
              - ge
          _id:
            filter:
              - eq
              - in
      parameters:
        - name: start
          in: query
          description: 'The zero-based index of the first quiz in this page. The default, 0, represents the first report in the collection.'
          schema:
            type: integer
            format: int64
            default: 0
        - name: limit
          in: query
          description: The maximum number of quiz representations to return in this page.
          schema:
            type: integer
            format: int32
            default: 100
        - name: sortBy
          in: query
          description: >-
            Optional sort criteria. See [sort criteria format](https://developer.apiture.com/docs/concepts/sorting), such as
            `?sortBy=field1,-field2`.<br>This collection may be sorted by following properties:<br>&bullet; `createdAt`<br>&bullet; `expiresAt`
          schema:
            type: string
        - name: filter
          in: query
          description: >-
            Optional filter criteria. See [filtering](https://developer.apiture.com/docs/concepts/filtering).<br>This collection may be filtered by
            following properties and functions:<br>&bullet;  Property `createdAt` using functions `eq`,  `ne`,  `lt`,  `le`,  `gt`,  `ge`<br>&bullet; 
            Property `expiresAt` using functions `eq`,  `ne`,  `lt`,  `le`,  `gt`,  `ge`<br>&bullet;  Property `_id` using functions `eq`,  `in`
          schema:
            type: string
        - $ref: '#/components/parameters/qQueryParam'
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/quizzes'
            application/json:
              schema:
                $ref: '#/components/schemas/quizzes'
        '400':
          $ref: '#/components/responses/400'
        '422':
          $ref: '#/components/responses/422'
    post:
      summary: Create a new quiz
      description: |-
        Create a new quiz in the quizzes collection for the specified identity. `state` defaults to `pending`
        If the apiture:user` or `apiture:contact` link is invalid, the API returns a 400 Bad Request response.
        The following links may appear in a successful response under the `_links` property:

          * `self`: URI of the created quiz resource - `/quizzes/{quizId}`
          * `apiture:user`: If the resource was created with an `apiture:user` link, this is the link to the specified resource
          * `apiture:contact`: If the resource was created with an `apiture:contact` link, this is the link to the specified resource
      operationId: createQuiz
      security:
        - apiKey: []
          accessToken:
            - profiles/write
      tags:
        - Quizzes
      responses:
        '201':
          description: Created
          headers:
            Location:
              description: >-
                The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with
                *`schema`*`://host`
              schema:
                type: string
                format: uri
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/quiz'
            application/json:
              schema:
                $ref: '#/components/schemas/quiz'
        '400':
          $ref: '#/components/responses/400'
      requestBody:
        content:
          application/hal+json:
            schema:
              $ref: '#/components/schemas/createQuiz'
          application/json:
            schema:
              $ref: '#/components/schemas/createQuiz'
        description: The identity
        required: true
  '/quizzes/{quizId}':
    get:
      summary: Fetch a representation of this quiz
      description: |-
        Return a [HAL](https://developer.apiture.com/docs/concepts/hal) representation of this quiz resource.
        The following links may appear in a successful response under the `_links` property:

          * `self`: URI of the this quiz resource - `/quizzes/{quizId}`
          * `apiture:user`: If the resource was created with an `apiture:user` link, this is the link to the specified resource
          * `apiture:contact`: If the resource was created with an `apiture:contact` link, this is the link to the specified resource
      operationId: getQuiz
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Quizzes
      parameters:
        - $ref: '#/components/parameters/quizIdPathParam'
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/quiz'
            application/json:
              schema:
                $ref: '#/components/schemas/quiz'
        '304':
          $ref: '#/components/responses/304'
        '404':
          $ref: '#/components/responses/404Quiz'
  '/quizzes/{quizId}/questions':
    post:
      summary: Generate the questions for a quiz
      description: |-
        Generates the a set of questions for the quiz. Questions can only be generated if the state of the resource is `pending`.
        The following links may appear in a successful response under the `_links` property:

          * `up`: URI of the quiz resource - `/quizzes/{quizId}`
          * `apiture:score`: URI of the `/quizzes/{quizId}/answers` endpoint
          * `apiture:user`: If the resource was created with an `apiture:user` link, this is the link to the specified resource
          * `apiture:contact`: If the resource was created with an `apiture:contact` link, this is the link to the specified resource
      operationId: createQuizQuestions
      security:
        - apiKey: []
          accessToken:
            - profiles/write
      tags:
        - Quizzes
      parameters:
        - $ref: '#/components/parameters/quizIdPathParam'
      responses:
        '201':
          description: Created
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/quizQuestions'
            application/json:
              schema:
                $ref: '#/components/schemas/quizQuestions'
        '400':
          $ref: '#/components/responses/400'
        '409':
          $ref: '#/components/responses/409QuizQuestionsConflict'
  '/quizzes/{quizId}/answers':
    post:
      summary: Submit the answers to a quiz
      description: >-
        Submits the answers for scoring and returns the quiz with a state of `passed`,  `failed`, `scoring` or `expired`. Can only be processed if
        state is `asked`.

        The following links may appear in a successful response under the `_links` property:

          * `up`: URI of the quiz resource - `/quizzes/{quizId}`
          * `apiture:user`: If the resource was created with an `apiture:user` link, this is the link to the specified resource
          * `apiture:contact`: If the resource was created with an `apiture:contact` link, this is the link to the specified resource
      operationId: scoreQuiz
      security:
        - apiKey: []
          accessToken:
            - profiles/write
      tags:
        - Quizzes
      parameters:
        - $ref: '#/components/parameters/quizIdPathParam'
      responses:
        '201':
          description: Created
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/quiz'
            application/json:
              schema:
                $ref: '#/components/schemas/quiz'
        '400':
          $ref: '#/components/responses/400'
        '409':
          $ref: '#/components/responses/409QuizAnswersConflict'
      requestBody:
        content:
          application/hal+json:
            schema:
              $ref: '#/components/schemas/scoreQuizAnswers'
          application/json:
            schema:
              $ref: '#/components/schemas/scoreQuizAnswers'
        description: The identity
        required: true
  /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
      security:
        - apiKey: []
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/root'
              examples:
                response:
                  value:
                    id: identity
                    name: Identity
                    apiVersion: 0.1.0
                    _profile: 'https://api.apiture.com/schemas/common/root/v2.0.1/profile.json'
                    _links:
                      'apiture:fraudRiskReports':
                        href: /identity/fraudRiskReports
                      'apiture:quizzes':
                        href: /identity/quizzes
            application/json:
              schema:
                $ref: '#/components/schemas/root'
      tags:
        - API
  /apiDoc:
    get:
      summary: Return API definition document
      description: Return the OpenAPI document that describes this API.
      operationId: getApiDoc
      security:
        - apiKey: []
      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
  /contactVerification:
    get:
      summary: Retrieves contact verification resource.
      description: >-
        Retrieves the contact verification status. If the `contactUri` link is invalid, the API returns a 400 Bad Request response.<br>**Warning**:
        The operation `getContactVerification` was deprecated on version `v0.8.0` of the API.  `getContactVerification` will be removed on version
        `v0.11.0` of the API.
      operationId: getContactVerification
      x-apiture-deprecated:
        since: 0.8.0
        removeOn: 0.11.0
        replacemnt: '`getIdentityVerification` operation'
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Identity Verifications
      parameters:
        - $ref: '#/components/parameters/contactUriParam'
        - name: type
          description: 'The identity method type. Possible values are `fraudRiskReport`, `quiz` or `adminApproval`.'
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/contactVerification'
            application/json:
              schema:
                $ref: '#/components/schemas/contactVerification'
        '400':
          $ref: '#/components/responses/400'
      deprecated: true
  /identityVerification:
    get:
      summary: Retrieves user verification resource.
      description: Retrieves the results of identity verification for a user or a contact.
      operationId: getIdentityVerification
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Identity Verifications
      parameters:
        - $ref: '#/components/parameters/userParam'
        - $ref: '#/components/parameters/contactParam'
        - name: type
          description: The type of identity verification method.
          in: query
          required: false
          schema:
            type: string
            enum:
              - fraudRiskReport
              - quiz
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/identityVerification'
            application/json:
              schema:
                $ref: '#/components/schemas/identityVerification'
        '400':
          $ref: '#/components/responses/400'
        '422':
          description: |-
            Unprocessable Entity. The input was syntactically valid but not usable.

            This error response may have one of the following `type` values:
            * [`invalidUser`](#err-invalidUser)
            * [`contactOrUser`](#err-contactOrUser)
          x-apiture-errors:
            - invalidUser
            - contactOrUser
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/errorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /approvals:
    post:
      summary: Create a new approval resource
      description: >-
        Create a new approval resource for the specified identity (user).<br>**Warning**: The operation `createApproval` was deprecated on version
        `v0.8.0` of the API. Use an `approval` resource in the Approvals API instead. `createApproval` will be removed on version `v0.11.0` of the
        API.
      operationId: createApproval
      x-apiture-deprecated:
        since: 0.8.0
        removeOn: 0.11.0
        replacement: an `approval` resource in the Approvals API
      security:
        - apiKey: []
          accessToken:
            - profiles/write
      tags:
        - Approvals
      parameters:
        - $ref: '#/components/parameters/contactUriParam'
        - $ref: '#/components/parameters/userUriParam'
        - name: type
          description: 'The identity method type. Possible values are `fraudRiskReport`, `quiz` or `adminApproval`.'
          in: query
          required: false
          schema:
            type: string
      responses:
        '201':
          description: Created
          headers:
            Location:
              description: >-
                The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with
                *`schema`*`://host`
              schema:
                type: string
                format: uri
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/approval'
            application/json:
              schema:
                $ref: '#/components/schemas/approval'
        '400':
          $ref: '#/components/responses/400Approval'
        '422':
          $ref: '#/components/responses/422Approval'
      deprecated: true
  '/approvals/{approvalId}':
    get:
      summary: Fetch a representation of this approval
      description: >-
        Return a [HAL](https://developer.apiture.com/docs/concepts/hal) representation of this approval resource.<br>**Warning**: The operation
        `getApproval` was deprecated on version `v0.8.0` of the API. Use an `approval` resource in the Approvals API instead. `getApproval` will be
        removed on version `v0.11.0` of the API.
      operationId: getApproval
      x-apiture-deprecated:
        since: 0.8.0
        removeOn: 0.11.0
        replacement: an `approval` resource in the Approvals API
      security:
        - apiKey: []
          accessToken:
            - profiles/read
      tags:
        - Approvals
      parameters:
        - $ref: '#/components/parameters/approvalIdPathParam'
      responses:
        '200':
          description: OK
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/approval'
            application/json:
              schema:
                $ref: '#/components/schemas/approval'
        '304':
          $ref: '#/components/responses/304'
        '404':
          $ref: '#/components/responses/404Approval'
      deprecated: true
x-apiture-errors:
  invalidUser:
    description: The `user` parameter is not the `_id` or URI of a valid user resource
    remediation: Supply the `_id` or URI of an existing user resource.
  contactOrUser:
    description: Only one of `contact` or `user` parameter is allowed.
    remediation: Supply either `contact` or `user` but not both.
x-apiture-traits:
  - api:
      links:
        - getApi
        - getApiDoc
        - getFraudRiskReports
        - createFraudRiskReport
        - getQuizzes
        - createQuiz
        - createApproval
        - getIdentityVerification
  - security:
      baseScope: profiles
x-apiture-annotated-at: '2020-10-02T12:30:57.211Z'
components:
  schemas:
    fraudRiskReports:
      title: Fraud Risk Reports (v2.0.0)
      description: >-
        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`).
      x-apiture-version: 2.0.0
      example:
        _profile: 'https://api.apiture.com/schemas/identity/fraudRiskReports/v2.0.0/profile.json'
        start: 0
        limit: 1
        count: 1
        name: fraudRiskReports
        _links:
          self:
            href: /identity/fraudRiskReports?start=0&limit=1
          first:
            href: /identity/fraudRiskReports?start=0&limit=1
          next:
            href: /identity/fraudRiskReports?start=1&limit=1
          collection:
            href: /identity/fraudRiskReports
        _embedded:
          items:
            _profile: 'https://api.apiture.com/schemas/identity/fraudRiskReport/v2.0.0/profile.json'
            _links:
              self:
                href: /identity/fraudRiskReports/c6dbc32f-e0eb-4947-9819-c691bb9164a5
              'apiture:user':
                href: /users/users/6da5ccc7-727a-4256-bdd4-74023ae349c3
            _id: c6dbc32f-e0eb-4947-9819-c691bb9164a5
            type: fraudRiskReport
            inputs:
              identity:
                taxId: '*****3333'
                firstName: John
                lastName: Smith
                address1: 1741 Tiburon Dr
                city: Wilmington
                region: NC
                postalCode: '28403'
                phone: 555-555-5555
                birthdate: '1940-10-15'
                email: api@apiture.com
                ipAddress: 127.0.0.1
            outputs:
              state: passedWithRiskFactors
              providerReportId: 1234
              fraudRiskCategories:
                - type: personalInfoDoesNotMatch
                  description: The retrieved identity does not match the provided PII.
                - type: addressIsPOBoxOrNonApproved
                  description: The provided address is a PO Box or other non-approved address
                - type: identityOnGovernmentWatchlist
                  description: The provided identity is located on one or more government watchlists
                - type: identityOnAlertList
                  description: The provided identity is located on one or more alert lists
                - type: ipRestricted
                  description: The provided IP address is restricted
                - type: emailRestricted
                  description: The provided email address is restricted
      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:
          type: object
          description: Embedded objects.
          properties:
            items:
              description: An array containg a page of fraud-risk analysis reports.
              type: array
              items:
                $ref: '#/components/schemas/fraudRiskReport'
        _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
    fraudRiskReport:
      title: Fraud-risk Report (v2.0.1)
      description: >
        The result of running a fraud-risk analysys.



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


        Response and request bodies using this <strong><code>fraudRiskReport</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-getFraudRiskReport'><strong><code>self</code></strong></a></td><td>Fetch a representation of this fraud-risk
        report</td><td><code>GET</code></td>

        </tr>


        <tr>

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

        <td>The user</td><td><code>GET</code></td>


        <tr>

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

        <td>The contact</td><td><code>GET</code></td>

        </table>
      x-apiture-version: 2.0.1
      x-apiture-links:
        - rel: self
          operationId: getFraudRiskReport
        - rel: 'apiture:user'
          method: get
          title: The user
          description: The user that this resource is verifying.
        - rel: 'apiture:contact'
          method: get
          title: The contact
          description: The contact that this resource is verifying.
      example:
        _profile: 'https://api.apiture.com/schemas/identity/fraudRiskReport/v2.0.1/profile.json'
        _links:
          self:
            href: /identity/fraudRiskReports/c6dbc32f-e0eb-4947-9819-c691bb9164a5
          'apiture:user':
            href: /users/users/6da5ccc7-727a-4256-bdd4-74023ae349c3
        _id: c6dbc32f-e0eb-4947-9819-c691bb9164a5
        type: fraudRiskReport
        inputs:
          identity:
            taxId: '*****3333'
            firstName: John
            lastName: Smith
            address1: 1741 Tiburon Dr
            city: Wilmington
            region: NC
            postalCode: '28403'
            phone: 555-555-5555
            birthdate: '1940-10-15'
            email: api@apiture.com
            ipAddress: 127.0.0.1
        outputs:
          state: passedWithRiskFactors
          fraudRiskCategories:
            - type: personalInfoDoesNotMatch
              description: The retrieved identity does not match the provided PII.
            - type: addressIsHighRisk
              description: The provided address is considered high-risk
            - type: addressIsPOBoxOrNonApproved
              description: The provided address is a PO Box or other non-approved address
            - type: identityOnGovernmentWatchlist
              description: The provided identity is located on one or more watchlists
            - type: ipRestricted
              description: The provided IP address is restricted
            - type: emailRestricted
              description: The provided email address is restricted
            - type: nonStandardTaxId
              description: 'The provided taxId is non-standard. Example: The provided SSN is an ITIN (Individual Taxpayer Identification Number)'
            - type: ageRestricted
              description: >-
                The provided identity does not meet the required age. Example: US COPPA laws forbid conducting e-commerce with people under 14 years
                of age.
          token: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - $ref: '#/components/schemas/identityVerificationFields'
        - properties:
            - type
            - inputs
            - outputs
      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:
          type: string
          description: A unique identifier for this resource instance. This is is an opaque string.
          readOnly: true
        createdAt:
          description: >-
            The date-time when the resource was created. This is an [RFC 3066](https://tools.ietf.org/html/rfc3339) time stamp in the form
            `YYYY-DD-MMThh:mm:ss.sssZ`.
          type: string
          format: date-time
        expiresAt:
          description: >-
            The date-time when the resource expires. This is an [RFC 3066](https://tools.ietf.org/html/rfc3339) time stamp in the form
            `YYYY-DD-MMThh:mm:ss.sssZ`.
          type: string
          format: date-time
        type:
          description: |
            The type of identity verification report. A fraud-risk report uses `type` of `fraudRiskReport`.
          allOf:
            - $ref: '#/components/schemas/identityVerificationType'
          readOnly: true
        inputs:
          $ref: '#/components/schemas/fraudRiskReportInputs'
        outputs:
          $ref: '#/components/schemas/fraudRiskReportOutputs'
      type: object
      x-apiture-flattened: true
    fraudRiskCategory:
      title: Fraud-risk Category (v1.0.0)
      description: Representation of a fraud-risk category.
      properties:
        type:
          $ref: '#/components/schemas/fraudRiskCategoryType'
        description:
          description: The description of the fraud.
          type: string
        message:
          description: The original result message that was received from the identity verification provider.
          type: string
      example:
        type: personalInfoDoesNotMatch
        description: The retrieved identity does not match the provided PII.
        message: ZIP code located does not match the ZIP code submitted.
      x-apiture-version: 1.0.0
      type: object
      x-apiture-flattened: true
    fraudRiskCategoryType:
      title: Fraud Risk Category Type (v1.0.0)
      description: |-
        Represents the possible types of fraud-risk.

        <strong><code>fraudRiskCategoryType</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>ipRestricted</code></strong></td><td>IP Restricted: The user's IP address is restricted.</td>
            </tr>
        <tr>
            <td><strong><code>identityOnGovernmentWatchlist</code></strong></td><td>On Government Watch list: The identity is on a government watch list.</td>
            </tr>
        <tr>
            <td><strong><code>identityOnAlertList</code></strong></td><td>On Alert List: The identity is on an alert list.</td>
            </tr>
        <tr>
            <td><strong><code>addressIsPOBoxOrNonApproved</code></strong></td><td>Address is PO Box or non-approved</td>
            </tr>
        <tr>
            <td><strong><code>addressIsHighRisk</code></strong></td><td>Address is high risk</td>
            </tr>
        <tr>
            <td><strong><code>ageRestricted</code></strong></td><td>Age Restricted: The person's age is restricted</td>
            </tr>
        <tr>
            <td><strong><code>nonStandardTaxId</code></strong></td><td>Non-standard Tax ID</td>
            </tr>
        <tr>
            <td><strong><code>personalInfoDoesNotMatch</code></strong></td><td>Personal information does not match</td>
            </tr>
        <tr>
            <td><strong><code>emailRestricted</code></strong></td><td>Email Restricted: The person's email address is restricted.</td>
            </tr>
        </table>


        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
        named `fraudRiskCategoryType` in the response from the [`getLabels`](#op-getLabels) operation.
      type: string
      enum:
        - ipRestricted
        - identityOnGovernmentWatchlist
        - identityOnAlertList
        - addressIsPOBoxOrNonApproved
        - addressIsHighRisk
        - ageRestricted
        - nonStandardTaxId
        - personalInfoDoesNotMatch
        - emailRestricted
      x-apiture-enum: fraudRiskCategoryType
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    createFraudRiskReport:
      title: Create Fraud Risk Report (v2.0.0)
      description: Representation used to create a new fraud-risk analysis report.
      x-apiture-version: 2.0.0
      example:
        _links:
          'apiture:user':
            href: /users/users/6da5ccc7-727a-4256-bdd4-74023ae349c3
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractRequest'
        - $ref: '#/components/schemas/identity'
      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
        taxId:
          description: >-
            The identity's masked tax or government ID. In requests, the full tax ID is required. In responses, the tax ID is masked; only the last
            four digits are shown. The mask consists of one ore more `'*'` characters.
          type: string
          maxLength: 128
          minLength: 1
          example: 112-22-3333
        firstName:
          description: The identity's first name.
          type: string
          maxLength: 128
          minLength: 1
        lastName:
          description: The identity's last name.
          type: string
          maxLength: 128
          minLength: 1
        address1:
          description: Line 1 of the identity's street address.
          type: string
          maxLength: 512
          minLength: 1
        address2:
          description: Line 2 of the identity's street address.
          type: string
          maxLength: 512
          minLength: 1
        city:
          description: The identity's city.
          type: string
          maxLength: 64
          minLength: 1
        region:
          description: The identity's region.
          type: string
          maxLength: 128
          minLength: 1
        postalCode:
          description: The identity's postal code.
          type: string
          maxLength: 32
          minLength: 1
        phone:
          description: The identity's phone.
          type: string
          maxLength: 32
          minLength: 1
        birthdate:
          description: The identity's birth date in `yyyy-mm-dd` format.
          type: string
          format: date
          pattern: '^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))$'
          maxLength: 10
          minLength: 10
        email:
          description: The identity's email address.
          type: string
          format: email
          maxLength: 256
        ipAddress:
          description: The identity's IP address.
          type: string
          format: ipv4
      type: object
      x-apiture-flattened: true
    createQuiz:
      title: Create Quiz (v2.0.0)
      description: Representation used to create a new quiz.
      x-apiture-version: 2.0.0
      example:
        _links:
          'apiture:user':
            href: /users/users/6da5ccc7-727a-4256-bdd4-74023ae349c3
      x-apiture-composition:
        - $ref: '#/components/schemas/identity'
        - $ref: '#/components/schemas/abstractRequest'
      properties:
        taxId:
          description: >-
            The identity's masked tax or government ID. In requests, the full tax ID is required. In responses, the tax ID is masked; only the last
            four digits are shown. The mask consists of one ore more `'*'` characters.
          type: string
          maxLength: 128
          minLength: 1
          example: 112-22-3333
        firstName:
          description: The identity's first name.
          type: string
          maxLength: 128
          minLength: 1
        lastName:
          description: The identity's last name.
          type: string
          maxLength: 128
          minLength: 1
        address1:
          description: Line 1 of the identity's street address.
          type: string
          maxLength: 512
          minLength: 1
        address2:
          description: Line 2 of the identity's street address.
          type: string
          maxLength: 512
          minLength: 1
        city:
          description: The identity's city.
          type: string
          maxLength: 64
          minLength: 1
        region:
          description: The identity's region.
          type: string
          maxLength: 128
          minLength: 1
        postalCode:
          description: The identity's postal code.
          type: string
          maxLength: 32
          minLength: 1
        phone:
          description: The identity's phone.
          type: string
          maxLength: 32
          minLength: 1
        birthdate:
          description: The identity's birth date in `yyyy-mm-dd` format.
          type: string
          format: date
          pattern: '^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))$'
          maxLength: 10
          minLength: 10
        email:
          description: The identity's email address.
          type: string
          format: email
          maxLength: 256
        ipAddress:
          description: The identity's IP address.
          type: string
          format: ipv4
        _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
      type: object
      x-apiture-flattened: true
    scoreQuizAnswers:
      title: Score Quiz Answers (v1.0.0)
      description: Representation used to provide answers to a quiz.
      example:
        answers:
          - questionId: '1'
            answer: Honda Accord
          - questionId: '2'
            answer: Missouri
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/coreQuizAnswers'
      properties:
        answers:
          description: The list of answers the contact gave to the quiz questions.
          type: array
          items:
            $ref: '#/components/schemas/coreAnswer'
      type: object
      x-apiture-flattened: true
    quizQuestions:
      title: Create Questions (v2.0.0)
      description: Representation used to create a new set of questions.
      x-apiture-version: 2.0.0
      example:
        _links:
          up:
            href: /identity/quizzes/73be83af-9e64-4214-8e90-76da43610b31
          'apiture:score':
            href: /identity/quizzes/73be83af-9e64-4214-8e90-76da43610b31/answers
        questions:
          - id: '1'
            question: Who have you lived with?
            choices:
              - Mary
              - Caleb
              - Angela
              - Elliott
          - id: '2'
            question: What's your mother's maiden name?
            choices:
              - Clark
              - Morris
              - Niffle
              - Bennett
        token: >-
          eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - $ref: '#/components/schemas/coreQuizQuestions'
        - $ref: '#/components/schemas/verificationToken'
      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'
        questions:
          description: An array containing a page of quiz question items.
          type: array
          items:
            $ref: '#/components/schemas/coreQuizQuestion'
        token:
          type: string
          description: An opaque string that conveys the state of the contact's identity verification.
      type: object
      x-apiture-flattened: true
    verificationToken:
      title: Verification Token (v1.0.0)
      description: The token used to validate and track a contact for identity verification purposes.
      properties:
        token:
          type: string
          description: An opaque string that conveys the state of the contact's identity verification.
      x-apiture-version: 1.0.0
      type: object
      x-apiture-flattened: true
    contactVerification:
      title: Verification (v2.0.0)
      description: The contact's verification history and status.
      x-apiture-version: 2.0.0
      example:
        _links:
          'apiture:user':
            href: /users/users/6da5ccc7-727a-4256-bdd4-74023ae349c3
        verifications:
          - type: fraudRiskReport
            _links:
              self:
                href: /identity/fraudRiskReports/c6dbc32f-e0eb-4947-9819-c691bb9164a5
            state: passed
            createdAt: '2018-01-12T10:15:17Z'
          - type: quiz
            _links:
              self:
                href: /identity/quizzes/73be83af-9e64-4214-8e90-76da43610b31
            state: passed
            createdAt: '2018-01-12T10:19:41Z'
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - verifications
      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'
        verifications:
          description: The history of this contact's identity verifications.
          type: array
          items:
            $ref: '#/components/schemas/identityHistoryItem'
      type: object
      x-apiture-flattened: true
    identityVerificationState:
      title: IdentityVerification Type (v1.0.0)
      description: |-
        The type of the historical verification.

        <strong><code>identityVerificationState</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>passed</code></strong></td><td>Passed: Identity verification passed.</td>
            </tr>
        <tr>
            <td><strong><code>failed</code></strong></td><td>Failed: Identity verification failed.</td>
            </tr>
        <tr>
            <td><strong><code>passedWithRiskFactors</code></strong></td><td>PassedWithRiskFactors: Identity verification passed with risk factors.</td>
            </tr>
        <tr>
            <td><strong><code>pending</code></strong></td><td>Pending: Identity verification has not started.</td>
            </tr>
        <tr>
            <td><strong><code>asked</code></strong></td><td>Asked: Identity verification is in progress, after personal questions have been presented to the user.</td>
            </tr>
        <tr>
            <td><strong><code>identityServiceFailure</code></strong></td><td>IdentityServiceFailure: Identity verification failed to complete due to a failure in a back-end or third party service.</td>
            </tr>
        <tr>
            <td><strong><code>scoring</code></strong></td><td>Scoring: Identity verification is generating a verification score.</td>
            </tr>
        <tr>
            <td><strong><code>expired</code></strong></td><td>Expired: The user did not complete the identity verification process before it expired.
        </td>
            </tr>
        </table>


        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
        named `identityVerificationState` in the response from the [`getLabels`](#op-getLabels) operation.
      type: string
      enum:
        - passed
        - failed
        - passedWithRiskFactors
        - pending
        - asked
        - identityServiceFailure
        - scoring
        - expired
      x-apiture-enum: identityVerificationState
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    identityHistoryItem:
      title: Identity Verification Item (v1.0.0)
      description: One verification record for a contact's history of verifications.
      type: object
      required:
        - state
        - createdAt
      properties:
        _links:
          $ref: '#/components/schemas/links'
        state:
          $ref: '#/components/schemas/identityVerificationState'
        type:
          $ref: '#/components/schemas/identityVerificationType'
        createdAt:
          description: >-
            The date-time when the verification occurred or completed. This is an [RFC 3066](https://tools.ietf.org/html/rfc3339) time stamp in the
            form `YYYY-DD-MMThh:mm:ss.sssZ`.
          type: string
          format: date-time
        expiredAt:
          description: >-
            The date-time when the verification expired. This is only set if the `state` is `expired`. This is an [RFC
            3066](https://tools.ietf.org/html/rfc3339) time stamp in the form `YYYY-DD-MMThh:mm:ss.sssZ`.
          type: string
          format: date-time
      example:
        state: passed
        createdAt: '2019-11-21T08:43:54.375Z'
        type: quiz
        _links:
          'apiture:user':
            href: 'https://api.example.bank/users/users/d77bef0b-c75c-4192-ba88-278b9ce4063b'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    identity:
      title: Identity (v1.0.0)
      description: Information that describes the identity.
      required:
        - taxId
        - firstName
        - lastName
        - address1
        - city
        - region
        - postalCode
        - phone
        - birthdate
      properties:
        taxId:
          description: >-
            The identity's masked tax or government ID. In requests, the full tax ID is required. In responses, the tax ID is masked; only the last
            four digits are shown. The mask consists of one ore more `'*'` characters.
          type: string
          maxLength: 128
          minLength: 1
          example: 112-22-3333
        firstName:
          description: The identity's first name.
          type: string
          maxLength: 128
          minLength: 1
        lastName:
          description: The identity's last name.
          type: string
          maxLength: 128
          minLength: 1
        address1:
          description: Line 1 of the identity's street address.
          type: string
          maxLength: 512
          minLength: 1
        address2:
          description: Line 2 of the identity's street address.
          type: string
          maxLength: 512
          minLength: 1
        city:
          description: The identity's city.
          type: string
          maxLength: 64
          minLength: 1
        region:
          description: The identity's region.
          type: string
          maxLength: 128
          minLength: 1
        postalCode:
          description: The identity's postal code.
          type: string
          maxLength: 32
          minLength: 1
        phone:
          description: The identity's phone.
          type: string
          maxLength: 32
          minLength: 1
        birthdate:
          description: The identity's birth date in `yyyy-mm-dd` format.
          type: string
          format: date
          pattern: '^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))$'
          maxLength: 10
          minLength: 10
        email:
          description: The identity's email address.
          type: string
          format: email
          maxLength: 256
        ipAddress:
          description: The identity's IP address.
          type: string
          format: ipv4
      example:
        taxId: 112-22-3333
        firstName: John
        lastName: Smith
        address1: 1741 Tiburon Dr
        city: Wilmington
        region: NC
        postalCode: '28403'
        phone: 15555555555
        birthdate: '1940-10-15'
        email: api@apiture.com
        ipAddress: 127.0.0.1
      x-apiture-version: 1.0.0
      type: object
      x-apiture-flattened: true
    quizzes:
      title: Quizzes (v2.0.0)
      description: Collection of quizzes.
      x-apiture-version: 2.0.0
      example:
        _profile: 'https://api.apiture.com/schemas/identity/quizzes/v2.0.0/profile.json'
        start: 0
        limit: 1
        count: 1
        name: quizzes
        _links:
          self:
            href: 'https://api.example.bank/identity/quizzes?start=0&limit=1'
          first:
            href: 'https://api.example.bank/identity/quizzes?start=0&limit=1'
          next:
            href: 'https://api.example.bank/identity/quizzes?start=1&limit=1'
          collection:
            href: 'https://api.example.bank/identity/quizzes'
        _embedded:
          items:
            anyOf:
              - createdAt: '2018-01-12T10:15:17Z'
                expiresAt: '2018-01-12T10:30:17Z'
                _links:
                  self:
                    href: 'https://api.example.bank/identity/quizzes/73be83af-9e64-4214-8e90-76da43610b31'
                  'apiture:score':
                    href: 'https://api.example.bank/identity/quizzes/73be83af-9e64-4214-8e90-76da43610b31/answers'
                  'apiture:user':
                    href: 'https://api.example.bank/users/users/6da5ccc7-727a-4256-bdd4-74023ae349c3'
                inputs:
                  identity:
                    taxId: '*****3333'
                    firstName: John
                    lastName: Smith
                    address1: 1741 Tiburon Dr
                    city: Wilmington
                    region: NC
                    postalCode: '28403'
                    phone: 15555555555
                    birthdate: '1940-10-15'
                    email: api@apiture.com
                    ipAddress: 127.0.0.1
                outputs:
                  state: failed
                  token: >-
                    eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o
              - createdAt: '2018-01-02T12:11:47Z'
                expiresAt: '2018-01-02T12:26:47Z'
                _links:
                  self:
                    href: 'https://api.example.bank/identity/quizzes/a71c3843-32c2-4054-b7b2-fcf11a84532f'
                inputs:
                  identity:
                    taxId: '*****3333'
                    firstName: Mary
                    lastName: Williams
                    address1: 1741 Tiburon Dr
                    city: Wilmington
                    region: NC
                    postalCode: '28403'
                    phone: 15555555555
                    birthdate: '1960-03-05'
                    email: api@apiture.com
                    ipAddress: 127.0.0.1
                outputs:
                  state: passed
                  token: >-
                    eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o
      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:
          type: object
          description: Embedded objects.
          properties:
            items:
              description: An array containg a page of quizzes.
              type: array
              items:
                $ref: '#/components/schemas/quiz'
        _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
    quiz:
      title: Quiz (v2.0.1)
      description: >
        A quiz containing a collection of questions and their possible answers. These questions can be used to present a multiple-choice quiz in order
        to verify the identity.



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


        Response and request bodies using this <strong><code>quiz</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-createQuizQuestions'><strong><code>apiture:createQuizQuestions</code></strong></a></td><td>Generate the questions for a
        quiz</td><td><code>POST</code></td>

        </tr>


        <tr>

        <td><a href='#op-scoreQuiz'><strong><code>apiture:score</code></strong></a></td><td>Submit the answers to a
        quiz</td><td><code>POST</code></td>

        </tr>


        <tr>

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

        <td>The user</td><td><code>GET</code></td>


        <tr>

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

        <td>The contact</td><td><code>GET</code></td>

        </table>
      x-apiture-version: 2.0.1
      x-apiture-links:
        - rel: 'apiture:createQuizQuestions'
          operationId: createQuizQuestions
        - rel: 'apiture:score'
          operationId: scoreQuiz
        - rel: 'apiture:user'
          method: get
          title: The user
          description: The user that this resource is verifying.
        - rel: 'apiture:contact'
          method: get
          title: The contact
          description: The contact that this resource is verifying.
      example:
        _id: 73be83af-9e64-4214-8e90-76da43610b31
        type: quiz
        createdAt: '2018-01-12T10:15:17Z'
        expiresAt: '2018-01-12T10:30:17Z'
        _profile: 'https://api.apiture.com/schemas/identity/quiz/v2.0.1/profile.json'
        _links:
          self:
            href: 'https://api.example.bank/identity/quizzes/73be83af-9e64-4214-8e90-76da43610b31'
          'apiture:score':
            href: 'https://api.example.bank/identity/quizzes/73be83af-9e64-4214-8e90-76da43610b31/answers'
          'apiture:getQuestions':
            href: 'https://api.example.bank/identity/quizzes/73be83af-9e64-4214-8e90-76da43610b31/questions'
          'apiture:user':
            href: 'https://api.example.bank/users/users/6da5ccc7-727a-4256-bdd4-74023ae349c3'
        inputs:
          identity:
            _profile: 'https://api.apiture.com/schemas/identity/identity/v1.0.0/profile.json'
            taxId: '*****3333'
            firstName: John
            lastName: Smith
            address1: 1741 Tiburon Dr
            city: Wilmington
            region: NC
            postalCode: '28403'
            phone: 15555555555
            birthdate: '1940-10-15'
            email: api@apiture.com
            ipAddress: 127.0.0.1
        outputs:
          state: passed
          token: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - $ref: '#/components/schemas/identityVerificationFields'
        - properties:
            - type
            - inputs
            - outputs
      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:
          type: string
          description: A unique identifier for this resource instance. This is is an opaque string.
          readOnly: true
        createdAt:
          description: >-
            The date-time when the resource was created. This is an [RFC 3066](https://tools.ietf.org/html/rfc3339) time stamp in the form
            `YYYY-DD-MMThh:mm:ss.sssZ`.
          type: string
          format: date-time
        expiresAt:
          description: >-
            The date-time when the resource expires. This is an [RFC 3066](https://tools.ietf.org/html/rfc3339) time stamp in the form
            `YYYY-DD-MMThh:mm:ss.sssZ`.
          type: string
          format: date-time
        type:
          description: |
            The type of identity verification report. A quiz uses `type` of `quiz`.
          allOf:
            - $ref: '#/components/schemas/identityVerificationType'
          readOnly: true
        inputs:
          $ref: '#/components/schemas/quizInputs'
        outputs:
          $ref: '#/components/schemas/quizOutputs'
      type: object
      x-apiture-flattened: true
    coreQuizQuestions:
      title: Quiz Questions (v1.0.0)
      description: The questions of a quiz.
      properties:
        questions:
          description: An array containing a page of quiz question items.
          type: array
          items:
            $ref: '#/components/schemas/coreQuizQuestion'
      example:
        questions:
          - id: '1'
            question: Who have you lived with?
            choices:
              - Mary
              - Caleb
              - Angela
              - Elliott
          - id: '2'
            question: What's your mother's maiden name?
            choices:
              - Clark
              - Morris
              - Niffle
              - Bennett
      x-apiture-version: 1.0.0
      type: object
      x-apiture-flattened: true
    coreQuizQuestion:
      title: Quiz Question (v1.0.0)
      description: A question of a quiz.
      required:
        - id
        - question
      properties:
        id:
          description: The identifier for this question. A quiz answer is associated with the question via the `questionId`.
          type: string
        question:
          description: The question text.
          type: string
        choices:
          description: An array containing a page of quiz question choice items.
          type: array
          items:
            type: string
      example:
        id: '1'
        question: Who have you lived with?
        choices:
          - Mary
          - Caleb
          - Angela
          - Elliott
      x-apiture-version: 1.0.0
      type: object
      x-apiture-flattened: true
    coreQuizAnswers:
      title: Quiz Answers (v1.0.0)
      description: A collection of answers to a quiz.
      example:
        answers:
          - questionId: '1'
            answer: Honda Accord
          - questionId: '2'
            answer: Missouri
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - properties:
            - answers
      properties:
        answers:
          description: The list of answers the contact gave to the quiz questions.
          type: array
          items:
            $ref: '#/components/schemas/coreAnswer'
      type: object
      x-apiture-flattened: true
    coreAnswer:
      title: Quiz Answer (v1.0.0)
      description: An answer to a quiz question.
      required:
        - questionId
        - answer
      properties:
        questionId:
          description: The ID corresponding to the question in the quiz.
          type: string
          maxLength: 256
          minLength: 1
        answer:
          description: The answer to the question.
          maxLength: 256
          minLength: 1
          type: string
      example:
        questionId: '1'
        answer: Honda Accord
      x-apiture-version: 1.0.0
      type: object
      x-apiture-flattened: true
    outputs:
      title: Outputs (v1.0.0)
      description: Base model schema for identity verification operations outputs.
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/verificationToken'
      properties:
        token:
          type: string
          description: An opaque string that conveys the state of the contact's identity verification.
      type: object
      x-apiture-flattened: true
    quizOutputs:
      title: Quiz Outputs (v1.0.0)
      description: The outputs of a quiz. Used for workflow.
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/outputs'
        - properties:
            - state
      properties:
        token:
          type: string
          description: An opaque string that conveys the state of the contact's identity verification.
        state:
          $ref: '#/components/schemas/identityVerificationState'
      type: object
      x-apiture-flattened: true
    fraudRiskReportState:
      title: Fraud Risk Report State (v1.0.0)
      type: string
      description: >-
        The state of a fraud report. `passed` indicates that the provided personally identifiable information (PII) was located and contains no risk
        factors. `passedWithRiskFactors` means that the provided PII matches an identity but contains risk factors. `failed` means that the provided
        PII does not match any identity records.


        <strong><code>fraudRiskReportState</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>passed</code></strong></td><td>Passed: Identity verification passed.</td>
            </tr>
        <tr>
            <td><strong><code>failed</code></strong></td><td>Failed: Identity verification failed.</td>
            </tr>
        <tr>
            <td><strong><code>passedWithRiskFactors</code></strong></td><td>Passed with Risk Factors: Identity verification passed with risk factors.</td>
            </tr>
        </table>



        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)

        named `fraudRiskReportState` in the response from the [`getLabels`](#op-getLabels) operation.
      enum:
        - passed
        - passedWithRiskFactors
        - failed
      x-apiture-enum: fraudRiskReportState
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    fraudRiskReportOutputs:
      title: Fraud-risk Report Outputs (v1.0.0)
      description: The outputs of a fraud-risk report.
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/outputs'
        - properties:
            - providerReportId
            - state
            - fraudRiskCategories
      properties:
        token:
          type: string
          description: An opaque string that conveys the state of the contact's identity verification.
        providerReportId:
          type: string
          description: External identity provider report Id.
        state:
          $ref: '#/components/schemas/fraudRiskReportState'
        fraudRiskCategories:
          description: A list of categories in this report.
          type: array
          items:
            $ref: '#/components/schemas/fraudRiskCategory'
      type: object
      x-apiture-flattened: true
    quizInputs:
      title: Quiz Inputs (v1.0.0)
      description: The inputs of a quiz.
      type: object
      properties:
        identity:
          $ref: '#/components/schemas/identity'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    fraudRiskReportInputs:
      title: Fraud-risk Report Inputs (v1.0.0)
      description: The inputs of a fraud-risk report.
      type: object
      properties:
        identity:
          $ref: '#/components/schemas/identity'
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    identityVerification:
      title: Identity Verification Data (v1.0.0)
      description: |
        Results of identity verification process that tells if a user has passed or failed the identity check or if the verification expired.


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

        Response and request bodies using this <strong><code>identityVerification</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><strong><code>apiture:user</code></strong></td>
        <td>The user</td><td><code>GET</code></td>

        <tr>
        <td><strong><code>apiture:contact</code></strong></td>
        <td>The contact</td><td><code>GET</code></td>
        </table>
      x-apiture-links:
        - rel: 'apiture:user'
          method: get
          title: The user
          description: The user that this resource is verifying.
        - rel: 'apiture:contact'
          method: get
          title: The contact
          description: The contact that this resource is verifying.
      example:
        _profile: 'https://api.apiture.com/schemas/identity/identityVerification/v1.0.0/profile.json'
        provider: IDology
        sessionId: c97671fc-b658-4c15-a1c8-819e691b7d3c
        scoredAt: '2020-06-04T13:28:59.375Z'
        score: passed
        result: verified
        _links:
          'apiture:user':
            href: 'https://api.example.bank/users/users/6da5ccc7-727a-4256-bdd4-74023ae349c3'
        verifications:
          - type: fraudRiskReport
            _links:
              self:
                href: 'https://api.example.bank/identity/fraudRiskReports/c6dbc32f-e0eb-4947-9819-c691bb9164a5'
            state: passed
            createdAt: '2018-01-12T10:15:17Z'
          - type: quiz
            _links:
              self:
                href: 'https://api.example.bank/identity/quizzes/73be83af-9e64-4214-8e90-76da43610b31'
            state: passed
            createdAt: '2018-01-12T10:19:41Z'
      x-apiture-version: 1.0.0
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - properties:
            - verifications
            - provider
            - sessionId
            - scoredAt
            - score
            - result
      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'
        verifications:
          description: The history of this contact's identity verifications.
          type: array
          items:
            $ref: '#/components/schemas/identityHistoryItem'
          readOnly: true
        provider:
          title: Identity verification provider
          description: The name of the identity verification provider.
          readOnly: true
          type: string
        sessionId:
          title: Session Id
          description: The unique id for a session of the identity verification process.
          readOnly: true
          type: string
        scoredAt:
          title: Time Stamp scored at
          description: 'The date-time when the provider ran identity verification. This is an [RFC 3339](https://tools.ietf.org/html/rfc3339) time stamp.'
          type: string
          format: date-time
          readOnly: true
          example: '2019-09-13T06:11:01.375Z'
        score:
          title: Verification Score
          description: The indication if the user has passed or failed the identity verification process.
          type: string
          readOnly: true
          enum:
            - passed
            - failed
            - expired
        result:
          title: Verification Result
          description: >-
            The identity verification status for this person.  This field is read-only and is derived from the results of any identity verification
            processes executed against the personally identifiable information (PII) in the associated user.
          allOf:
            - $ref: '#/components/schemas/verificationResult'
          readOnly: true
      type: object
      x-apiture-flattened: true
    verificationResult:
      title: Verification Result (v1.0.0)
      description: >-
        The identity verification status for this person.  This field is read-only and is derived from the results of any identity verification
        processes executed against the personally identifiable information (PII) contained in this record.


        <strong><code>verificationResult</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>unknown</code></strong></td><td>Unknown: The user's identity verification result is unknown.</td>
            </tr>
        <tr>
            <td><strong><code>verified</code></strong></td><td>Verified: The user's identity has been verified (passed).</td>
            </tr>
        <tr>
            <td><strong><code>unverified</code></strong></td><td>Unverified: The user's identity has not been verified (failed).</td>
            </tr>
        </table>



        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)

        named `verificationResult` in the response from the [`getLabels`](#op-getLabels) operation.
      type: string
      readOnly: true
      enum:
        - unknown
        - verified
        - unverified
      x-apiture-enum: verificationResult
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    identityVerificationFields:
      title: Identity Verification Fields (v3.0.0)
      description: Properties common to various identity verification resources.
      x-apiture-fragment: true
      x-apiture-version: 3.0.0
      x-apiture-composition:
        - properties:
            - _id
            - createdAt
            - expiresAt
      properties:
        _id:
          type: string
          description: A unique identifier for this resource instance. This is is an opaque string.
          readOnly: true
        createdAt:
          description: >-
            The date-time when the resource was created. This is an [RFC 3066](https://tools.ietf.org/html/rfc3339) time stamp in the form
            `YYYY-DD-MMThh:mm:ss.sssZ`.
          type: string
          format: date-time
        expiresAt:
          description: >-
            The date-time when the resource expires. This is an [RFC 3066](https://tools.ietf.org/html/rfc3339) time stamp in the form
            `YYYY-DD-MMThh:mm:ss.sssZ`.
          type: string
          format: date-time
      type: object
      x-apiture-flattened: true
    identityVerificationType:
      title: Identity Verification Type (v1.0.0)
      description: |-
        Describes how the identity verification was performed.

        <strong><code>identityVerificationType</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>fraudRiskReport</code></strong></td><td>Fraud Risk Report: Verification performed by generating a fraud risk report based on the identity's personal information.</td>
            </tr>
        <tr>
            <td><strong><code>quiz</code></strong></td><td>Quiz: Verification performed by executing a quiz based on personal knowledge the individual should know.</td>
            </tr>
        <tr>
            <td><strong><code>adminApproval</code></strong></td><td>Admin Approval: Verification performed by an administrator explicitly approving the identity, for example after manually inspecting identity verification documents from the user.</td>
            </tr>
        </table>


        These enumeration values are further described by the [label group](https://developer.apiture.com/concepts/label-groups)
        named `identityVerificationType` in the response from the [`getLabels`](#op-getLabels) operation.
      type: string
      enum:
        - fraudRiskReport
        - quiz
        - adminApproval
      x-apiture-enum: identityVerificationType
      x-apiture-version: 1.0.0
      x-apiture-flattened: true
    approval:
      title: Approval (v2.0.1)
      description: >-
        The core representation of an Approval resource. This represents a manual approval and would typically be created by an FI admin when a
        Contact fails one or more steps of the identity verification workflow.<br>**Warning**: The schema `approval` was deprecated on version
        `v0.8.0` of the API. Use an `approval` resource in the Approvals API instead. `approval` will be removed on version `v0.11.0` of the API.
      x-apiture-version: 2.0.1
      x-apiture-deprecated:
        since: 0.8.0
        removeOn: 0.11.0
        replacement: an `approval` resource in the Approvals API
      example:
        _profile: 'https://api.apiture.com/schemas/identity/approval/v2.0.1/profile.json'
        _links:
          self:
            href: 'https://api.example.bank/identity/approval/a42234d9-b16a-439d-b464-55296a0b229a'
          'apiture:user':
            href: 'https://api.example.bank/users/users/6da5ccc7-727a-4256-bdd4-74023ae349c3'
        _id: a42234d9-b16a-439d-b464-55296a0b229a
        type: adminApproval
        createdAt: '2018-01-12T10:15:17Z'
      x-apiture-composition:
        - $ref: '#/components/schemas/abstractResource'
        - $ref: '#/components/schemas/identityVerificationFields'
        - 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'
        _id:
          type: string
          description: A unique identifier for this resource instance. This is is an opaque string.
          readOnly: true
        createdAt:
          description: >-
            The date-time when the resource was created. This is an [RFC 3066](https://tools.ietf.org/html/rfc3339) time stamp in the form
            `YYYY-DD-MMThh:mm:ss.sssZ`.
          type: string
          format: date-time
        expiresAt:
          description: >-
            The date-time when the resource expires. This is an [RFC 3066](https://tools.ietf.org/html/rfc3339) time stamp in the form
            `YYYY-DD-MMThh:mm:ss.sssZ`.
          type: string
          format: date-time
        type:
          description: |
            The type of identity verification report. An approval uses `type` of `approval`.
          allOf:
            - $ref: '#/components/schemas/identityVerificationType'
          readOnly: true
      type: object
      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.


        This schema was resolved from [`common/localizedLabels`](https://production.api.apiture.com/schemas/common/localizedLabels/v1.0.0/model.json).
      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.

        This schema was resolved from [`common/root`](https://production.api.apiture.com/schemas/common/root/v2.0.1/model.json).
      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
    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.

        This schema was resolved from [`common/errorResponse`](https://production.api.apiture.com/schemas/common/errorResponse/v2.0.0/model.json).
      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
    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.

        This schema was resolved from [`common/collection`](https://production.api.apiture.com/schemas/common/collection/v2.0.0/model.json).
      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
    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`.


        This schema was resolved from
        [`common/abstractResource`](https://production.api.apiture.com/schemas/common/abstractResource/v2.0.0/model.json).
      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
    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`.


        This schema was resolved from [`common/abstractRequest`](https://production.api.apiture.com/schemas/common/abstractRequest/v2.0.0/model.json).
      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
    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.

        This schema was resolved from [`common/links`](https://production.api.apiture.com/schemas/common/links/v1.0.0/model.json).
      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
    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.


        This schema was resolved from [`common/localizedLabel`](https://production.api.apiture.com/schemas/common/localizedLabel/v1.0.0/model.json).
      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
    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.


        This schema was resolved from [`common/link`](https://production.api.apiture.com/schemas/common/link/v1.0.0/model.json).
      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
    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.

        This schema was resolved from [`common/error`](https://production.api.apiture.com/schemas/common/error/v2.0.0/model.json).
      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
    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.

        This schema was resolved from [`common/attributes`](https://production.api.apiture.com/schemas/common/attributes/v2.0.0/model.json).
      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
    attributeValue:
      x-apiture-version: 2.0.0
      title: Attribute Value (v2.0.0)
      description: |-
        The data associated with this attribute.

        This schema was resolved from [`common/attributeValue`](https://production.api.apiture.com/schemas/common/attributeValue/v2.0.0/model.json).
      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. One or more of the query parameters was not well formed. The `_error` field in the response contains details about the request
        error.
      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 contains
        details about the request error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    400Approval:
      description: >-
        Bad Request. The `{contactUri}` query parameter was not well formed. The `_error` field in the response contains details about the request
        error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    404FraudRiskReport:
      description: >-
        Not Found. There is no such fraud-risk report resource at the specified `{fraudRiskReportId}` The `_error` field in the response contains
        details about the request error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    422Approval:
      description: >-
        Unprocessable Entity. The `{contactUri}` parameter was well formed but otherwise invalid. The `_error` field in the response contains details
        about the request error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    404Quiz:
      description: >-
        Not Found. There is no such quiz resource at the specified `{quizId}` The `_error` field in the response contains details about the request
        error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    404Approval:
      description: >-
        Not Found. There is no such approval at the specified `{fraudRiskReportId}` The `_error` field in the response contains details about the
        request error.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    409QuizAnswersConflict:
      description: Conflict. Answers may only be submitted if the current state of the resource is `asked`.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    409QuizQuestionsConflict:
      description: Conflict. Questions may only be retrieved if the current state of the resource is `pending`.
      content:
        application/hal+json:
          schema:
            $ref: '#/components/schemas/errorResponse'
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
  parameters:
    filterQueryParam:
      name: filter
      in: query
      description: 'Optional filter criteria. See [filtering](https://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
    fraudRiskReportIdPathParam:
      name: fraudRiskReportId
      description: The unique identifier of this fraud-risk report. This is an opaque string.
      in: path
      required: true
      schema:
        type: string
    quizIdPathParam:
      name: quizId
      description: The unique identifier of this quiz. This is an opaque string.
      in: path
      required: true
      schema:
        type: string
    approvalIdPathParam:
      name: approvalId
      description: The unique identifier of this approval. This is an opaque string.
      in: path
      required: true
      schema:
        type: string
    contactUriParam:
      name: contactUri
      description: >-
        The URI of the contact being verified<br>**Warning**: The parameter `contactUri` was deprecated on version `v0.6.0` of the API. Use contact
        instead. `contactUri` will be removed on version `v0.11.0` of the API.
      in: query
      x-apiture-deprecated:
        since: 0.6.0
        removeOn: 0.11.0
        replacement: contact
      schema:
        type: string
    contactParam:
      name: contact
      description: The `_id` or URI of the contact being verified
      in: query
      schema:
        type: string
    userUriParam:
      name: userUri
      description: >-
        The URI of a user resource being verified.<br>**Warning**: The parameter `userUri` was deprecated on version `v0.6.0` of the API. Use user
        instead. `userUri` will be removed on version `v0.11.0` of the API.
      in: query
      x-apiture-deprecated:
        since: 0.6.0
        removeOn: 0.11.0
        replacement: user
      schema:
        type: string
    userParam:
      name: user
      description: The `_id` or URI of a user resource being verified.
      in: query
      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:
            profiles/read: Read access to user and contact related resources.
            profiles/write: Write (update) access to user and contact related resources.
            profiles/delete: Delete access to user and contact related resources.
            profiles/full: Full access to user and contact related resources.
