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

# Upload or replace one private pending-registration document



## OpenAPI

````yaml /openapi.yaml put /v2/account-registrations/{registrationId}/documents/{documentType}
openapi: 3.1.0
info:
  title: DropHub External API
  version: v2
  description: >-
    DropHub API v2 for Merchant, shipping-company, shipment, and OAuth 2.0
    integrations.
  contact:
    name: DropHub API Governance
  license:
    name: Proprietary
servers:
  - url: https://api-test.drop-hub.com
    description: Sandbox deployment with isolated data and credentials.
  - url: https://api.drop-hub.com
    description: Production deployment; production credentials only.
security: []
tags:
  - name: Authentication
    description: >-
      Authentication, sessions, the company a principal is, and merchant API
      credentials
  - name: External Price Estimates
    description: OAuth-scoped transient route-distance and tariff calculation
  - name: External Shipments
    description: OAuth-scoped Merchant shipment creation, lookup, and cancellation
  - name: External Tracking
    description: Merchant-authenticated and privacy-minimized public tracking projections
  - name: Sandbox
    description: >-
      Tenant-bound self-service fixture lifecycle, available only on the
      isolated sandbox deployment
  - name: Webhook Endpoints
    description: Merchant webhook subscriptions, lifecycle, and signing-secret rotation
  - name: Webhook Deliveries
    description: Durable webhook delivery history and replay
paths:
  /v2/account-registrations/{registrationId}/documents/{documentType}:
    put:
      tags:
        - Authentication
      summary: Upload or replace one private pending-registration document
      operationId: putAccountRegistrationDocument
      parameters:
        - $ref: '#/components/parameters/MerchantRegistrationId'
        - $ref: '#/components/parameters/RegistrationDocumentType'
        - $ref: '#/components/parameters/RegistrationUploadCapability'
        - $ref: '#/components/parameters/RegistrationDocumentFilename'
      requestBody:
        required: true
        content:
          application/pdf:
            schema:
              type: string
              format: binary
              maxLength: 1048576
          image/jpeg:
            schema:
              type: string
              format: binary
              maxLength: 1048576
          image/png:
            schema:
              type: string
              format: binary
              maxLength: 1048576
      responses:
        '200':
          description: Stored document metadata; the content remains private
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistrationDocument'
        '401':
          $ref: '#/components/responses/AuthenticationFailed'
        '409':
          $ref: '#/components/responses/StateConflict'
        '410':
          $ref: '#/components/responses/RegistrationCapabilityExpired'
        '413':
          $ref: '#/components/responses/RequestBodyTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security: []
components:
  parameters:
    MerchantRegistrationId:
      name: registrationId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    RegistrationDocumentType:
      name: documentType
      in: path
      required: true
      schema:
        type: string
        enum:
          - NATIONAL_ADDRESS
          - COMMERCIAL_REGISTRATION
          - FREELANCE_CERTIFICATE
    RegistrationUploadCapability:
      name: Registration-Upload-Capability
      in: header
      required: true
      description: >-
        Short-lived opaque secret scoped to exactly one pending merchant
        registration.
      schema:
        type: string
        minLength: 32
    RegistrationDocumentFilename:
      name: X-Document-Filename
      in: header
      required: true
      description: >-
        UTF-8 filename encoded as an RFC 3986 component; it is metadata, never a
        path.
      schema:
        type: string
        minLength: 1
        maxLength: 540
  schemas:
    RegistrationDocument:
      type: object
      additionalProperties: false
      required:
        - documentType
        - originalFilename
        - contentType
        - byteSize
        - uploadedAt
        - updatedAt
        - version
      properties:
        documentType:
          type: string
          enum:
            - NATIONAL_ADDRESS
            - COMMERCIAL_REGISTRATION
            - FREELANCE_CERTIFICATE
        originalFilename:
          type: string
          maxLength: 180
        contentType:
          type: string
          enum:
            - application/pdf
            - image/jpeg
            - image/png
        byteSize:
          type: integer
          minimum: 1
          maximum: 1048576
        uploadedAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        version:
          type: integer
          format: int64
          minimum: 0
    Problem:
      type: object
      description: RFC 9457 Problem Details with stable DropHub extensions
      additionalProperties: true
      required:
        - type
        - title
        - status
        - code
        - timestamp
        - correlationId
        - requestId
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
          maxLength: 128
        status:
          type: integer
          format: int32
          minimum: 400
          maximum: 599
        detail:
          type: string
          maxLength: 512
        instance:
          type: string
          format: uri-reference
        code:
          type: string
          pattern: ^[A-Z][A-Z0-9_]{1,63}$
        timestamp:
          type: string
          format: date-time
        correlationId:
          type: string
          format: uuid
        requestId:
          type: string
          format: uuid
        traceId:
          type: string
          pattern: ^[0-9a-f]{32}$
        violations:
          type: array
          maxItems: 20
          items:
            $ref: '#/components/schemas/Violation'
      example:
        type: https://api.drop-hub.com/problems/access-denied
        title: Access denied
        status: 403
        detail: Access to this resource is denied.
        instance: /v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206
        code: ACCESS_DENIED
        timestamp: '2026-08-22T18:30:00Z'
        correlationId: 018f2d8a-1f00-7000-8000-000000000207
        requestId: 018f2d8a-1f00-7000-8000-000000000208
    Violation:
      type: object
      additionalProperties: false
      required:
        - field
        - code
        - message
      properties:
        field:
          type: string
          maxLength: 128
        code:
          type: string
          maxLength: 64
        message:
          type: string
          maxLength: 256
  responses:
    AuthenticationFailed:
      description: Authentication failed without account, token, or tenant enumeration.
      headers:
        WWW-Authenticate:
          $ref: '#/components/headers/WwwAuthenticate'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://api.drop-hub.com/problems/authentication-required
            title: Authentication required
            status: 401
            detail: Authentication is required for this resource.
            instance: /v2/external/shipments/018f2d8a-1f00-7000-8000-000000000206
            code: AUTHENTICATION_REQUIRED
            timestamp: '2026-08-22T18:30:00Z'
            correlationId: 018f2d8a-1f00-7000-8000-000000000207
            requestId: 018f2d8a-1f00-7000-8000-000000000208
    StateConflict:
      description: Current state prevents the requested transition.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    RegistrationCapabilityExpired:
      description: The otherwise valid registration-scoped upload capability has expired.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    RequestBodyTooLarge:
      description: The request body exceeds the endpoint's bounded size.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    UnsupportedMediaType:
      description: The request media type is not supported for this operation.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    ValidationFailed:
      description: The request fails strict syntax or semantic validation.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    ServiceUnavailable:
      description: A required qualified external provider is not configured or available.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  headers:
    WwwAuthenticate:
      description: Bearer challenge for an unauthenticated or invalid-token request.
      schema:
        type: string
        example: Bearer

````