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

# Get a document download link

> A short-lived link to download one of a crew member's documents.

The link is hosted by CrewPass and expires after about 15 minutes, so follow
it straight away rather than storing it. Returns `404` if the document isn't
one the documents endpoint lists, or the crew member is not on one of your
vessels.

Requires `crew:documents:download`.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/employers/me/crew/{crew_unique_id}/documents/{document_id}/download
openapi: 3.1.0
info:
  title: CrewPass Partner API
  description: >-
    Read the crew, vessel, document and compliance data CrewPass holds for the
    crew on your vessels, with each crew member's consent.
  version: 0.1.0
servers: []
security: []
paths:
  /api/v2/employers/me/crew/{crew_unique_id}/documents/{document_id}/download:
    get:
      tags:
        - Documents
      summary: Get a document download link
      description: >-
        A short-lived link to download one of a crew member's documents.


        The link is hosted by CrewPass and expires after about 15 minutes, so
        follow

        it straight away rather than storing it. Returns `404` if the document
        isn't

        one the documents endpoint lists, or the crew member is not on one of
        your

        vessels.


        Requires `crew:documents:download`.
      operationId: >-
        crew_document_download_api_v2_employers_me_crew__crew_unique_id__documents__document_id__download_get
      parameters:
        - name: crew_unique_id
          in: path
          required: true
          schema:
            type: string
            title: Crew Unique Id
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            title: Document Id
        - name: X-Partner-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key, as an alternative to the `Authorization: Bearer`
              header.
            title: X-Partner-Api-Key
          description: >-
            Your API key, as an alternative to the `Authorization: Bearer`
            header.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentDownloadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - PartnerApiKey: []
components:
  schemas:
    DocumentDownloadResponse:
      properties:
        document_id:
          type: string
          title: Document Id
        download_url:
          type: string
          title: Download Url
        expires_at:
          type: string
          format: date-time
          title: Expires At
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
        file_name:
          anyOf:
            - type: string
            - type: 'null'
          title: File Name
      type: object
      required:
        - document_id
        - download_url
        - expires_at
      title: DocumentDownloadResponse
      description: >-
        A short-lived link to download the document's file.


        `download_url` is hosted by CrewPass and works until `expires_at`; it
        needs

        no API key.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    PartnerApiKey:
      type: http
      scheme: bearer
      description: Partner API key (`cpk_live_*` / `cpk_test_*`) as a Bearer token.

````