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

# Upload document to request to client answer

> Upload a document file for your answer. Use this for `fileupload` type requests.

**IMPORTANT:** For `fileupload` type requests, upload all documents FIRST, then submit the answer.
Once the answer is submitted, no more documents can be uploaded.

**Allowed file types:** PDF, JPEG, PNG

**Maximum file size:** 10 MB



## OpenAPI

````yaml post /v1/mandates/{mandate_id}/requests-to-client/{request_id}/answer/documents/
openapi: 3.0.3
info:
  title: paywise Case Management API
  version: v1
  description: |

    Use our Case Management API to perform the debt entire collection process.

    Please refer to the [official docs][ref1] for more!

    [ref1]: https://docs.paywise.de/api-docs/case-management-api/introduction
servers:
  - url: https://api.paywise.de
    description: Production environment
security: []
externalDocs:
  url: https://docs.paywise.de/api-docs/case-management-api/
paths:
  /v1/mandates/{mandate_id}/requests-to-client/{request_id}/answer/documents/:
    post:
      tags:
        - mandates
      summary: Upload document to request to client answer
      description: >-
        Upload a document file for your answer. Use this for `fileupload` type
        requests.


        **IMPORTANT:** For `fileupload` type requests, upload all documents
        FIRST, then submit the answer.

        Once the answer is submitted, no more documents can be uploaded.


        **Allowed file types:** PDF, JPEG, PNG


        **Maximum file size:** 10 MB
      operationId: upload-request-to-client-answer-document
      parameters:
        - in: path
          name: mandate_id
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: request_id
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnswerDocumentUploadRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AnswerDocumentUploadRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AnswerDocumentUploadRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestToClientPublic'
              examples:
                SuccessfulUploadResponse:
                  value:
                    id: b2c3d4e5-f6a7-5e44-9f0a-d8e9f0a1b2c3
                    href: >-
                      https://api.paywise.de/v1/mandates/5600672e-2bfa-488c-b23a-460c1dd1f833/requests-to-client/b2c3d4e5-f6a7-5e44-9f0a-d8e9f0a1b2c3/
                    mandate:
                      id: 5600672e-2bfa-488c-b23a-460c1dd1f833
                      href: >-
                        https://api.paywise.de/v1/mandates/5600672e-2bfa-488c-b23a-460c1dd1f833/
                      reference_number: K25-8Q114
                    title: Dokumente angefordert
                    description: >-
                      Wir benÃ¶tigen eine Kopie der Originalrechnung zur
                      PrÃ¼fung.
                    allowed_answer_types: fileupload
                    file_attachments: []
                    answered: true
                    answer:
                      id: c3d4e5f6-a7b8-6f55-0a1b-e9f0a1b2c3d4
                      text: Anbei die angeforderten Dokumente.
                      additional_comment: null
                      files:
                        - id: d4e5f6a7-b8c9-0123-4567-890abcdef012
                          filename: rechnung_RE2023001.pdf
                          mime_type: application/pdf
                          file_size: 234567
                      created: '2025-11-16T14:22:00Z'
                    created: '2025-11-15T08:00:00Z'
                    answered_at: '2025-11-16T14:22:00Z'
                  summary: Successful upload response
                  description: The request after successfully uploading a document
          description: ''
      security:
        - tokenAuth: []
        - tokenAuth: []
components:
  schemas:
    AnswerDocumentUploadRequest:
      type: object
      description: |-
        Serializer for uploading documents to an answer.
        Used for the separate document upload endpoint.
      properties:
        file:
          type: string
          format: binary
          description: 'Document file to upload. Allowed formats: PDF, JPEG, PNG.'
      required:
        - file
    RequestToClientPublic:
      type: object
      description: |-
        Main serializer for RequestToClient in the Public API.
        Provides full detail view for GET requests.
      properties:
        id:
          type: string
          readOnly: true
        href:
          type: string
          readOnly: true
        mandate:
          allOf:
            - $ref: '#/components/schemas/MandateMinInfoForRequest'
          readOnly: true
        title:
          type: string
          readOnly: true
        description:
          type: string
          readOnly: true
          nullable: true
        allowed_answer_types:
          readOnly: true
          oneOf:
            - $ref: '#/components/schemas/AllowedAnswerTypesEnum'
            - $ref: '#/components/schemas/NullEnum'
        file_attachments:
          type: array
          items:
            $ref: '#/components/schemas/FileAttachmentPublic'
          readOnly: true
        answered:
          type: boolean
          readOnly: true
        answer:
          allOf:
            - $ref: '#/components/schemas/AnswerPublic'
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
        answered_at:
          type: string
          format: date-time
          nullable: true
          readOnly: true
      required:
        - allowed_answer_types
        - answer
        - answered
        - answered_at
        - created
        - description
        - file_attachments
        - href
        - id
        - mandate
        - title
    MandateMinInfoForRequest:
      type: object
      description: Minimal mandate info for RequestToClient responses.
      properties:
        id:
          type: string
          format: uuid
        href:
          type: string
          readOnly: true
        reference_number:
          type: string
      required:
        - href
        - id
        - reference_number
    AllowedAnswerTypesEnum:
      enum:
        - yes-no
        - yes-no-dontknow
        - fileupload
        - yes-no-freetext-on-no
        - yes-with-date-no-freetext-on-no
        - dynamic-form
      description: |-
        * `None` - ---------
        * `yes-no` - Ja/Nein
        * `yes-no-dontknow` - Ja/Nein/WeiÃŸ nicht
        * `fileupload` - Freitext + Dateiupload
        * `yes-no-freetext-on-no` - Ja/Nein + Freitext bei Nein
        * `yes-with-date-no-freetext-on-no` - Ja + Datum / Nein + Freitext
        * `dynamic-form` - Dynamisches Formular
    NullEnum:
      enum:
        - null
    FileAttachmentPublic:
      type: object
      description: |-
        Serializer for file attachments (on RequestToClient) with download URLs.
        Used for schema generation and response formatting.
      properties:
        id:
          type: string
          format: uuid
          description: Unique UUID identifier of the file attachment
        filename:
          type: string
          description: Original filename of the attachment
        mime_type:
          type: string
          description: MIME type of the file (e.g., application/pdf, image/jpeg)
        file_size:
          type: string
          readOnly: true
          description: File size in bytes
        download_url:
          type: string
          readOnly: true
          description: Secure download URL for the file
      required:
        - download_url
        - file_size
        - filename
        - id
        - mime_type
    AnswerPublic:
      type: object
      description: |-
        Read-only serializer for displaying answers.
        Shows text, additional comment, and uploaded files.
      properties:
        id:
          type: string
          readOnly: true
        text:
          type: string
          readOnly: true
          nullable: true
        additional_comment:
          type: string
          readOnly: true
          nullable: true
        files:
          type: array
          items:
            $ref: '#/components/schemas/AnswerFilePublic'
          readOnly: true
        created:
          type: string
          format: date-time
          readOnly: true
      required:
        - additional_comment
        - created
        - files
        - id
        - text
    AnswerFilePublic:
      type: object
      description: |-
        Serializer for files attached to an Answer (UploadedDocument model).
        Read-only, shows metadata about uploaded answer documents.
      properties:
        id:
          type: string
          format: uuid
          description: Unique UUID identifier of the uploaded document
        filename:
          type: string
          description: Original filename of the document
        mime_type:
          type: string
          description: MIME type of the file
        file_size:
          type: string
          readOnly: true
          description: File size in bytes
      required:
        - file_size
        - filename
        - id
        - mime_type
  securitySchemes:
    tokenAuth:
      type: http
      scheme: bearer

````