---
title: "Get licenses by ID"
url: "https://developer.agentsync.io/apis/producer-sync-api/versions/953bc6f0-354b-4960-adc0-3acdb3d638a2/operations/getLicenseById"
---

> Full API specification: https://developer.agentsync.io/apis/producer-sync-api/versions/953bc6f0-354b-4960-adc0-3acdb3d638a2.md

# Get licenses by ID

`GET` `/v1/licenses/{id}`

Operation ID: `getLicenseById`

Retrieves a single license record using its unique license ID.

## Path parameters

- `id` (integer, required) - Unique license ID

## Responses

- `200` - Success
- `400` - Bad Request
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found
- `405` - Method Not Allowed
- `429` - Too Many Requests
- `500` - Internal Server Error
- `504` - Gateway Timeout

## OpenAPI definition

```yaml
openapi: 3.1.1
info:
  title: ProducerSync API
  version: v2.80.2
servers:
  - url: https://api.sandbox.agentsync.io
    description: Sandbox
paths:
  /v1/licenses/{id}:
    get:
      tags:
        - Producer Licenses and LOAs
      operationId: getLicenseById
      summary: Get licenses by ID
      description: |
        Retrieves a single license record using its unique license ID.
      parameters:
        - name: id
          in: path
          description: Unique license ID
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: Success
          content:
            application/hal+json:
              schema:
                $ref: "#/components/schemas/LicensesV1"
          headers:
            ratelimit-limit:
              $ref: "#/components/headers/ratelimit-limit"
            ratelimit-remaining:
              $ref: "#/components/headers/ratelimit-remaining"
            ratelimit-reset:
              $ref: "#/components/headers/ratelimit-reset"
        "400":
          $ref: "#/components/responses/400BadRequest"
        "401":
          $ref: "#/components/responses/401Unauthorized"
        "403":
          $ref: "#/components/responses/403Forbidden"
        "404":
          $ref: "#/components/responses/404NotFound"
        "405":
          $ref: "#/components/responses/405MethodNotAllowed"
        "429":
          $ref: "#/components/responses/429TooManyRequests"
        "500":
          $ref: "#/components/responses/500InternalServerError"
        "504":
          $ref: "#/components/responses/504GatewayTimeout"
components:
  schemas:
    LicensesV1:
      allOf:
        - $ref: "#/components/schemas/LicensesBaseResponse"
        - type: object
          properties:
            licenseLoas:
              type: array
              items:
                $ref: "#/components/schemas/LicenseLoaV1"
            agentTypes:
              type: array
              items:
                type: string
                example: Producer
            niprDeleted:
              type: boolean
              example: false
              description: Indicates if the license was marked deleted by NIPR.
            links:
              $ref: "#/components/schemas/SelfLink"
            renewalPeriods:
              $ref: "#/components/schemas/RenewalPeriodsBase"
    LicensesBaseResponse:
      type: object
      description: Base schema containing common license fields.
      properties:
        id:
          type: integer
          format: int64
          example: 1234567
          description: Unique identifier for the license.
        npn:
          type: string
          example: "18551108"
          description: National Producer Number associated with the license.
        transactionId:
          type: string
          format: uuid
          example: 337f638b-b0dd-4d9f-80f5-29a9158d0286
        forState:
          type: string
          example: AL
          minLength: 2
          maxLength: 2
          description: State where the license applies.
        branchId:
          type: string
          example: ""
          description: Identifier for a related branch, if applicable.
        niprDateUpdated:
          type: string
          format: date
          example: 2020-12-16
          description: Last date NIPR reported an update to this license.
        createdAt:
          type: string
          format: date
          example: 2021-04-04
          description: Date of the creation of this record in AgentSync.
        updatedAt:
          type: string
          format: date
          example: 2024-12-02
          description: Date of the most recent update to this record in AgentSync.
        licenseNum:
          type: string
          example: "897579550"
          description: License number associated with NPN.
        originalIssueDate:
          type: string
          format: date
          example: 2016-04-22
          description: The date the license was originally issued
        expirationDate:
          type: string
          format: date
          example: 2022-04-22
          description: The date the license is set to expire.
        licenseClass:
          type: string
          example: Insurance Producer
          description: The classification or type of license issued
        licenseClassCode:
          type: string
          example: "3"
          description: The code representing the license class
        residencyStatus:
          type: string
          example: R
          description: Indicates whether the license holder is a resident ("R") or
            non-resident ("NR")
        active:
          type: boolean
          example: false
          description: Indicates whether the license is currently active
    LicenseLoaV1:
      allOf:
        - $ref: "#/components/schemas/LicenseLoaBase"
        - type: object
          properties:
            links:
              $ref: "#/components/schemas/SelfLink"
    SelfLink:
      type: object
      properties:
        self:
          type: object
          properties:
            href:
              type: string
              example: https://api.sandbox.agentsync.io/v1/{endpoint}/{id}
    RenewalPeriodsBase:
      type: object
      description: Contains calculated renewal windows and classification
      properties:
        renewal:
          type: object
          properties:
            startDate:
              type: string
              format: date
              example: 2025-10-02
            endDate:
              type: string
              format: date
              example: 2025-12-31
        lateRenewal:
          type: object
          properties:
            startDate:
              type: string
              format: date
              example: 2026-01-01
            endDate:
              type: string
              format: date
              example: 2026-01-30
        reinstatement:
          type: object
          properties:
            startDate:
              type: string
              format: date
              example: 2026-01-31
            endDate:
              type: string
              format: date
              example: 2026-12-31
        renewalType:
          type: string
          enum:
            - RENEWAL_REQUIRED
            - PERPETUAL
            - NO_RENEWAL_INFORMATION_AVAILABLE
          example: RENEWAL_REQUIRED
          description: >
            Classification of the license renewal behavior.

            - `RENEWAL_REQUIRED`: License has defined renewal windows.

            - `PERPETUAL`: License is considered perpetual.

            - `NO_RENEWAL_INFORMATION_AVAILABLE`: No renewal metadata matched
            (due to various reasons).
    LicenseLoaBase:
      type: object
      properties:
        id:
          type: integer
          example: 1234567
          description: unique identifier for the license line of authority (loa) record
        licenseId:
          type: integer
          description: unique identifier for the associated license
          example: 967373
        transactionId:
          type: string
          format: uuid
          example: ae51f10b-8b5e-40ba-98a9-8f860392b344
        loa:
          type: string
          example: Property
          description: The line of authority associated with the license (e.g., Property,
            Casualty)
        loaCode:
          type: string
          example: "12"
          description: A code representing the line of authority
        issueDate:
          type: string
          format: date
          example: 2004-01-21
          description: The date the line of authority was issued
        createdAt:
          type: string
          format: date
          example: 2021-04-04
          description: Date of the creation of this record in AgentSync
        updatedAt:
          type: string
          format: date
          example: 2024-12-02
          description: Date of the most recent update to this record in AgentSync
        status:
          type: string
          enum:
            - Active
            - Cancelled
            - Inactive
          example: Active
          description: Current status of the line of authority. One of `Active`,
            `Cancelled`, or `Inactive`
        statusReasonDate:
          type: string
          format: date
          example: 2020-12-26
          description: The date the current status reason became effective
        ceCompliance:
          type: string
          example: IN COMPLIANCE
          description: Continuing education (CE) compliance status. One of `EXEMPT`, `IN
            COMPLIANCE`, `N/A`, `NOT IN COMPLIANCE` or `NULL`
        ceCreditsNeeded:
          type: integer
          example: 0
          description: Number of continuing education credits required for compliance
        loaMapping:
          type: object
          properties:
            categories:
              type: array
              items:
                type: string
                example: life
        niprDeleted:
          type: boolean
          example: false
          description: Indicates if the license was marked deleted by NIPR
  headers:
    ratelimit-limit:
      description: Maximum number of requests allowed in the current window
      schema:
        type: integer
    ratelimit-remaining:
      description: Number of requests remaining in the current window
      schema:
        type: integer
    ratelimit-reset:
      description: Time when the rate limit will reset
      schema:
        type: integer
  responses:
    400BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              timestamp:
                type: integer
                example: 1742929112
              status:
                type: integer
                example: 400
              error:
                type: string
                example: Bad Request
              message:
                type: string
                example: Invalid parameter values provided - {parameter}:[{invalid values}]
              path:
                type: string
                example: "{endpoint_path}"
    401Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthorized
    403Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            type: object
            properties:
              timestamp:
                type: integer
                example: 1742935636
              status:
                type: integer
                example: 403
              path:
                type: string
                example: "{requested endpoint}"
              error:
                type: string
                example: Forbidden
    404NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              timestamp:
                type: integer
                example: 1742929112
              status:
                type: integer
                example: 404
              error:
                type: string
                example: Not Found
              message:
                type: string
                example: Error message describing what was not found
              path:
                type: string
                example: "{requested endpoint}"
    405MethodNotAllowed:
      description: Method Not Allowed
      content:
        application/json:
          schema:
            type: object
            properties:
              type:
                type: string
                example: about:blank
              status:
                type: integer
                example: 405
              detail:
                type: string
                example: Method 'PUT' is not supported.
              instance:
                type: string
                example: "{requested endpoint}"
    429TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: API rate limit exceeded
    500InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              timestamp:
                type: integer
                example: 1613510729601
              status:
                type: integer
                example: 500
              error:
                type: string
                example: Internal Server Error
              message:
                type: string
                example: Error message describing why this was a server error.
              path:
                type: string
                example: "{requested endpoint}"
    504GatewayTimeout:
      description: Gateway Timeout
```
