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

# Get Downstream Entity Licenses

> Retrieve license records for a downstream entity

Returns all license records for a specific downstream entity association, the relationship between you as the carrier or MGA and one agency you appoint. The licenses belong to that agency, not to your own organization. You can filter by state code and license status.

<Note>
  If you are an agency looking for your own license records, this is the wrong surface. See [the same records, two vocabularies](/which-api-is-mine#the-same-records-two-vocabularies) for the agency equivalent.
</Note>


## OpenAPI

````yaml openapi/v2.json GET /v2/upstream/downstream-entity-associations/{downstreamEntityAssociationId}/licenses
openapi: 3.0.0
info:
  title: Turris Public API
  description: API for managing insurance compliance data
  version: 2.0.0
  contact: {}
servers:
  - url: https://public.api.live.turrisfi.com
    description: Production
  - url: https://public.api.sandbox.turrisfi.com
    description: Sandbox
security: []
tags: []
paths:
  /v2/upstream/downstream-entity-associations/{downstreamEntityAssociationId}/licenses:
    get:
      tags:
        - upstream/downstream-entity-associations
      operationId: >-
        DownstreamEntityLicensesV2Controller_getDownstreamEntityActiveLicenses_v2
      parameters:
        - name: downstreamEntityAssociationId
          required: true
          in: path
          description: Downstream entity association ID
          schema:
            example: 507f1f77bcf86cd799439011
            type: string
        - name: stateCode
          required: false
          in: query
          description: State code (two-letter abbreviation)
          schema:
            example: FL
            type: string
        - name: status
          required: false
          in: query
          description: Filter for the license status
          schema:
            example: active
            type: string
      responses:
        '200':
          description: List of downstream entity licenses
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/LicenseResponse'
                  requestId:
                    type: string
                    description: Unique request identifier
                    example: dev-2c5e7cf2-9acf-4c8c-ab2f-b81f39d775a8
                  timestamp:
                    type: string
                    description: Response timestamp
                    example: '2025-11-12T20:49:03.293Z'
                required:
                  - data
                  - requestId
                  - timestamp
        '401':
          description: Invalid or missing auth token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '404':
          description: Downstream entity association not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
components:
  schemas:
    LicenseResponse:
      type: object
      properties:
        niprDataSubscriptionId:
          type: string
          description: NIPR data subscription ID
        npn:
          type: string
          description: National Producer Number
        stateCode:
          type: string
          description: Two-letter state code
          example: AL
        licenseNumber:
          type: string
          description: License number
        licenseClassCode:
          type: string
          description: License class code
        licenseClassName:
          type: string
          description: License class name
        status:
          type: string
          description: License status
        residencyStatus:
          type: string
          description: Residency status
        issueDate:
          format: date-time
          type: string
          description: Issue date
        nextRenewalDate:
          format: date-time
          type: string
          description: Next renewal date
        expirationDate:
          format: date-time
          type: string
          description: Expiration date
        linesOfAuthority:
          description: Lines of authority
          type: array
          items:
            $ref: '#/components/schemas/LineOfAuthorityResponse'
        updatedAt:
          format: date-time
          type: string
          description: Last update timestamp
      required:
        - niprDataSubscriptionId
        - npn
        - stateCode
        - licenseNumber
        - licenseClassCode
        - licenseClassName
        - status
        - residencyStatus
    ErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
        requestId:
          type: string
          description: Unique request identifier for debugging
        errorType:
          type: string
          description: >-
            Machine-readable error classification. Branch on this rather than on
            `errorMessage`, which is prose and may change. Authentication
            failures returned by our identity provider are forwarded verbatim,
            so a 401 can carry a code outside this list; treat an unrecognised
            value as a generic failure of its HTTP status.
          enum:
            - conflict
            - contact_not_authorized
            - document_exceeds_page_limit
            - downstream_entity_member_exists
            - duplicate_external_id_error
            - duplicate_member_email
            - duplicate_producer_code_error
            - forbidden
            - gateway_timeout
            - inactive_email
            - internal_server_error
            - invalid_email
            - invalid_email_for_invites
            - invalid_organization_category
            - invalid_organization_slug
            - invalid_phone_number
            - invalid_token
            - invite_limit_reached
            - jwt_invalid
            - m2m_client_not_found
            - not_found
            - organization_already_exists
            - organization_slug_already_used
            - payment_required
            - producer_agreement_required
            - product_feature_subscription_required
            - service_unavailable
            - session_authorization_error
            - some_custom_error_string
            - throttled
            - too_many_requests
            - unauthorized
            - unauthorized_client
            - unexpected_400_stytch_error
            - unexpected_403_stytch_error
            - unexpected_404_stytch_error
            - unexpected_error
            - unexpected_stytch_error
            - unprocessable_entity
            - validation_error
          example: validation_error
        errorMessage:
          description: Array of error messages
          type: array
          items:
            type: string
        timestamp:
          type: string
          description: ISO timestamp when the error occurred
        details:
          type: object
          description: Additional error context
      required:
        - statusCode
        - requestId
        - errorType
        - errorMessage
        - timestamp
    LineOfAuthorityResponse:
      type: object
      properties:
        code:
          type: string
          description: Line of authority code
        name:
          type: string
          description: Line of authority name
        status:
          type: string
          description: Line of authority status
      required:
        - code
        - name
        - status

````

## Related topics

- [Agency License Expired](/guides/webhooks/downstream-entity-license-expired.md)
- [Agency License Expiring](/guides/webhooks/downstream-entity-license-expiring.md)
- [The Carrier & MGA API](/guides/carrier-api.md)
