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

# Upload PDF

> Upload encoded PDF of transactions for a specified end user to translate into Heron Data format




## OpenAPI

````yaml https://app.herondata.io/swagger post /api/end_users/{end_user_id_or_heron_id}/pdfs/v1
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/end_users/{end_user_id_or_heron_id}/pdfs/v1:
    post:
      tags:
        - EndUserIntegrations
      summary: Upload PDF
      description: >
        Upload encoded PDF of transactions for a specified end user to translate
        into Heron Data format
      parameters:
        - description: The `end_user_id` or `heron_id` of EndUser to upload
          in: path
          name: end_user_id_or_heron_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PdfPostSchema'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                properties:
                  pdf_heron_id:
                    description: Heron id of the uploaded pdf file
                    type: string
                  request_id:
                    description: Unique UUID per request
                    type: string
                type: object
          description: OK
        '409':
          description: >-
            File content duplicates an already uploaded file, or an identical
            file is still being saved. If an earlier upload of the same file was
            interrupted, retries get this 409 for up to 100 seconds. Duplicates
            are rejected only when duplicate rejection is enabled for the
            account.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PdfPostSchema:
      properties:
        account_id:
          description: Unique ID for account associated with PDF
          example: checking_account_202348
          nullable: true
          type: string
        currency:
          description: >-
            ISO 4217 currency code for transactions in account. We currently
            only support GBP and USD PDFs
          enum:
            - USD
            - GBP
            - null
          example: USD
          nullable: true
          type: string
        filename:
          description: The filename of the PDF
          example: my-favourite.pdf
          nullable: true
          type: string
        is_split:
          description: Whether the file has been manually split
          example: false
          nullable: true
          type: boolean
        parent_file_heron_id:
          description: >-
            The Heron ID of the parent file, if this PDF is a split from another
            file
          nullable: true
          type: string
        pdf_base64:
          description: >-
            The base64 encoded string of the PDF file. If using Javascript, this
            is directly the output of the FileReader.readAsDataURL() output.
          pattern: ^data\:\w+\/\w+\;base64\,
          type: string
        read_us_dates:
          description: 'True if date formats in the statement are US: month/date/year'
          nullable: true
          type: boolean
        reference_id:
          description: An optional field for your unique identifier for the PDF
          example: my-favourite-pdf
          maxLength: 140
          nullable: true
          type: string
      required:
        - pdf_base64
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.