---
title: "Get the entity for a specific NPN"
url: "https://developer.agentsync.io/apis/producer-sync-api/versions/953bc6f0-354b-4960-adc0-3acdb3d638a2/operations/getEntitiesByNPN"
---

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

# Get the entity for a specific NPN

`GET` `/v1/entities/{npn}`

Operation ID: `getEntitiesByNPN`

Returns the entity associated with a specific NPN. If you're not already subscribed, this request will automatically subscribe you to the NPN.

## Path parameters

- `npn` (string, required) - National Producer Number (npn) of the data to return

## 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/entities/{npn}:
    get:
      tags:
        - Producer Entities
      operationId: getEntitiesByNPN
      summary: Get the entity for a specific NPN
      description: >
        Returns the entity associated with a specific NPN. If you're not already
        subscribed, this request will automatically subscribe you to the NPN.
      parameters:
        - $ref: "#/components/parameters/npnPathParam"
      responses:
        "200":
          description: Success
          content:
            application/hal+json:
              schema:
                type: object
                properties:
                  embedded:
                    type: object
                    properties:
                      entities:
                        type: array
                        items:
                          $ref: "#/components/schemas/EntitiesV1"
                  links:
                    $ref: "#/components/schemas/LinksV1"
          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:
  parameters:
    npnPathParam:
      name: npn
      in: path
      description: National Producer Number (npn) of the data to return
      required: true
      schema:
        type: string
        example: "123456789"
  schemas:
    EntitiesV1:
      allOf:
        - $ref: "#/components/schemas/EntitiesBaseResponse"
        - type: object
          properties:
            metadata:
              $ref: "#/components/schemas/EntitiesV1Metadata"
            links:
              $ref: "#/components/schemas/EntitiesLinks"
    LinksV1:
      type: object
      properties:
        first:
          type: object
          properties:
            href:
              type: string
              example: https://access.sandbox.agentsync.io/v1/{endpoint}?page=0&size=3
        self:
          type: object
          properties:
            href:
              type: string
              example: https://access.sandbox.agentsync.io/v1/{endpoint}?page=0&size=3
        next:
          type: object
          properties:
            href:
              type: string
              example: https://access.sandbox.agentsync.io/v1/{endpoint}?page=1&size=3
        last:
          type: object
          properties:
            href:
              type: string
              example: https://access.sandbox.agentsync.io/v1/{endpoint}?page=164&size=3
    EntitiesBaseResponse:
      type: object
      description: Common entity fields shared across versions.
      properties:
        id:
          type: integer
          format: int64
          example: 1234567
          description: Unique identifier for the entity.
        npn:
          type: string
          example: "18551108"
          description: National Producer Number associated with the entity.
        transactionId:
          type: string
          format: uuid
          example: ae51f10b-8b5e-40ba-98a9-8f860392b344
        type:
          type: string
          enum:
            - INDIVIDUAL
            - FIRM
          example: INDIVIDUAL
          description: Type of entity - individual or firm.
        feinId:
          type:
            - string
            - "null"
          example: "123456789"
          description: Federal Employer Identification Number. Expected to be NULL for
            individuals.
        companyName:
          type:
            - string
            - "null"
          example: Acme Insurance Group
          description: Name of the firm. Expected to be NULL for individuals.
        firstName:
          type: string
          example: Jeff
        middleName:
          type: string
          example: Lee
        lastName:
          type: string
          example: Android
        dateOfBirth:
          type:
            - string
            - "null"
          format: date
          example: 1983-12-15
          description: Date of birth for the producer. Expected to be NULL for a firm.
        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.
        noLicenses:
          type: boolean
          example: false
        subscriptionCount:
          type: integer
          example: 4
        niprDeleted:
          type: boolean
          example: false
          description: Indicates if the entity was marked deleted by NIPR.
    EntitiesV1Metadata:
      type: object
      properties:
        no_licenses:
          type: boolean
          example: false
        last_nipr_entity_update:
          type: string
          format: date-time
          example: 2024-11-20T12:42:43.519662+00:00
    EntitiesLinks:
      type: object
      properties:
        self:
          type: object
          properties:
            href:
              type: string
              format: uri
              example: https://api.sandbox.agentsync.io/v1/entities/1000013
        addresses:
          type: object
          properties:
            href:
              type: string
              format: uri
              example: https://api.sandbox.agentsync.io/v1/entities/1000013/addresses
        contactInfos:
          type: object
          properties:
            href:
              type: string
              format: uri
              example: https://api.sandbox.agentsync.io/v1/entities/1000013/contactInfos
        appointments:
          type: object
          properties:
            href:
              type: string
              format: uri
              example: https://api.sandbox.agentsync.io/v1/entities/1000013/appointments
        licenses:
          type: object
          properties:
            href:
              type: string
              format: uri
              example: https://api.sandbox.agentsync.io/v1/entities/1000013/licenses
        residentLicense:
          type: object
          properties:
            href:
              type: string
              format: uri
              example: https://api.sandbox.agentsync.io/v2/entities/1000013/residentLicense
  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
```
