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

# List operational exceptions

> Lists the operational exceptions the management cockpit surfaces (expiring/low stock, delivery exceptions, receipt discrepancies, pending approvals) in a stable priority order, each with a drill-down id and an evidence descriptor. Requires analytics:read. Deterministic; computed live over the workspace data.



## OpenAPI

````yaml /openapi.en.json get /v1/analytics/exceptions
openapi: 3.1.0
info:
  description: >-
    The Muveya public developer API: opaque-API-key-authenticated,
    tenant-scoped, read-only /v1 resources. One rate-limit budget per key.
  title: Muveya Developer API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.muveya.com
security: []
tags:
  - name: API key
  - name: Clinics
  - name: Warehouses
  - name: Catalog
  - name: Inventory
  - name: Orders
  - name: Fulfillments
  - name: Analytics
paths:
  /v1/analytics/exceptions:
    get:
      tags:
        - Analytics
      summary: List operational exceptions
      description: >-
        Lists the operational exceptions the management cockpit surfaces
        (expiring/low stock, delivery exceptions, receipt discrepancies, pending
        approvals) in a stable priority order, each with a drill-down id and an
        evidence descriptor. Requires analytics:read. Deterministic; computed
        live over the workspace data.
      operationId: listAnalyticsExceptions
      parameters:
        - name: catalogItemId
          in: query
          required: false
          description: Narrows the stock exceptions (low/expiring) to one catalog item.
          schema:
            type: string
      responses:
        '200':
          description: The prioritized operational exceptions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationalExceptionReport'
          headers:
            X-RateLimit-Limit:
              description: The per-key request budget for the current window.
              schema:
                type: integer
                minimum: 1
            X-RateLimit-Remaining:
              description: Requests left in the current window (0 when exhausted).
              schema:
                type: integer
                minimum: 0
            X-RateLimit-Reset:
              description: Seconds until the current window resets.
              schema:
                type: integer
                minimum: 1
            RateLimit:
              description: >-
                IETF draft budget snapshot, e.g. "limit=120, remaining=119,
                reset=60".
              schema:
                type: string
            RateLimit-Policy:
              description: IETF draft policy, e.g. "120;w=60" (limit;window-seconds).
              schema:
                type: string
        '401':
          description: >-
            The API key is missing, invalid, revoked, expired, or bound to a
            suspended workspace.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: The API key lacks the scope this route requires.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: The API key exceeded its rate limit for the current window.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          headers:
            Retry-After:
              description: Positive delta-seconds until another request is allowed.
              schema:
                type: integer
                minimum: 1
            X-RateLimit-Limit:
              description: The per-key request budget for the current window.
              schema:
                type: integer
                minimum: 1
            X-RateLimit-Remaining:
              description: Requests left in the current window (0 when exhausted).
              schema:
                type: integer
                minimum: 0
            X-RateLimit-Reset:
              description: Seconds until the current window resets.
              schema:
                type: integer
                minimum: 1
            RateLimit:
              description: >-
                IETF draft budget snapshot, e.g. "limit=120, remaining=119,
                reset=60".
              schema:
                type: string
            RateLimit-Policy:
              description: IETF draft policy, e.g. "120;w=60" (limit;window-seconds).
              schema:
                type: string
      security:
        - apiKeyBearer: []
components:
  schemas:
    OperationalExceptionReport:
      type: object
      additionalProperties: false
      required:
        - total
        - timezone
        - asOf
        - freshness
        - evidenceId
        - truncated
        - filters
        - exceptions
      properties:
        total:
          type: integer
        timezone:
          type: string
        asOf:
          type: string
          format: date-time
          description: When the report was computed.
        freshness:
          type: string
          enum:
            - live
        evidenceId:
          type: string
        truncated:
          type: boolean
          description: 'True when a bounded scan hit its cap: the list is a prefix.'
        filters:
          type: object
          additionalProperties:
            type: string
        exceptions:
          type: array
          items:
            $ref: '#/components/schemas/OperationalException'
    ProblemDetails:
      type: object
      additionalProperties: false
      required:
        - type
        - title
        - status
        - detail
        - instance
        - code
        - requestId
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
          minimum: 400
          maximum: 599
        detail:
          type: string
        instance:
          type: string
        code:
          type: string
        requestId:
          type: string
    OperationalException:
      type: object
      additionalProperties: false
      required:
        - metric
        - priority
        - drillDownType
        - drillDownId
        - reference
        - evidenceId
      properties:
        metric:
          type: string
          enum:
            - LOW_STOCK
            - EXPIRING_STOCK
            - DELIVERY_EXCEPTIONS
            - RECEIPT_DISCREPANCIES
            - PENDING_ORDERS
            - BOX_TRACEABILITY
            - APPROVAL_DECISION_MEDIAN_HOURS
            - DISTINCT_CUSTODY_ACTORS
        priority:
          type: integer
          description: Stable priority rank; 0 is the most urgent.
        drillDownType:
          type: string
          enum:
            - order
            - movement
            - item
          description: >-
            What the drill-down id points to: a source order, a source stock
            movement, or the supply when a stock alert was detected without a
            movement (a saved minimum or the periodic check).
        drillDownId:
          type: string
          description: >-
            The source record id the drill-down opens (reachable with the same
            key/scopes).
        reference:
          type: object
          additionalProperties:
            type: string
        evidenceId:
          type: string
          description: A stable per-item descriptor of the exception, for citation.
        detectedAt:
          type: string
          format: date-time
  securitySchemes:
    apiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: >-
        Opaque mvy_test_ API key sent as a Bearer token. It derives exactly one
        workspace server-side; the path never carries a workspace selector.

````

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