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

# Complete uploaded document

> Marks a presigned upload as complete after object validation and scan gates.



## OpenAPI

````yaml /openapi/payfi-v1.json post /v1/upload-sessions/{token}/documents/{documentId}/complete
openapi: 3.0.0
info:
  title: PayFi Partner API
  description: >-
    Partner API for PayFi compliance document automation. Dashboard Partner
    access is the admin role for exactly one partner integration; public API
    requests remain authenticated with signed partner API keys.
  version: 0.1.0
  contact: {}
servers:
  - url: https://sandbox.payfi.global
    description: Sandbox
  - url: https://api.payfi.global
    description: Production
security: []
tags:
  - name: Customers
    description: Signed partner endpoints for customer records.
  - name: Operations
    description: Signed partner endpoints for operations, documents, and upload completion.
  - name: Webhooks
    description: Partner-managed webhook endpoints and signed callback tests.
paths:
  /v1/upload-sessions/{token}/documents/{documentId}/complete:
    post:
      tags:
        - Operations
      summary: Complete uploaded document
      description: >-
        Marks a presigned upload as complete after object validation and scan
        gates.
      operationId: UploadController_complete
      parameters:
        - name: token
          in: path
          required: true
          description: Upload session token.
          schema:
            type: string
          example: upload_token_example
        - name: documentId
          in: path
          required: true
          description: Document ID.
          schema:
            type: string
          example: doc_example
      responses:
        '200':
          description: Upload completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompleteUploadResponse'
              examples:
                completed:
                  value:
                    documentId: doc_example
                    status: CLEAN
                    operationStatus: DOCUMENTS_UPLOADED
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidRequest:
                  value:
                    error:
                      code: INVALID_REQUEST
                      message: The request payload is invalid.
components:
  schemas:
    CompleteUploadResponse:
      type: object
      properties:
        documentId:
          type: string
          example: doc_example
        status:
          type: string
          enum:
            - REGISTERED
            - UPLOAD_PENDING
            - UPLOADED
            - SCANNING
            - CLEAN
            - REJECTED
            - PROCESSING
            - PROCESSED
            - PROCESSING_FAILED
          example: CLEAN
        operationStatus:
          type: string
          enum:
            - CREATED
            - REQUIREMENTS_PENDING
            - REQUIREMENTS_REVIEW_REQUIRED
            - REQUIREMENTS_FAILED
            - AWAITING_DOCUMENTS
            - DOCUMENTS_PARTIAL
            - DOCUMENTS_UPLOADED
            - PROCESSING
            - PROCESSING_FAILED
            - ACTION_REQUIRED
            - READY_FOR_MANUAL_REVIEW
            - MANUAL_REVIEW_APPROVED
            - MANUAL_REVIEW_REJECTED
            - MANUAL_REVIEW_CHANGES_REQUESTED
            - PARTNER_CALLBACK_PENDING
            - PARTNER_CALLBACK_DELIVERED
            - PARTNER_CALLBACK_FAILED
            - CANCELLED
            - FAILED
          nullable: true
          example: DOCUMENTS_UPLOADED
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: INVALID_SIGNATURE
            message:
              type: string
              example: The request signature is invalid.

````