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

# Get new joiner stats

> Aggregate counts for status cards and provisioning outcomes. Accepts the same filter query parameters as the list endpoint (e.g. countryCodes, equipmentReadiness, urgency) so stats reflect the filtered cohort. When startDateFrom is omitted, the domain applies a default 60-day lookback floor — supply it explicitly to widen the window beyond 60 days. Pagination and sort query parameters accepted on the list endpoint are ignored on this endpoint. Example: ?countryCodes=US&equipmentReadiness=NOT_STARTED



## OpenAPI

````yaml /openapi.json get /api/v1/new-joiners/stats
openapi: 3.1.0
info:
  title: Firstbase API Specification
  description: Integration endpoints for Firstbase
  version: 0.1.0
servers:
  - url: http://localhost:8081
    description: Production
security:
  - ApiKey: []
tags:
  - name: Catalog
    description: Browse SKUs, brands, and categories
  - name: Inventory
    description: Query and manage inventory items and assets
  - name: Inventory Levels
    description: Configure inventory levels by SKU and warehouse
  - name: Inventory Orders
    description: Create and manage inventory orders
  - name: ITAD
    description: IT asset disposition requests
  - name: New Joiners
    description: Track and remind new joiners
  - name: Offices
    description: Manage office locations
  - name: Orders
    description: Create and track equipment orders
  - name: Packages
    description: Manage equipment packages
  - name: People
    description: Provision and manage users
  - name: Regions
    description: Query regions
  - name: Replacements
    description: Create and manage equipment replacements
  - name: Returns
    description: Create and manage returns
  - name: Shipment
    description: Look up shipments and carriers
  - name: Shipment Notices
    description: Create and manage shipment notices
  - name: Warehouses
    description: Query warehouses
paths:
  /api/v1/new-joiners/stats:
    get:
      tags:
        - New Joiners
      summary: Get new joiner stats
      description: >-
        Aggregate counts for status cards and provisioning outcomes. Accepts the
        same filter query parameters as the list endpoint (e.g. countryCodes,
        equipmentReadiness, urgency) so stats reflect the filtered cohort. When
        startDateFrom is omitted, the domain applies a default 60-day lookback
        floor — supply it explicitly to widen the window beyond 60 days.
        Pagination and sort query parameters accepted on the list endpoint are
        ignored on this endpoint. Example:
        ?countryCodes=US&equipmentReadiness=NOT_STARTED
      operationId: getNewJoinerStats
      parameters:
        - name: searchString
          in: query
          description: Free-text search across name and email
          required: false
          schema:
            type: string
            description: Free-text search across name and email
        - name: equipmentReadiness
          in: query
          description: 'Filter by equipment readiness: NOT_STARTED, ORDER_PLACED, READY'
          required: false
          schema:
            type: array
            description: 'Filter by equipment readiness: NOT_STARTED, ORDER_PLACED, READY'
            items:
              type: string
              description: 'Filter by equipment readiness: NOT_STARTED, ORDER_PLACED, READY'
              enum:
                - NOT_STARTED
                - ORDER_PLACED
                - READY
        - name: urgency
          in: query
          description: 'Filter by urgency: ON_TRACK, AT_RISK, LATE'
          required: false
          schema:
            type: array
            description: 'Filter by urgency: ON_TRACK, AT_RISK, LATE'
            items:
              type: string
              description: 'Filter by urgency: ON_TRACK, AT_RISK, LATE'
              enum:
                - ON_TRACK
                - AT_RISK
                - LATE
        - name: countryCodes
          in: query
          description: Filter by ISO country codes
          required: false
          schema:
            type: array
            description: Filter by ISO country codes
            items:
              type: string
              description: Filter by ISO country codes
        - name: provisioningOutcome
          in: query
          description: 'Filter by provisioning outcome: ON_TIME, LATE'
          required: false
          schema:
            type: array
            description: 'Filter by provisioning outcome: ON_TIME, LATE'
            items:
              type: string
              description: 'Filter by provisioning outcome: ON_TIME, LATE'
              enum:
                - ON_TIME
                - LATE
        - name: startDateFrom
          in: query
          description: >-
            Start date lower bound (ISO-8601). When omitted, a default 60-day
            lookback floor is applied. Supply explicitly to widen the window.
          required: false
          schema:
            type: string
            format: date
            description: >-
              Start date lower bound (ISO-8601). When omitted, a default 60-day
              lookback floor is applied. Supply explicitly to widen the window.
            example: '2026-01-01'
          example: '2026-01-01'
        - name: startDateTo
          in: query
          description: Start date upper bound (ISO-8601)
          required: false
          schema:
            type: string
            format: date
            description: Start date upper bound (ISO-8601)
            example: '2026-12-31'
          example: '2026-12-31'
        - name: userStatus
          in: query
          description: 'Filter by person status: INVITED, ACTIVE, INACTIVE, etc.'
          required: false
          schema:
            type: array
            description: 'Filter by person status: INVITED, ACTIVE, INACTIVE, etc.'
            items:
              type: string
              description: 'Filter by person status: INVITED, ACTIVE, INACTIVE, etc.'
              enum:
                - INVITED
                - ACTIVE
                - INACTIVE
                - DELETED
                - OFFBOARDING
                - CANNOT_REACTIVATE
        - name: procurementMethod
          in: query
          description: 'Filter by procurement method: WAREHOUSE, DROPSHIP, MIXED'
          required: false
          schema:
            type: array
            description: 'Filter by procurement method: WAREHOUSE, DROPSHIP, MIXED'
            items:
              type: string
              description: 'Filter by procurement method: WAREHOUSE, DROPSHIP, MIXED'
              enum:
                - DROPSHIP
                - MIXED
                - WAREHOUSE
      responses:
        '200':
          description: Stats retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicAPINewJoinerStatsResponse'
        '400':
          description: Bad request (invalid parameter)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '409':
          description: Conflict
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -sS -X GET 'http://localhost:8081/api/v1/new-joiners/stats' \
              -H 'Authorization: ApiKey YOUR_API_KEY' \
              -H 'Accept: application/json'
