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

# Get latest insurance

> Retrieve user insurance latest via the Junction API. Requires authentication with your team API key.

<Card horizontal icon="person-digging" color="#57164A">
  This feature is in **closed beta**.

  Interested in this feature? Get in touch with your Customer Success Manager.
</Card>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
       --url {{BASE_URL}}/v2/user/{user_id}/insurance/latest \
       --header 'Accept: application/json' \
       --header 'x-vital-api-key: <API_KEY>' \
       --header 'Content-Type: application/json' \
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "payor_code": "UNITE",
    "member_id": "test",
    "group_id": "123",
    "relationship": "Self",
    "insured": {
      "first_name": "John",
      "last_name": "Doe", 
      "email": "john@email.com", 
      "phone_number":"+1123123123",
      "gender": "Male", 
      "dob": "1999-01-01", 
      "address": {
        "first_line": "Some Street", 
        "second_line": null,
        "zip_code": "85004",
        "state": "AZ",
        "city": "Phoenix"
      }
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v2/user/{user_id}/insurance/latest
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.483
servers:
  - url: https://api.us.junction.com
    x-fern-server-name: Production
  - url: https://api.eu.junction.com
    x-fern-server-name: ProductionEU
  - url: https://api.sandbox.us.junction.com
    x-fern-server-name: Sandbox
  - url: https://api.sandbox.eu.junction.com
    x-fern-server-name: SandboxEU
security:
  - apiKeyAuth: []
paths:
  /v2/user/{user_id}/insurance/latest:
    get:
      tags:
        - user
      summary: Get Latest Insurance
      operationId: get_latest_insurance_v2_user__user_id__insurance_latest_get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            title: User Id
        - name: is_primary
          in: query
          required: false
          schema:
            type: boolean
            title: Is Primary
            default: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientFacingInsurance'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ClientFacingInsurance:
      properties:
        member_id:
          type: string
          title: Member Id
        payor_code:
          type: string
          title: Payor Code
        relationship:
          $ref: '#/components/schemas/ResponsibleRelationship'
          description: ℹ️ This enum is non-exhaustive.
        insured:
          $ref: >-
            #/components/schemas/vital_core__schemas__db_schemas__lab_test__insurance__PersonDetails
        company:
          $ref: '#/components/schemas/CompanyDetails'
        group_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Group Id
        guarantor:
          anyOf:
            - $ref: '#/components/schemas/GuarantorDetails'
            - type: 'null'
        is_primary:
          type: boolean
          title: Is Primary
          default: true
      type: object
      required:
        - member_id
        - payor_code
        - relationship
        - insured
        - company
      title: ClientFacingInsurance
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
    ResponsibleRelationship:
      type: string
      enum:
        - Self
        - Spouse
        - Other
      title: ResponsibleRelationship
      description: ℹ️ This enum is non-exhaustive.
    vital_core__schemas__db_schemas__lab_test__insurance__PersonDetails:
      properties:
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        gender:
          $ref: '#/components/schemas/Gender'
          description: ℹ️ This enum is non-exhaustive.
        address:
          $ref: '#/components/schemas/Address'
        dob:
          type: string
          format: date
          title: Dob
        email:
          type: string
          title: Email
        phone_number:
          type: string
          title: Phone Number
      type: object
      required:
        - first_name
        - last_name
        - gender
        - address
        - dob
        - email
        - phone_number
      title: PersonDetails
    CompanyDetails:
      properties:
        name:
          type: string
          title: Name
        address:
          $ref: '#/components/schemas/Address'
      type: object
      required:
        - name
        - address
      title: CompanyDetails
    GuarantorDetails:
      properties:
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        address:
          $ref: '#/components/schemas/Address'
        phone_number:
          type: string
          title: Phone Number
        household_income:
          anyOf:
            - type: integer
            - type: 'null'
          title: Household Income
        household_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Household Size
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
      type: object
      required:
        - first_name
        - last_name
        - address
        - phone_number
      title: GuarantorDetails
    Gender:
      type: string
      enum:
        - female
        - male
        - other
        - unknown
      title: Gender
      description: ℹ️ This enum is non-exhaustive.
    Address:
      properties:
        first_line:
          type: string
          title: First Line
        second_line:
          anyOf:
            - type: string
            - type: 'null'
          title: Second Line
          default: ''
        country:
          type: string
          title: Country
        zip:
          type: string
          title: Zip
        city:
          type: string
          title: City
        state:
          type: string
          title: State
        access_notes:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Access Notes
      type: object
      required:
        - first_line
        - country
        - zip
        - city
        - state
      title: Address
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````