> ## 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.

# Upsert Insurance Card



## OpenAPI

````yaml post /patients/{patient_id}/policies/{policy_id}/card-images
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/{policy_id}/card-images:
    post:
      tags:
        - insurance-cards
      summary: Upsert Insurance Card
      operationId: >-
        upsert_insurance_card_patients__patient_id__policies__policy_id__card_images_post
      parameters:
        - in: path
          name: patient_id
          required: true
          schema:
            title: Patient Id
            type: integer
        - in: path
          name: policy_id
          required: true
          schema:
            title: Policy Id
            type: integer
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upsert_insurance_card_patients__patient_id__policies__policy_id__card_images_post
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ProcessInsuranceCardImageUploadAsyncResponse
          description: Successful Response
        '403':
          description: practice_id not authorized for this client
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - RequireAuthentication: []
components:
  schemas:
    Body_upsert_insurance_card_patients__patient_id__policies__policy_id__card_images_post:
      properties:
        image_1:
          anyOf:
            - contentMediaType: application/octet-stream
              type: string
            - type: 'null'
          title: Image 1
        image_2:
          anyOf:
            - contentMediaType: application/octet-stream
              type: string
            - type: 'null'
          title: Image 2
      title: >-
        Body_upsert_insurance_card_patients__patient_id__policies__policy_id__card_images_post
      type: object
    ProcessInsuranceCardImageUploadAsyncResponse:
      properties:
        message:
          default: The insurance card is uploading.
          title: Message
          type: string
        success:
          default: true
          title: Success
          type: boolean
      title: ProcessInsuranceCardImageUploadAsyncResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      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
  securitySchemes:
    RequireAuthentication:
      type: http
      scheme: bearer

````