> ## Documentation Index
> Fetch the complete documentation index at: https://developer.9squid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Complete document upload

> Call after successfully uploading the file via the uploadUrl. Registers the file and creates the document record. document_type defaults to W9_FORM.



## OpenAPI

````yaml api-reference/openapi.json POST /v1/api/deals/documents/complete
openapi: 3.0.3
info:
  title: 9Squid Platform API Gateway
  description: >-
    Unified entry point for all Originator and Investor workflows on the 9Squid
    securitization platform.
  version: '1.0'
  x-readme:
    id: 9squid-docs
  contact: {}
servers:
  - url: https://api.9squid.com
    description: Production
  - url: https://sandbox.api.9squid.com
    description: Sandbox
security: []
tags:
  - name: Originator - Loans
    description: Loan tape upload and management
  - name: Originator - Pools
    description: Securitization pool management
  - name: Originator - Analytics
    description: ALM / TCT Risk analytics
  - name: Originator - Selection Criteria
    description: Stratification check runs and exceptions
  - name: Deal Room - Documents
    description: Document upload and management
  - name: Investor - Deals
    description: Browse and evaluate securitization deals
  - name: Investor - Portfolio
    description: Portfolio positions, summary and reports
  - name: Investor - Subscriptions & Allocations
    description: Order and allocation management
  - name: Alerts
    description: Notifications and alert management
  - name: Webhooks
    description: Webhook subscription and delivery management
paths:
  /v1/api/deals/documents/complete:
    post:
      tags:
        - Deal Room - Documents
      summary: Complete document upload
      description: >-
        Call after successfully uploading the file via the uploadUrl. Registers
        the file and creates the document record. document_type defaults to
        W9_FORM.
      operationId: DocumentsController_completeUpload
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - fileName
                - fileKey
              properties:
                fileName:
                  type: string
                  example: w9-form.pdf
                  description: Original file name
                fileKey:
                  type: string
                  example: upload/documents/onboarding/<uuid>.pdf
                  description: fileKey returned from the upload-url step
                document_type:
                  type: string
                  enum:
                    - W9_FORM
                  default: W9_FORM
                  description: Document category. Defaults to W9_FORM.
      responses:
        '201':
          description: Document record created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      document_id:
                        type: string
                        example: doc_abc123
                      status:
                        type: string
                        example: uploaded
                      document_type:
                        type: string
                        example: W9_FORM
        '400':
          description: fileName or fileKey is missing
        '401':
          description: Unauthorized — invalid or missing API key
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````