components:
  schemas:
    PublicAPINewJoinerStatsResponse:
      type: object
      description: >-
        Aggregate counts for the new joiner dashboard status cards and
        provisioning outcomes
      properties:
        totalUpcoming:
          type: integer
          format: int32
          description: Total upcoming new joiners (active pipeline only)
          example: 42
        notStarted:
          type: integer
          format: int32
          description: New joiners with no order placed yet
          example: 10
        orderPlaced:
          type: integer
          format: int32
          description: New joiners with an order placed but not yet ready
          example: 15
        ready:
          type: integer
          format: int32
          description: New joiners whose equipment is ready
          example: 12
        atRisk:
          type: integer
          format: int32
          description: New joiners at risk (start date approaching, equipment not ready)
          example: 3
        late:
          type: integer
          format: int32
          description: New joiners who are late (start date passed, equipment not ready)
          example: 2
        onTimeProvisioningCount:
          type: integer
          format: int32
          description: Count of new joiners provisioned on time
          example: 38
        lateProvisioningCount:
          type: integer
          format: int32
          description: Count of new joiners provisioned late
          example: 4
      required:
        - atRisk
        - late
        - lateProvisioningCount
        - notStarted
        - onTimeProvisioningCount
        - orderPlaced
        - ready
        - totalUpcoming
    PublicApiHttpErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/PublicApiError'
          description: List of error details.
      required:
        - errors
    PublicApiError:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable description of the error
          example: Invalid request
        source:
          type: string
          description: >-
            Entity or field path that caused the error (for example order,
            shipmentNotice, or person:email)
          example: request
      required:
        - detail
        - source
  securitySchemes:
    ApiKey:
      type: apiKey
      description: Prefix the value with "ApiKey" to indicate the custom authorization type
      name: Authorization
      in: header

````