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

# Get what a program’s admin pane measures of a submission

> Reads what the program's admin pane measures of one submission: its latest extraction's run and the credits that run and its child runs recorded, and, where the workspace quotes it in an editor (such as the excess tower), when it was first priced and when its first numbered quote was generated. Credits come from the workspace's own cost records and are provisional, not an invoice.

Only for a caller who reads the submission and is a workspace administrator or manages its program (holds a highest role of the program guideline's role chain). Anyone else who reads the submission is 403 `forbidden`; a submission the caller cannot read is 404. Read-only and safe to retry.

Alpha: this operation may change or be removed without notice.



## OpenAPI

````yaml /openapi.json get /insurance/underwriting/submissions/{submissionId}/metrics
openapi: 3.0.3
info:
  title: Effective API
  version: 2.0.0
  description: The public Effective REST API. Authenticate using an Effective API key.
servers:
  - url: https://api.canary.effectiveai.app/api/v2
    description: Canary
security:
  - bearerAuth: []
paths:
  /insurance/underwriting/submissions/{submissionId}/metrics:
    get:
      tags:
        - Underwriting submissions
      summary: Get what a program’s admin pane measures of a submission
      description: >-
        Reads what the program's admin pane measures of one submission: its
        latest extraction's run and the credits that run and its child runs
        recorded, and, where the workspace quotes it in an editor (such as the
        excess tower), when it was first priced and when its first numbered
        quote was generated. Credits come from the workspace's own cost records
        and are provisional, not an invoice.


        Only for a caller who reads the submission and is a workspace
        administrator or manages its program (holds a highest role of the
        program guideline's role chain). Anyone else who reads the submission is
        403 `forbidden`; a submission the caller cannot read is 404. Read-only
        and safe to retry.


        Alpha: this operation may change or be removed without notice.
      operationId: getUnderwritingSubmissionMetrics
      parameters:
        - schema:
            type: string
            format: uuid
            description: The submission’s id.
          required: true
          description: The submission’s id.
          name: submissionId
          in: path
      responses:
        '200':
          description: The submission’s metrics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2UnderwritingSubmissionMetrics'
        '400':
          description: 'invalid_request: an invalid submission id.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '403':
          description: >-
            feature_not_enabled: underwriting is not enabled for the workspace.
            forbidden: the credential may not do this.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '404':
          description: 'not_found: no such submission, or the caller cannot read it.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
      security:
        - bearerAuth: []
components:
  schemas:
    V2UnderwritingSubmissionMetrics:
      type: object
      properties:
        submissionId:
          type: string
          format: uuid
        extraction:
          type: object
          nullable: true
          properties:
            extractionId:
              type: string
              format: uuid
            procedureRunId:
              type: string
              nullable: true
              format: uuid
              description: Null while the extraction waits to start.
            credits:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - recorded
                    - pending
                    - none
                    - unavailable
                  description: >-
                    `recorded`: `recordedCredits` holds what the run and its
                    child runs recorded so far. `pending`: the run’s cost report
                    is still being prepared; read again shortly. `none`: the
                    extraction has no run yet. `unavailable`: the run’s costs
                    cannot be read now.
                recordedCredits:
                  type: string
                  nullable: true
                  description: >-
                    Exact decimal Effective credits the run and its child runs
                    recorded, from the workspace’s own cost records:
                    provisional, not an invoice. Null unless `status` is
                    `recorded`.
                measurementsPending:
                  type: boolean
                  description: >-
                    Some of the run’s usage is still being measured, so the
                    credits may still grow.
              required:
                - status
                - recordedCredits
                - measurementsPending
          required:
            - extractionId
            - procedureRunId
            - credits
          description: >-
            The submission’s latest extraction; null where it was never
            extracted.
        quoting:
          type: object
          nullable: true
          properties:
            firstPricedAt:
              type: string
              nullable: true
              format: date-time
              description: >-
                When a version of the submission’s pricing was first saved, on
                any line: the first price, whether the desk priced it on arrival
                or an underwriter did. Null until one is.
            firstQuoteIssuedAt:
              type: string
              nullable: true
              format: date-time
              description: >-
                When the submission’s first numbered quote document (Q-…) was
                generated. Null until one is.
          required:
            - firstPricedAt
            - firstQuoteIssuedAt
          description: >-
            When it was first priced and quoted in a quoting editor; null where
            the workspace keeps no such pricing or quotes. A submission quoted
            by its program’s offer act is read from its log instead.
      required:
        - submissionId
        - extraction
        - quoting
    V2CodedError:
      allOf:
        - $ref: '#/components/schemas/V2Error'
        - type: object
          properties:
            code:
              type: string
              minLength: 1
              description: Stable error code. Clients must tolerate unknown future codes.
            details:
              type: array
              items:
                type: object
                properties:
                  location:
                    type: string
                    enum:
                      - path
                      - query
                      - header
                      - body
                  path:
                    type: array
                    items:
                      type: string
                      maxLength: 64
                    maxItems: 12
                  code:
                    type: string
                    enum:
                      - required
                      - invalid_type
                      - invalid_value
                      - unknown_field
                  message:
                    type: string
                    minLength: 1
                    maxLength: 200
                required:
                  - location
                  - path
                  - code
                  - message
              minItems: 1
              maxItems: 20
              description: Bounded safe validation issues; may omit some invalid fields.
            requestId:
              type: string
              minLength: 1
              maxLength: 128
              description: >-
                Existing server correlation for this HTTP attempt, when
                available.
            dataset:
              type: string
              enum:
                - naic
                - osha
              description: Dataset needed for dataset_not_enabled.
            businessCode:
              type: string
              description: The rater’s own refusal code, for business_rejection.
            violations:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                    description: Authored or built-in constraint code
                  message:
                    type: string
                    description: Authored message for the failed constraint
                  path:
                    type: string
                    description: Input path of the offending value; empty for the request
                  value:
                    nullable: true
                    description: Offending input value, size-bounded by the runtime
                  constraint:
                    type: string
                    description: The constraint the value failed, as text
                  cite:
                    type: string
                    nullable: true
                    description: >-
                      Filing citation of the constraint, when the source cites
                      one
                required:
                  - code
                  - message
                  - path
                  - value
                  - constraint
                  - cite
                additionalProperties: false
              maxItems: 256
              description: >-
                Each input constraint the submission failed, for invalid_inputs
                and business_rejection.
            violationsTruncated:
              type: boolean
              description: >-
                True when the rater reported more violations than violations
                holds.
            executionId:
              type: string
              description: >-
                The recorded execution of a failed rating, for rater rating
                failures.
            accessUrl:
              type: string
              nullable: true
              format: uri
              description: Not currently returned.
          required:
            - code
    V2Error:
      type: object
      properties:
        error:
          type: string
          minLength: 1
          description: Human-readable explanation of the failure.
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Effective API key. Send Authorization: Bearer sk-eai-...'

````

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