> ## 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 operation document upload

> Verifies the uploaded object through the signed partner API and enqueues document analysis without requiring the public upload-session token.



## OpenAPI

````yaml /openapi/payfi-v1.json post /v1/operations/{operationId}/documents/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/operations/{operationId}/documents/complete:
    post:
      tags:
        - Operations
      summary: Complete operation document upload
      description: >-
        Verifies the uploaded object through the signed partner API and enqueues
        document analysis without requiring the public upload-session token.
      operationId: PartnerApiController_completeOperationDocumentUpload
      parameters:
        - name: operationId
          in: path
          required: true
          description: Operation ID.
          schema:
            type: string
          example: op_example
      requestBody:
        required: true
        description: Uploaded document completion payload.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentUploadedRequest'
            examples:
              completed:
                value:
                  documentId: doc_example
                  sha256: abc123
                  completedAt: '2026-06-03T15:00:00-03:00'
      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.
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  value:
                    error:
                      code: UNAUTHORIZED
                      message: Authentication failed.
      security:
        - PayFiApiKey: []
          PayFiNonce: []
          PayFiSignature: []
          PayFiIdempotencyKey: []
components:
  schemas:
    DocumentUploadedRequest:
      type: object
      properties:
        uploadSessionId:
          type: string
          example: ups_example
        documentId:
          type: string
          example: doc_example
        sha256:
          type: string
          example: abc123
        completedAt:
          type: string
          example: '2026-06-03T15:00:00-03:00'
      required:
        - documentId
    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.
  securitySchemes:
    PayFiApiKey:
      type: apiKey
      in: header
      name: X-PayFi-Api-Key
    PayFiNonce:
      type: apiKey
      in: header
      name: X-PayFi-Nonce
    PayFiSignature:
      type: apiKey
      in: header
      name: X-PayFi-Signature
    PayFiIdempotencyKey:
      type: apiKey
      in: header
      name: Idempotency-Key

````