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

# Patient Form Submission



## OpenAPI

````yaml put /forms/{form_id}/submit
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /forms/{form_id}/submit:
    put:
      tags:
        - provider
        - forms
        - public
      summary: Patient Form Submission
      operationId: patient_form_submission_forms__form_id__submit_put
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: form_id
          in: path
          required: true
          schema:
            type: string
            title: Form Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FormSubmissionData'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: boolean
                title: Response Patient Form Submission Forms  Form Id  Submit Put
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    FormSubmissionData:
      properties:
        blocks:
          items:
            oneOf:
              - $ref: '#/components/schemas/SubmittedDemographicsBlock'
              - $ref: '#/components/schemas/SubmittedPaymentMethodBlock'
              - $ref: '#/components/schemas/SubmittedMedicalHistoryBlock'
              - $ref: '#/components/schemas/SubmittedInsuranceBlock'
              - $ref: '#/components/schemas/SubmittedDynamicBlock'
          type: array
          title: Blocks
          default: []
        patientId:
          type: string
          title: Patientid
        hadUploadError:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Haduploaderror
        isCompleteSubmission:
          type: boolean
          title: Iscompletesubmission
          default: false
      type: object
      required:
        - patientId
      title: FormSubmissionData
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SubmittedDemographicsBlock:
      properties:
        id:
          type: string
          title: Id
        blockType:
          type: string
          const: DEMOGRAPHICS
          title: Blocktype
          default: DEMOGRAPHICS
        email:
          type: string
          title: Email
        dateOfBirth:
          type: string
          format: date
          title: Dateofbirth
        gender:
          type: string
          title: Gender
        address:
          $ref: '#/components/schemas/AddressAnswer'
      type: object
      required:
        - id
        - email
        - dateOfBirth
        - gender
        - address
      title: SubmittedDemographicsBlock
    SubmittedPaymentMethodBlock:
      properties:
        id:
          type: string
          title: Id
        blockType:
          type: string
          const: PAYMENT_METHODS
          title: Blocktype
          default: PAYMENT_METHODS
        rainforestPaymentMethod:
          anyOf:
            - $ref: '#/components/schemas/RainforestPaymentMethod'
            - type: 'null'
      type: object
      required:
        - id
      title: SubmittedPaymentMethodBlock
    SubmittedMedicalHistoryBlock:
      properties:
        id:
          type: string
          title: Id
        blockType:
          type: string
          const: MEDICAL_HISTORY
          title: Blocktype
          default: MEDICAL_HISTORY
        allergies:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allergies
        medications:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Medications
        familyHistory:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Familyhistory
        medicalHistory:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Medicalhistory
        prescriptions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Prescriptions
        surgicalHistory:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Surgicalhistory
        socialHistory:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Socialhistory
      type: object
      required:
        - id
      title: SubmittedMedicalHistoryBlock
    SubmittedInsuranceBlock:
      properties:
        id:
          type: string
          title: Id
        blockType:
          type: string
          const: INSURANCE
          title: Blocktype
          default: INSURANCE
        primary:
          anyOf:
            - $ref: '#/components/schemas/FormInsuranceCoverage'
            - type: 'null'
        secondary:
          anyOf:
            - $ref: '#/components/schemas/FormInsuranceCoverage'
            - type: 'null'
      type: object
      required:
        - id
      title: SubmittedInsuranceBlock
    SubmittedDynamicBlock:
      properties:
        id:
          type: string
          title: Id
        blockType:
          type: string
          const: DYNAMIC
          title: Blocktype
          default: DYNAMIC
      additionalProperties: true
      type: object
      required:
        - id
      title: SubmittedDynamicBlock
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AddressAnswer:
      properties:
        address:
          type: string
          title: Address
        addressLineTwo:
          anyOf:
            - type: string
            - type: 'null'
          title: Addresslinetwo
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        zipCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Zipcode
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
      type: object
      required:
        - address
      title: AddressAnswer
    RainforestPaymentMethod:
      properties:
        paymentMethodId:
          type: string
          title: Paymentmethodid
        paymentMethodConfigId:
          type: string
          title: Paymentmethodconfigid
        fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Fingerprint
        methodType:
          type: string
          title: Methodtype
        card:
          anyOf:
            - $ref: '#/components/schemas/RainforestCard'
            - type: 'null'
        ach:
          anyOf:
            - $ref: '#/components/schemas/RainforestACH'
            - type: 'null'
        applePay:
          anyOf:
            - $ref: '#/components/schemas/ApplePay'
            - type: 'null'
        billingContact:
          anyOf:
            - $ref: '#/components/schemas/BillingContact'
            - type: 'null'
        metadata:
          type: object
          title: Metadata
        createdAt:
          type: string
          title: Createdat
        updatedAt:
          type: string
          title: Updatedat
      type: object
      required:
        - paymentMethodId
        - paymentMethodConfigId
        - fingerprint
        - methodType
        - card
        - ach
        - applePay
        - billingContact
        - metadata
        - createdAt
        - updatedAt
      title: RainforestPaymentMethod
    FormInsuranceCoverage:
      properties:
        insuranceCoverageId:
          anyOf:
            - type: string
            - type: 'null'
          title: Insurancecoverageid
        pverifyCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Pverifycode
        memberId:
          anyOf:
            - type: string
            - type: 'null'
          title: Memberid
        insurerName:
          anyOf:
            - type: string
            - type: 'null'
          title: Insurername
        policyHolderName:
          anyOf:
            - type: string
            - type: 'null'
          title: Policyholdername
        policyHolderDob:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Policyholderdob
        groupId:
          anyOf:
            - type: string
            - type: 'null'
          title: Groupid
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Phonenumber
      type: object
      title: FormInsuranceCoverage
    RainforestCard:
      properties:
        brand:
          type: string
          title: Brand
        last4:
          type: string
          title: Last4
        expMonth:
          type: integer
          title: Expmonth
        expYear:
          type: integer
          title: Expyear
      type: object
      required:
        - brand
        - last4
        - expMonth
        - expYear
      title: RainforestCard
      description: The card used to pay for the payin
    RainforestACH:
      properties:
        accountHolderType:
          type: string
          title: Accountholdertype
        accountNumberLast4:
          type: string
          title: Accountnumberlast4
        bankName:
          type: string
          title: Bankname
        routingNumber:
          type: string
          title: Routingnumber
      type: object
      required:
        - accountHolderType
        - accountNumberLast4
        - bankName
        - routingNumber
      title: RainforestACH
      description: The ACH used to pay for the payin
    ApplePay:
      properties:
        type:
          type: string
          title: Type
        brand:
          type: string
          title: Brand
        brandDesc:
          type: string
          title: Branddesc
        description:
          type: string
          title: Description
      type: object
      required:
        - type
        - brand
        - brandDesc
        - description
      title: ApplePay
    BillingContact:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        addressLine1:
          anyOf:
            - type: string
            - type: 'null'
          title: Addressline1
        addressLine2:
          anyOf:
            - type: string
            - type: 'null'
          title: Addressline2
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        postalCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Postalcode
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
      type: object
      required:
        - name
        - addressLine1
        - addressLine2
        - city
        - state
        - postalCode
        - country
        - email
        - phone
      title: BillingContact

````