> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baselayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get your application's visit identity funnel

> Visits per identity stage over the days asked for, each visit counted once at its stage now, on the day it started in `tz`, and the credentialed ones by identity level. Every stage and level is present, 0 when none. With no dates the range is the last 30 days in `tz`; a missing `end_date` is today and a missing `start_date` is 29 days before the end. A range over 366 days is a 422 `date_range_too_large`. A visit's figures lag its latest record by about a minute.



## OpenAPI

````yaml /api-reference/openapi.json get /acceptance/visits/identity_funnel
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /acceptance/visits/identity_funnel:
    get:
      tags:
        - Acceptance
      summary: Get your application's visit identity funnel
      description: >-
        Visits per identity stage over the days asked for, each visit counted
        once at its stage now, on the day it started in `tz`, and the
        credentialed ones by identity level. Every stage and level is present, 0
        when none. With no dates the range is the last 30 days in `tz`; a
        missing `end_date` is today and a missing `start_date` is 29 days before
        the end. A range over 366 days is a 422 `date_range_too_large`. A
        visit's figures lag its latest record by about a minute.
      operationId: acceptance_visits_identity_funnel_get
      parameters:
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: 'Filter records created on or after this date (format: YYYY-MM-DD).'
            title: Start Date
          description: 'Filter records created on or after this date (format: YYYY-MM-DD).'
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: >-
              Filter records created on or before this date (format:
              YYYY-MM-DD).
            title: End Date
          description: 'Filter records created on or before this date (format: YYYY-MM-DD).'
        - name: tz
          in: query
          required: false
          schema:
            type: string
            description: >-
              IANA timezone identifier used to interpret start_date and end_date
              (defaults to UTC).
            examples:
              - UTC
              - America/Los_Angeles
              - Europe/London
            default: UTC
            title: Tz
          description: >-
            IANA timezone identifier used to interpret start_date and end_date
            (defaults to UTC).
      responses:
        '200':
          description: The identity funnel.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1.VisitIdentityFunnel'
            application/vnd.baselayer.v1+json:
              schema:
                $ref: '#/components/schemas/v1.VisitIdentityFunnel'
        '422':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                title: ValidationFailed
                description: The request is invalid.
                examples:
                  - type: validation_failed
                    code: 7112
                    message: The request is invalid.
                    metadata: {}
        '503':
          description: >-
            Acceptance data cannot be read right now; retry after `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                title: AcceptanceReadsUnavailable
                description: >-
                  Acceptance data is temporarily unavailable. Retry after the
                  Retry-After interval.
                examples:
                  - type: acceptance_reads_unavailable
                    code: 7252
                    message: >-
                      Acceptance data is temporarily unavailable. Retry after
                      the Retry-After interval.
                    metadata: {}
      security:
        - APIKeyHeader: []
components:
  schemas:
    v1.VisitIdentityFunnel:
      description: |-
        Your application's visits by how far their identity got, each visit
        counted once, at its stage now, on the day it started in `tz`.
      properties:
        start_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          description: The first day counted, in `tz`; null for none.
          title: Start Date
        end_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          description: The last day counted, in `tz`; null for none.
          title: End Date
        tz:
          description: The IANA zone the days are read in.
          title: Tz
          type: string
        stages:
          description: Every stage, `anonymous` to `credentialed`, 0 when none.
          items:
            $ref: '#/components/schemas/v1.VisitIdentityStageCount'
          title: Stages
          type: array
        credentialed_by_level:
          description: >-
            The credentialed visits by identity level, L1 to L3, 0 when none; a
            credentialed visit with no level is in no row.
          items:
            $ref: '#/components/schemas/v1.VisitIdentityLevelCount'
          title: Credentialed By Level
          type: array
        total_visit_count:
          description: Every visit counted.
          minimum: 0
          title: Total Visit Count
          type: integer
      required:
        - start_date
        - end_date
        - tz
        - stages
        - credentialed_by_level
        - total_visit_count
      title: VisitIdentityFunnel (v1)
      type: object
    Error:
      properties:
        type:
          type: string
          title: Type
          description: >-
            Stable snake_case name of the error. Branch on this, never on
            `message`.
        code:
          type: integer
          title: Code
          description: Integer catalog code of the error.
        message:
          type: string
          title: Message
          description: For a human reading a log; not stable and not localized.
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Context documented per `type`.
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: The `X-Request-ID` of the failed request.
      type: object
      required:
        - type
        - code
        - message
      title: Error
      description: The one body of every error a KYA route answers.
    v1.VisitIdentityStageCount:
      properties:
        stage:
          $ref: '#/components/schemas/v1.VisitIdentityStage'
          description: The identity stage.
        visit_count:
          description: Visits at this stage.
          minimum: 0
          title: Visit Count
          type: integer
      required:
        - stage
        - visit_count
      title: VisitIdentityStageCount (v1)
      type: object
    v1.VisitIdentityLevelCount:
      properties:
        identity_level:
          $ref: '#/components/schemas/v1.IdentityLevel'
          description: The identity level.
        visit_count:
          description: Credentialed visits at this level.
          minimum: 0
          title: Visit Count
          type: integer
      required:
        - identity_level
        - visit_count
      title: VisitIdentityLevelCount (v1)
      type: object
    v1.VisitIdentityStage:
      description: >-
        How far a visit's identity got, from its presence trust.


        `declared` and `verified_agent` follow the visit's latest presence
        trust, so

        a visit can fall back from them; `credentialed` never falls back.
      enum:
        - anonymous
        - declared
        - verified_agent
        - credentialed
      title: VisitIdentityStage
      type: string
    v1.IdentityLevel:
      description: |-
        The deepest identity established for a visitor, lowest to highest:
        `L1` the operator is known, `L2` a consistent per-person identifier
        (pseudonymous), `L3` a verified-identity credential.
      enum:
        - L1
        - L2
        - L3
      title: IdentityLevel
      type: string
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.