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

# Get Basic Policy

> Returns a single basic policy by ID, with the flat `fieldModelV1Data`
object including the nested `exposures` array.

**Required permission:** `company.policy:read`




## OpenAPI

````yaml /openapi/generated-external-api.yaml get /api/v1/external/companies/{companyId}/policies/{policyId}
openapi: 3.0.3
info:
  title: AI Insurance External API
  description: External API for AI Insurance platform
  version: 1.0.0
  contact:
    email: support@aiinsurance.io
servers:
  - url: https://app.aiinsurance.io
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/v1/external/companies/{companyId}/policies/{policyId}:
    get:
      tags:
        - Basic Policies
      summary: Get Basic Policy
      description: |
        Returns a single basic policy by ID, with the flat `fieldModelV1Data`
        object including the nested `exposures` array.

        **Required permission:** `company.policy:read`
      operationId: getBasicPolicy
      parameters:
        - $ref: '#/components/parameters/companyId'
        - $ref: '#/components/parameters/policyIdPath'
      responses:
        '200':
          description: Basic policy detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicPolicyResponse'
              examples:
                success:
                  summary: A basic policy
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440001
                    companyId: 550e8400-e29b-41d4-a716-446655440000
                    fieldModelV1Data:
                      policyNumber: POL-2026-0001
                      policyType: generalLiability
                      policyTimeZone: America/New_York
                      policyStartDate:
                        year: 2026
                        month: 1
                        day: 1
                        timezone: America/New_York
                      policyEndDate:
                        year: 2027
                        month: 1
                        day: 1
                        timezone: America/New_York
                      primaryInsured: 550e8400-e29b-41d4-a716-446655440010
                      exposures:
                        - id: 550e8400-e29b-41d4-a716-446655440010
                          exposureName: Acme Corporation
                          exposureType: business
                    createdAt: '2026-01-15T10:30:00.000Z'
                    updatedAt: null
                    createdBy: google-oauth2|123456789
                    updatedBy: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Policy not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                policyNotFound:
                  summary: Policy not found
                  value:
                    error:
                      code: NOT_FOUND
                      message: Policy not found
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    companyId:
      name: companyId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Company identifier
    policyIdPath:
      name: policyId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Policy identifier
  schemas:
    BasicPolicyResponse:
      type: object
      description: >-
        A basic policy — flat `fieldModelV1Data` object with company-configured
        fields plus a nested `exposures` array. Returned by `GET /policies`
        (list items) and `GET /policies/{policyId}` (single).
      required:
        - id
        - companyId
        - fieldModelV1Data
        - createdAt
        - updatedAt
        - createdBy
        - updatedBy
      properties:
        id:
          type: string
          format: uuid
          description: Policy identifier.
        companyId:
          type: string
          format: uuid
          description: Company identifier.
        fieldModelV1Data:
          type: object
          description: >-
            Flat policy object. Keys are field `referenceId`s from the company's
            FMV1 configuration. The `exposures` key is a nested array of
            exposure objects, each of which has an `id` referencing an existing
            exposure record plus any company-configured exposure fields.
            Date-typed fields appear in canonical `{ day, month, year, timezone
            }` form.
          additionalProperties: true
        createdAt:
          type: string
          format: date-time
          description: ISO-8601 timestamp of policy creation.
        updatedAt:
          type: string
          format: date-time
          nullable: true
          description: ISO-8601 timestamp of last update, or `null` if never updated.
        createdBy:
          type: string
          nullable: true
          description: User or API key that created the policy.
        updatedBy:
          type: string
          nullable: true
          description: >-
            User or API key of the most recent update, or `null` if never
            updated.
    ErrorResponse:
      type: object
      description: Standard error response for all external API endpoints
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human-readable error message
              example: 'submissionId: Required field is missing'
            details:
              type: array
              description: Additional details for validation errors (field-level errors)
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: The field that caused the error
                    example: submissionId
                  message:
                    type: string
                    description: Description of the field error
                    example: Required field is missing
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingApiKey:
              summary: Missing API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: Authorization header is required
            bearerTokenNotAllowed:
              summary: Bearer token used instead of API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: External API endpoints require API key authentication
    Forbidden:
      description: Forbidden - Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficientPermissions:
              summary: Insufficient permissions
              value:
                error:
                  code: FORBIDDEN
                  message: Insufficient permissions to perform this action
    InternalServerError:
      description: Internal Server Error - Unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internalError:
              summary: Unexpected server error
              value:
                error:
                  code: INTERNAL_ERROR
                  message: An unexpected error occurred. Please try again later.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Include your API key in the Authorization
        header.

````