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

# Put Policies



## OpenAPI

````yaml put /patients/{patient_id}/policies
openapi: 3.1.0
info:
  title: Insurance API
  description: This API supports the management of insurances.
  version: 0.1.0
servers:
  - url: https://sandbox.elationemr.com/api/2.0
    description: Sandbox Environment
security: []
tags:
  - name: health
  - name: insurance-cards
    description: Upload and get insurance card images
  - name: insurance-eligibility
    description: Check insurance eligibility
  - name: canonical-payer
    description: Upload and store canonical payers csv
  - name: submitters
    description: Submitter account management
  - name: provider-enrollment
    description: Enroll providers at clearinghouses
paths:
  /patients/{patient_id}/policies:
    put:
      tags:
        - INSURANCE POLICIES
      summary: Put Policies
      operationId: put_policies_patients__patient_id__policies_put
      parameters:
        - in: path
          name: patient_id
          required: true
          schema:
            title: Patient Id
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyPutRequestBasicList'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PoliciesResponse'
          description: Successful Response
        '403':
          description: practice_id not authorized for this client
        '404':
          description: Policy id does not belong to this patient
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - RequireAuthentication: []
components:
  schemas:
    PolicyPutRequestBasicList:
      items:
        $ref: '#/components/schemas/PolicyPutRequestBasic'
      title: PolicyPutRequestBasicList
      type: array
    PoliciesResponse:
      properties:
        current_page_num:
          anyOf:
            - type: integer
            - type: 'null'
          title: Current Page Num
        next_page_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Page Url
        page_first_item_num:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page First Item Num
        page_last_item_num:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page Last Item Num
        previous_page_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Page Url
        results:
          items:
            $ref: '#/components/schemas/PolicyResponse'
          title: Results
          type: array
        total_item_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Item Count
        total_page_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Page Count
      required:
        - results
      title: PoliciesResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    PolicyPutRequestBasic:
      description: |-
        Request model for updating an insurance policy.
        Address fields are for the insurance carrier.
      properties:
        address:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: Carrier street address
          title: Address
        carrier_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: Insurance carrier identifier
          title: Carrier Id
        carrier_name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: Name of the insurance carrier
          title: Carrier Name
        city:
          anyOf:
            - maxLength: 50
              type: string
            - type: 'null'
          description: Carrier city
          title: City
        copay:
          anyOf:
            - maxLength: 19
              pattern: ^-?\d{1,8}(\.\d{1,10})?$|^$
              type: string
            - type: 'null'
          description: Copay amount
          title: Copay
        county_code:
          anyOf:
            - maxLength: 10
              type: string
            - type: 'null'
          description: Carrier county code
          title: County Code
        deductible:
          anyOf:
            - maxLength: 19
              pattern: ^-?\d{1,8}(\.\d{1,10})?$|^$
              type: string
            - type: 'null'
          description: Deductible amount
          title: Deductible
        end_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          description: Policy end date
          title: End Date
        extension:
          anyOf:
            - maxLength: 6
              type: string
            - type: 'null'
          description: Carrier phone extension
          title: Extension
        group_id:
          anyOf:
            - maxLength: 50
              type: string
            - type: 'null'
          description: Group identifier
          title: Group Id
        id:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Policy ID. If provided, updates the existing policy. If omitted,
            creates a new policy with a generated ID.
          title: Id
        insured_person_address:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: Insured person's street address
          title: Insured Person Address
        insured_person_city:
          anyOf:
            - maxLength: 50
              type: string
            - type: 'null'
          description: Insured person's city
          title: Insured Person City
        insured_person_dob:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          description: Insured person's date of birth
          title: Insured Person Dob
        insured_person_first_name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: Insured person's first name
          title: Insured Person First Name
        insured_person_id:
          anyOf:
            - maxLength: 50
              type: string
            - type: 'null'
          description: Insured person's identifier
          title: Insured Person Id
        insured_person_last_name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: Insured person's last name
          title: Insured Person Last Name
        insured_person_sex_at_birth:
          anyOf:
            - maxLength: 1
              type: string
            - type: 'null'
          description: Insured person's sex at birth
          title: Insured Person Sex At Birth
        insured_person_ssn:
          anyOf:
            - maxLength: 11
              type: string
            - type: 'null'
          description: Insured person's SSN
          title: Insured Person Ssn
        insured_person_state:
          anyOf:
            - maxLength: 2
              type: string
            - type: 'null'
          description: Insured person's state code
          title: Insured Person State
        insured_person_zip:
          anyOf:
            - maxLength: 10
              type: string
            - type: 'null'
          description: Insured person's ZIP code
          title: Insured Person Zip
        medicare_secondary_code:
          anyOf:
            - maxLength: 5
              type: string
            - type: 'null'
          description: Medicare secondary code
          title: Medicare Secondary Code
        member_id:
          anyOf:
            - maxLength: 50
              type: string
            - type: 'null'
          description: Member identifier
          title: Member Id
        patient_dob:
          description: Patient's date of birth
          format: date
          title: Patient Dob
          type: string
        patient_first_name:
          description: Patient's first name
          maxLength: 70
          title: Patient First Name
          type: string
        patient_last_name:
          description: Patient's last name
          maxLength: 70
          title: Patient Last Name
          type: string
        payment_program:
          anyOf:
            - $ref: '#/components/schemas/InsurancePaymentProgram'
            - type: 'null'
          description: Insurance payment program type
        phone:
          anyOf:
            - maxLength: 20
              type: string
            - type: 'null'
          description: Carrier phone number
          title: Phone
        plan_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: Insurance plan identifier
          title: Plan Id
        plan_name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          description: Name of the insurance plan
          title: Plan Name
        practice_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Practice the policy belongs to. Must be one of the practices your
            API credentials are authorized for, or the request is rejected. If
            omitted and id refers to an existing policy, that policy's current
            practice is preserved; if omitted and id is absent or doesn't match
            an existing policy (i.e. this creates a new policy), the first
            practice associated with your credentials is used, as on create. If
            your credentials are authorized for more than one practice, always
            specify this field explicitly — which practice is 'first' is not
            something you control and is not guaranteed to stay the same over
            time.
          title: Practice Id
        rank:
          anyOf:
            - type: integer
            - type: 'null'
          description: Policy rank (1=primary, 2=secondary, 3=tertiary)
          title: Rank
        relationship_to_insured:
          anyOf:
            - $ref: '#/components/schemas/InsurerRelationship'
            - type: 'null'
          default: self
          description: Relationship of the patient to the insured person
        start_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          description: Policy start date
          title: Start Date
        state:
          anyOf:
            - maxLength: 2
              type: string
            - type: 'null'
          description: Carrier state code
          title: State
        status:
          anyOf:
            - $ref: '#/components/schemas/Status'
            - type: 'null'
          description: Current status of the policy
        suite:
          anyOf:
            - maxLength: 40
              type: string
            - type: 'null'
          description: Carrier suite/unit number
          title: Suite
        vendor_company_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: For internal use only
          title: Vendor Company Id
        vendor_external_id:
          anyOf:
            - maxLength: 100
              type: string
            - type: 'null'
          description: For internal use only
          title: Vendor External Id
        zip:
          anyOf:
            - maxLength: 10
              type: string
            - type: 'null'
          description: Carrier ZIP code
          title: Zip
      required:
        - patient_first_name
        - patient_last_name
        - patient_dob
      title: PolicyPutRequestBasic
      type: object
    PolicyResponse:
      properties:
        address:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          title: Address
        back_image_path:
          anyOf:
            - type: string
            - type: 'null'
          description: Path to the back image of the insurance card
          title: Back Image Path
        can_check_eligibility:
          anyOf:
            - type: boolean
            - type: 'null'
          default: false
          description: Indicates whether eligibility can be checked for this policy
          title: Can Check Eligibility
        carrier_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Carrier Id
        carrier_name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          title: Carrier Name
        city:
          anyOf:
            - maxLength: 50
              type: string
            - type: 'null'
          title: City
        copay:
          anyOf:
            - maxLength: 19
              pattern: ^-?\d{1,8}(\.\d{1,10})?$|^$
              type: string
            - type: 'null'
          title: Copay
        county_code:
          anyOf:
            - maxLength: 10
              type: string
            - type: 'null'
          title: County Code
        deductible:
          anyOf:
            - maxLength: 19
              pattern: ^-?\d{1,8}(\.\d{1,10})?$|^$
              type: string
            - type: 'null'
          title: Deductible
        end_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: End Date
        extension:
          anyOf:
            - maxLength: 6
              type: string
            - type: 'null'
          title: Extension
        front_image_path:
          anyOf:
            - type: string
            - type: 'null'
          description: Path to the front image of the insurance card
          title: Front Image Path
        group_id:
          anyOf:
            - maxLength: 50
              type: string
            - type: 'null'
          title: Group Id
        hippospace:
          maxLength: 255
          title: Hippospace
          type: string
        id:
          title: Id
          type: integer
        insured_person_address:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          title: Insured Person Address
        insured_person_city:
          anyOf:
            - maxLength: 50
              type: string
            - type: 'null'
          title: Insured Person City
        insured_person_dob:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Insured Person Dob
        insured_person_first_name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          title: Insured Person First Name
        insured_person_id:
          anyOf:
            - maxLength: 50
              type: string
            - type: 'null'
          title: Insured Person Id
        insured_person_last_name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          title: Insured Person Last Name
        insured_person_sex_at_birth:
          anyOf:
            - maxLength: 1
              type: string
            - type: 'null'
          title: Insured Person Sex At Birth
        insured_person_ssn:
          anyOf:
            - maxLength: 11
              type: string
            - type: 'null'
          title: Insured Person Ssn
        insured_person_state:
          anyOf:
            - maxLength: 2
              type: string
            - type: 'null'
          title: Insured Person State
        insured_person_zip:
          anyOf:
            - maxLength: 10
              type: string
            - type: 'null'
          title: Insured Person Zip
        is_legacy_insurance:
          default: false
          title: Is Legacy Insurance
          type: boolean
        medicare_secondary_code:
          anyOf:
            - maxLength: 5
              type: string
            - type: 'null'
          title: Medicare Secondary Code
        member_id:
          anyOf:
            - maxLength: 50
              type: string
            - type: 'null'
          title: Member Id
        patient_dob:
          format: date
          title: Patient Dob
          type: string
        patient_first_name:
          maxLength: 70
          title: Patient First Name
          type: string
        patient_id:
          title: Patient Id
          type: integer
        patient_last_name:
          maxLength: 70
          title: Patient Last Name
          type: string
        payment_program:
          anyOf:
            - $ref: '#/components/schemas/InsurancePaymentProgram'
            - type: 'null'
        phone:
          anyOf:
            - maxLength: 20
              type: string
            - type: 'null'
          title: Phone
        plan_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Plan Id
        plan_name:
          anyOf:
            - maxLength: 200
              type: string
            - type: 'null'
          title: Plan Name
        practice_id:
          title: Practice Id
          type: integer
        rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rank
        relationship_to_insured:
          anyOf:
            - $ref: '#/components/schemas/InsurerRelationship'
            - type: 'null'
          default: self
        start_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          title: Start Date
        state:
          anyOf:
            - maxLength: 2
              type: string
            - type: 'null'
          title: State
        status:
          $ref: '#/components/schemas/Status'
        suite:
          anyOf:
            - maxLength: 40
              type: string
            - type: 'null'
          title: Suite
        vendor_company_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Vendor Company Id
        vendor_external_id:
          anyOf:
            - maxLength: 100
              type: string
            - type: 'null'
          title: Vendor External Id
        zip:
          anyOf:
            - maxLength: 10
              type: string
            - type: 'null'
          title: Zip
      required:
        - id
        - hippospace
        - practice_id
        - patient_id
        - patient_first_name
        - patient_last_name
        - patient_dob
        - status
      title: PolicyResponse
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    InsurancePaymentProgram:
      enum:
        - medicare_part_b
        - medicare_advantage
        - medicaid
        - commercial_hmsa
        - commercial_sfhp
        - commercial_other
        - workers_compensation
      title: InsurancePaymentProgram
      type: string
    InsurerRelationship:
      enum:
        - self
        - child
        - spouse
        - other
      title: InsurerRelationship
      type: string
    Status:
      enum:
        - active
        - inactive
      title: Status
      type: string
  securitySchemes:
    RequireAuthentication:
      type: http
      scheme: bearer

````