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

# Update Identity Document

> Partial update of metadata. If ``upload_id`` is being changed,
the new value must belong to the caller's org. If the document was verified
and a reviewed field changed, its review state auto-reverts to pending.



## OpenAPI

````yaml /openapi.json patch /api/v1/crew/identity-documents/{document_id}
openapi: 3.1.0
info:
  title: Seamind Backend
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/crew/identity-documents/{document_id}:
    patch:
      tags:
        - crew-identity-documents
      summary: Update Identity Document
      description: >-
        Partial update of metadata. If ``upload_id`` is being changed,

        the new value must belong to the caller's org. If the document was
        verified

        and a reviewed field changed, its review state auto-reverts to pending.
      operationId: >-
        update_identity_document_api_v1_crew_identity_documents__document_id__patch
      parameters:
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Document Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrewIdentityDocumentUpdateDTO'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrewIdentityDocumentResponseDTO'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CrewIdentityDocumentUpdateDTO:
      properties:
        documentNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentnumber
        issuingCountry:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuingcountry
        issueDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Issuedate
        expiryDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Expirydate
        uploadId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Uploadid
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
      type: object
      title: CrewIdentityDocumentUpdateDTO
      description: |-
        Partial update — all fields optional. Document type is immutable
        (you'd create a new row to switch types).
    CrewIdentityDocumentResponseDTO:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        documentType:
          type: string
          title: Documenttype
        documentNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentnumber
        issuingCountry:
          anyOf:
            - type: string
            - type: 'null'
          title: Issuingcountry
        issueDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Issuedate
        expiryDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Expirydate
        uploadId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Uploadid
        uploadedByUserId:
          type: string
          format: uuid
          title: Uploadedbyuserid
        status:
          $ref: '#/components/schemas/DocumentExpiryStatus'
        verification:
          anyOf:
            - $ref: '#/components/schemas/CrewVerificationResponseDTO'
            - type: 'null'
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      required:
        - id
        - documentType
        - uploadedByUserId
        - status
        - createdAt
        - updatedAt
      title: CrewIdentityDocumentResponseDTO
      description: API response shape with computed status.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentExpiryStatus:
      type: string
      enum:
        - valid
        - expiring_soon
        - expired
      title: DocumentExpiryStatus
      description: |-
        Computed at response time from `expiry_date - today()`.

        No `unknown` value — when there's no expiry_date we use VALID (the
        document doesn't expire; treat as good).
    CrewVerificationResponseDTO:
      properties:
        targetType:
          type: string
          title: Targettype
        targetId:
          type: string
          title: Targetid
        status:
          $ref: '#/components/schemas/VerificationStatus'
        rejectionReason:
          anyOf:
            - type: string
            - type: 'null'
          title: Rejectionreason
        reviewedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Reviewedat
      type: object
      required:
        - targetType
        - targetId
        - status
      title: CrewVerificationResponseDTO
      description: |-
        API response shape (camelCase). Used both as the per-item entry in a
        profile summary and embedded as the `verification` field on a credential
        response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    VerificationStatus:
      type: string
      enum:
        - not_submitted
        - pending
        - verified
        - rejected
      title: VerificationStatus
      description: Per-item review state.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````