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

# Upsert a funder submission

> Find or create a funder submission for the given end user and funder pair. Returns the existing submission if one already exists (unique per end_user + funder).




## OpenAPI

````yaml https://app.herondata.io/swagger post /api/funder_submissions/
openapi: 3.0.0
info:
  contact:
    email: support@herondata.io
    name: Support
  title: Heron Data API
  version: '2021-07-19'
servers:
  - description: Production
    url: https://app.herondata.io
security:
  - ApiKeyAuth:
      - key_XXX
externalDocs:
  description: Read Tutorial
  url: https://docs.herondata.io/
paths:
  /api/funder_submissions/:
    post:
      summary: Upsert a funder submission
      description: >
        Find or create a funder submission for the given end user and funder
        pair. Returns the existing submission if one already exists (unique per
        end_user + funder).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertFunderSubmissionRequestSchema'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FunderSubmissionSchema'
          description: Funder submission found or created
        '404':
          description: End user or funder not found
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpsertFunderSubmissionRequestSchema:
      additionalProperties: false
      properties:
        end_user_heron_id:
          type: string
        funder_heron_id:
          type: string
      required:
        - end_user_heron_id
        - funder_heron_id
      type: object
    FunderSubmissionSchema:
      additionalProperties: false
      properties:
        created:
          format: date-time
          readOnly: true
          type: string
        end_user_heron_id:
          readOnly: true
          type: string
        funder:
          allOf:
            - $ref: '#/components/schemas/Funder1'
          readOnly: true
        heron_id:
          readOnly: true
          type: string
        status:
          enum:
            - pending
            - in_progress
            - submitted_to_funder
            - invalid_data_for_funder
            - submission_failed
            - approved
            - declined
            - null
          nullable: true
          readOnly: true
        submission_result:
          additionalProperties: {}
          nullable: true
          readOnly: true
          type: object
        submitted_at:
          format: date-time
          nullable: true
          readOnly: true
          type: string
      type: object
    Funder1:
      additionalProperties: false
      properties:
        heron_id:
          readOnly: true
          type: string
        name:
          readOnly: true
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````