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

# Partner portal visits

> Every in-scope partner (visited or not) with its contacts' own visit records for the period — the follow-up list for 'which partners have not logged in since X'. `visited` filters inside the selected range; `last_visit_before` filters on the partner's most recent visit at ANY time and always includes partners that have never visited. Contacts are non-archived, most recent visit first, capped at 50 per partner (`contacts_total` is the full count). Requires the `analytics` read scope AND the `contacts` read scope — the contacts check is enforced per request, so a key with only `analytics` read is refused.



## OpenAPI

````yaml /openapi.json get /analytics/engagement/partner-visits
openapi: 3.1.0
info:
  title: Journeybee API
  description: >-
    Public REST API for the Journeybee PRM platform.


    Manage partners, leads, deals, products, pricing calculators, tasks, and
    more programmatically.


    All endpoints require authentication via API key. Use `Authorization: Bearer
    <api_key>` or `Api-Key <api_key>` header.


    See the [Authentication guide](/guides/authentication) for details.
  version: 1.0.0
servers:
  - url: https://api.journeybee.io/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Account
    description: >-
      Authenticated company account info, API key permissions, and enabled
      modules
  - name: Agreement Templates
  - name: Agreements
  - name: Analytics
    description: >-
      Dashboard analytics and reporting — commission, engagement, LMS, and
      partner revenue metrics
  - name: Assets
    description: File and media asset management
  - name: Attributions
    description: Attribution type definitions
  - name: Audit Log
    description: Unified audit log of company activity (read-only)
  - name: Automations
    description: Workflow automation rule configurations
  - name: Campaign Audience
    description: Audience filters on a campaign
  - name: Campaign Partners
    description: Partners shared into a campaign audience
  - name: Campaigns
    description: Partner marketing campaigns
  - name: Card Assignees
    description: Assigned users on a card
  - name: Card Partners
    description: Partners linked to a card
  - name: Card Tags
    description: Tags on a card
  - name: Cards
    description: Kanban project cards
  - name: Categories
    description: Partner categories
  - name: Certification Categories
    description: Categories on a certification
  - name: Certification Enrollments
    description: User enrollments in a certification
  - name: Certification Folders
    description: Folders on a certification
  - name: Certification Resources
    description: Curriculum resources in a certification
  - name: Certification Translations
  - name: Certifications
    description: LMS certifications
  - name: Commissions
    description: >-
      Commission rule configurations with calculation entries,
      tier/category/partnership scoping
  - name: Contacts
    description: Partner contacts across partnerships
  - name: Currencies
    description: Available currencies
  - name: Custom Field Options
    description: Options on select/multi-select custom fields
  - name: Custom Field Rules
    description: Visibility and requirement rules on custom fields
  - name: Custom Field Values
    description: Custom field values
  - name: Custom Fields
    description: Custom field definitions
  - name: Deal Commission
    description: Commission calculation on a deal
  - name: Deal Custom Field Values
    description: Custom field values on a deal
  - name: Deal Notes
    description: Notes on a deal
  - name: Deal Partner Roles
    description: Roles a supporting (co-sell) partner can hold on a deal
  - name: Deal Partners
    description: Supporting (co-sell) partners on a deal
  - name: Deal Payments
    description: Payment records on a deal (read-only)
  - name: Deal Products
    description: Products attached to a deal
  - name: Deal Stages
    description: Deal pipeline stages
  - name: Deal Tags
    description: Tags on a deal
  - name: Deal Tasks
    description: Tasks on a deal
  - name: Deals
    description: Deal management
  - name: Event Subscriptions
  - name: Event Types
  - name: Folders
    description: Content folders
  - name: Integrations
    description: Company integration settings
  - name: Lead Attributions
    description: Attribution records on a lead
  - name: Lead Contacts
    description: Partner contacts on a lead
  - name: Lead Custom Field Values
    description: Custom field values on a lead
  - name: Lead Distributor
    description: Distributors for a lead
  - name: Lead Notes
    description: Notes on a lead
  - name: Lead Products
    description: Products attached to a lead
  - name: Lead Quotes
    description: >-
      Quotes on a lead — generated from pricing calculators with line items and
      totals
  - name: Lead Tags
    description: Tags on a lead
  - name: Lead Tasks
    description: Tasks on a lead
  - name: Lead Users
    description: Assigned users on a lead
  - name: Leads
    description: Lead management
  - name: LMS
  - name: Marketing Templates
    description: Marketing email templates
  - name: Partner Contacts
    description: Contacts on a partner
  - name: Partner Custom Field Values
    description: Custom field values on a partner
  - name: Partner Domains
    description: Domains on a partner
  - name: Partner Notes
    description: Notes on a partner
  - name: Partner Resellers
    description: Reseller assignments on a distributor
  - name: Partner Stages
    description: Partner pipeline stages
  - name: Partner Tags
    description: Tags on a partner
  - name: Partner Users
    description: Assigned users on a partner
  - name: Partners
    description: Core partner CRUD
  - name: Pricing Calculator Fields
    description: Input fields on a pricing calculator
  - name: Pricing Calculator Formulas
    description: Discount/tax/surcharge formulas on a pricing calculator
  - name: Pricing Calculator Products
    description: Products attached to a pricing calculator
  - name: Pricing Calculators
    description: Pricing calculator configurations
  - name: Products
    description: Product catalog
  - name: Proposals
    description: >-
      Durable action proposals: an AI or API caller proposes a mutation, a
      person decides and runs it
  - name: Resource Blocks
    description: Content blocks within a resource
  - name: Resource Categories
    description: Categories on a resource
  - name: Resource Folders
    description: Folders on a resource
  - name: Resource Tags
    description: Tags on a resource
  - name: Resource Translations
  - name: Resources
    description: Learning resources
  - name: Room Blocks
    description: Content blocks within a room
  - name: Room Categories
    description: Category-based room access control
  - name: Room Partnerships
    description: Direct partnership room access
  - name: Room Secure Files
    description: >-
      Private files in a secure_files room block: folders, multipart uploads,
      signed download links and download history
  - name: Room Stages
    description: Stage-based room access control
  - name: Room Tags
    description: Tag-based room access control
  - name: Room Tiers
    description: Tier-based room access control
  - name: Rooms
    description: Partner portal rooms
  - name: Sales Reports
  - name: Tags
    description: Tag definitions
  - name: Task Users
    description: Assigned users on a task
  - name: Tasks
    description: Task management
  - name: Terminology
    description: Display names for leads and deals
  - name: Tiers
    description: Partner tiers
  - name: Users
    description: Company team members
  - name: Webhook Events
    description: Outbound webhook payloads sent to your configured URLs when events occur
