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

# Get one class in a classification system

> A classification system is a published list of classes that rating and underwriting key on: ISO’s commercial general liability classes (`iso-gl`), NCCI’s workers’ compensation classes, ISO’s commercial auto vehicle classes, NAICS, or a carrier’s own. Each class has a code, a description and, where the system has one, a premium base: what the exposure counts and per how many it is rated. An overlay is what another party puts on a system’s classes, such as a carrier’s umbrella and excess hazard groups on `iso-gl`. A workspace reads its own systems and the shared ones its dataset grants cover (`iso` for ISO’s classes); where it has its own copy of a shared system, its own copy wins. This is reference data for preparing a submission: raters do not read it, and each keeps its own class tables.

Returns the class with this code: with `state`, that state’s class where the system has one, else the countrywide class; without, the countrywide class. 404 `not_found` when there is none. Reading needs rater view access; read-only keys work.



## OpenAPI

````yaml /openapi.json get /insurance/classifications/{system}/classes/{code}
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.effectiveai.app/api/v2
    description: Production
security:
  - bearerAuth: []
paths:
  /insurance/classifications/{system}/classes/{code}:
    get:
      tags:
        - Classifications
      summary: Get one class in a classification system
      description: >-
        A classification system is a published list of classes that rating and
        underwriting key on: ISO’s commercial general liability classes
        (`iso-gl`), NCCI’s workers’ compensation classes, ISO’s commercial auto
        vehicle classes, NAICS, or a carrier’s own. Each class has a code, a
        description and, where the system has one, a premium base: what the
        exposure counts and per how many it is rated. An overlay is what another
        party puts on a system’s classes, such as a carrier’s umbrella and
        excess hazard groups on `iso-gl`. A workspace reads its own systems and
        the shared ones its dataset grants cover (`iso` for ISO’s classes);
        where it has its own copy of a shared system, its own copy wins. This is
        reference data for preparing a submission: raters do not read it, and
        each keeps its own class tables.


        Returns the class with this code: with `state`, that state’s class where
        the system has one, else the countrywide class; without, the countrywide
        class. 404 `not_found` when there is none. Reading needs rater view
        access; read-only keys work.
      operationId: getClassificationClass
      parameters:
        - schema:
            type: string
            pattern: ^[a-z][a-z0-9-]{0,63}$
            description: A classification system’s key, such as iso-gl, ncci-wc or naics.
          required: true
          description: A classification system’s key, such as iso-gl, ncci-wc or naics.
          name: system
          in: path
        - schema:
            type: string
            pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,19}$
            description: >-
              A class code as its system writes it: 91342 for ISO GL, 8810 for
              NCCI, 238130 for NAICS. Letters, digits, dots and hyphens, up to
              20.
          required: true
          description: >-
            A class code as its system writes it: 91342 for ISO GL, 8810 for
            NCCI, 238130 for NAICS. Letters, digits, dots and hyphens, up to 20.
          name: code
          in: path
        - schema:
            type: string
            pattern: ^[A-Z]{2}$
            description: >-
              A state: the classes that hold in it, its own where the system has
              a state class and the countrywide one otherwise. Without it, every
              class, each with its state.
          required: false
          description: >-
            A state: the classes that hold in it, its own where the system has a
            state class and the countrywide one otherwise. Without it, every
            class, each with its state.
          name: state
          in: query
        - schema:
            type: string
            description: >-
              Comma-separated overlay keys, at most 10, whose attributes each
              class should carry. The system's overlays are listed with it.
          required: false
          description: >-
            Comma-separated overlay keys, at most 10, whose attributes each
            class should carry. The system's overlays are listed with it.
          name: overlays
          in: query
      responses:
        '200':
          description: The class.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ClassificationClass'
        '400':
          description: >-
            Invalid query, or an overlay the system does not have; restart a
            list after an invalid cursor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '403':
          description: The credential may not read classifications.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '404':
          description: The workspace reads no such system, or it has no such class.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
      security:
        - bearerAuth: []
components:
  schemas:
    V2ClassificationClass:
      type: object
      properties:
        system:
          type: string
          pattern: ^[a-z][a-z0-9-]{0,63}$
          description: A classification system’s key, such as iso-gl, ncci-wc or naics.
        code:
          type: string
          pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,19}$
          description: >-
            A class code as its system writes it: 91342 for ISO GL, 8810 for
            NCCI, 238130 for NAICS. Letters, digits, dots and hyphens, up to 20.
        state:
          type: string
          nullable: true
          pattern: ^[A-Z]{2}$
          description: The state the class holds in, or null for every state.
        description:
          type: string
          description: The class description, as the source words it.
        premiumBase:
          $ref: '#/components/schemas/V2ClassificationPremiumBase'
        source:
          $ref: '#/components/schemas/V2ClassificationClassSource'
        overlays:
          type: object
          additionalProperties:
            type: object
            nullable: true
            additionalProperties:
              type: string
              nullable: true
          description: >-
            The overlays the request named, by key: each one’s attributes for
            this class, or null when the overlay does not list it.
      required:
        - system
        - code
        - state
        - description
        - premiumBase
        - source
        - overlays
    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
    V2ClassificationPremiumBase:
      type: object
      nullable: true
      properties:
        kind:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          description: >-
            What the exposure counts: gross_sales, payroll, area, count,
            admissions, units, total_cost, total_operating_expenses, gallons or
            no_exposure for ISO GL. More may be added.
        ratedPer:
          type: integer
          minimum: 1
          description: >-
            The exposure is rated per this many of it: 1000 for "per $1,000 of
            gross sales" or "per 1,000 square feet", 100 for "per $100 of
            payroll", 1 for "each".
        unit:
          type: string
          minLength: 1
          maxLength: 200
          description: >-
            The premium base as the source prints it, such as "per $1,000 of
            gross sales".
      required:
        - kind
        - ratedPer
        - unit
      description: >-
        What the exposure counts and per how many it is rated; null for a system
        without one, such as NAICS.
    V2ClassificationClassSource:
      type: object
      properties:
        publication:
          type: string
          description: The publication the class comes from.
        edition:
          type: string
          description: Its plan or edition.
        loadedAt:
          type: string
          description: When this class last changed, ISO 8601.
      required:
        - publication
        - edition
        - loadedAt
    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.