paths:
  /analytics/engagement/partner-visits:
    get:
      tags:
        - Analytics
      summary: Partner portal visits
      description: >-
        Every in-scope partner (visited or not) with its contacts' own visit
        records for the period — the follow-up list for 'which partners have not
        logged in since X'. `visited` filters inside the selected range;
        `last_visit_before` filters on the partner's most recent visit at ANY
        time and always includes partners that have never visited. Contacts are
        non-archived, most recent visit first, capped at 50 per partner
        (`contacts_total` is the full count). Requires the `analytics` read
        scope AND the `contacts` read scope — the contacts check is enforced per
        request, so a key with only `analytics` read is refused.
      operationId: getEngagementPartnerVisits
      parameters:
        - schema:
            type: string
            enum:
              - current_year
              - last_year
              - current_quarter
              - last_quarter
              - current_month
              - last_month
              - last_30_days
              - last_90_days
              - last_6_months
              - last_12_months
          in: query
          name: period
          required: false
          description: >-
            Reporting period (resolved to a date range server-side). Defaults to
            current_year. Ignored when start_date + end_date are both supplied.
        - schema:
            type: string
          in: query
          name: start_date
          required: false
          description: ISO date for a custom range start (use with end_date).
        - schema:
            type: string
          in: query
          name: end_date
          required: false
          description: ISO date for a custom range end (use with start_date).
        - schema:
            type: string
            enum:
              - referral
              - reseller
              - distributor
          in: query
          name: partner_type
          required: false
          description: Limit to one partner type; omit to include all partners.
        - schema:
            type: string
            enum:
              - received
              - sent
              - all
          in: query
          name: lead_direction
          required: false
          description: For referral partners, which lead direction to count.
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: partner_uuids
          required: false
          description: >-
            Restrict to these partnerships (uuids). Pass a single uuid for one
            partner's scorecard.
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: category_uuids
          required: false
          description: Restrict to partners in these categories (uuids).
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: tier_uuids
          required: false
          description: Restrict to partners in these tiers (uuids).
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: stage_uuids
          required: false
          description: Restrict to partners in these partnership stages (uuids).
        - schema:
            default: 1
            type: integer
            minimum: 1
            maximum: 10000
          in: query
          name: page
          required: false
        - schema:
            default: 25
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: per_page
          required: false
        - schema:
            type: boolean
          in: query
          name: visited
          required: false
          description: >-
            Filter on the selected range: true = only partners with at least one
            portal session in the period, false = only partners with none.
        - schema:
            type: string
            format: date-time
            pattern: >-
              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
          in: query
          name: last_visit_before
          required: false
          description: >-
            ISO timestamp. Only partners whose most recent portal session
            started before this instant are returned — including partners that
            have never visited. Answers 'which partners have not logged in since
            X'.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        uuid:
                          type: string
                        name:
                          anyOf:
                            - type: string
                            - type: 'null'
                        logo_uuid:
                          anyOf:
                            - type: string
                            - type: 'null'
                        partner_type:
                          type: string
                          enum:
                            - referral
                            - reseller
                            - distributor
                        stage:
                          description: >-
                            The partner's partnership stage label; null when
                            none is set.
                          anyOf:
                            - type: string
                            - type: 'null'
                        visited_in_range:
                          type: boolean
                          description: >-
                            True when the partner had at least one portal
                            session inside the selected range.
                        last_visit_at:
                          description: >-
                            The partner's most recent portal session start, at
                            any time; null = never visited.
                          anyOf:
                            - type: string
                            - type: 'null'
                        sessions_in_range:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          description: Portal sessions inside the selected range.
                        page_views_in_range:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          description: Portal page views inside the selected range.
                        active_users_in_range:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          description: >-
                            Distinct partner contacts with a portal session
                            inside the selected range.
                        avg_session_duration_seconds:
                          type: number
                          description: >-
                            Mean portal session length in seconds inside the
                            selected range.
                        contacts_total:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          description: >-
                            The partner's non-archived contact count (contacts
                            is capped).
                        contacts:
                          type: array
                          items:
                            type: object
                            properties:
                              uuid:
                                type: string
                              first_name:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              last_name:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              email:
                                type: string
                              last_visit_at:
                                description: >-
                                  The contact's most recent portal session
                                  start, at any time; null = never visited.
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              sessions_in_range:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                                description: >-
                                  The contact's portal sessions inside the
                                  selected range.
                            required:
                              - uuid
                              - first_name
                              - last_name
                              - email
                              - last_visit_at
                              - sessions_in_range
                            additionalProperties: false
                          description: >-
                            The partner's non-archived contacts with their own
                            visit record, most recent visit first (max 50;
                            contacts_total is the full count).
                      required:
                        - uuid
                        - name
                        - logo_uuid
                        - partner_type
                        - stage
                        - visited_in_range
                        - last_visit_at
                        - sessions_in_range
                        - page_views_in_range
                        - active_users_in_range
                        - avg_session_duration_seconds
                        - contacts_total
                        - contacts
                      additionalProperties: false
                  pagination:
                    type: object
                    properties:
                      page:
                        type: number
                      per_page:
                        type: number
                      total:
                        type: number
                      total_pages:
                        type: number
                    required:
                      - page
                      - per_page
                      - total
                      - total_pages
                    additionalProperties: false
                  period:
                    type: object
                    properties:
                      start_date:
                        type: string
                      end_date:
                        type: string
                    required:
                      - start_date
                      - end_date
                    additionalProperties: false
                required:
                  - data
                  - pagination
                  - period
                additionalProperties: false
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: API key authentication. Use "Bearer <api_key>" or "Api-Key <api_key>".

````

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