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

# Get Document

> Retrieve metadata for a single employee document by its ID.

Returns metadata for one document — its name, file type, and whether it can be downloaded. This endpoint does **not** return the file binary. To download the actual PDF, use [Download Document](/v1/endpoint/documents-download) after confirming `downloadable: true`.

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url "https://v1-api.ticket-plus.app/employee-documents/101" \
    --header "Authorization: Basic <base64(clientId:clientSecret)>"
  ```

  ```python Python theme={null}
  import requests, base64

  credentials = base64.b64encode(b"<clientId>:<clientSecret>").decode()

  res = requests.get(
      "https://v1-api.ticket-plus.app/employee-documents/101",
      headers={"Authorization": f"Basic {credentials}"},
  )
  print(res.json())
  ```

  ```javascript Node.js theme={null}
  const credentials = Buffer.from("<clientId>:<clientSecret>").toString("base64");

  const res = await fetch(
    "https://v1-api.ticket-plus.app/employee-documents/101",
    {
      headers: { Authorization: `Basic ${credentials}` },
    },
  );
  console.log(await res.json());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": {
      "id": 101,
      "employeeId": 42,
      "documentName": "May 2024 Transit Invoice",
      "documentFileType": "pdf",
      "downloadable": true,
      "createdAt": "2024-05-01T09:00:00Z",
      "updatedAt": "2024-05-01T09:00:00Z",
      "resource": "employee-document",
      "_links": {
        "self": { "href": "https://v1-api.ticket-plus.app/employee-documents/101", "type": "application/json" },
        "employee": { "href": "https://v1-api.ticket-plus.app/employees/42", "type": "application/json" }
      }
    }
  }
  ```
</ResponseExample>

<Warning>
  Always check `downloadable` before calling the download endpoint. Attempting
  to download a document with `downloadable: false` will return an error.
</Warning>

## Path Parameters

<ParamField path="id" type="integer" required>
  The unique numeric ID of the document to retrieve.
</ParamField>

## Response

<ResponseField name="data" type="object" required>
  <Expandable title="properties">
    <ResponseField name="id" type="integer" required>
      Unique document identifier.
    </ResponseField>

    <ResponseField name="employeeId" type="integer | null">
      ID of the employee this document belongs to.
    </ResponseField>

    <ResponseField name="documentName" type="string" required>
      Human-readable name of the document.
    </ResponseField>

    <ResponseField name="documentFileType" type="string" required>
      File extension of the document, e.g. `pdf`.
    </ResponseField>

    <ResponseField name="downloadable" type="boolean" required>
      `true` if the file binary can be fetched via [Download
      Document](/v1/endpoint/documents-download). `false` means the document is
      metadata-only or the file is not available.
    </ResponseField>

    <ResponseField name="createdAt" type="string" required>
      ISO 8601 timestamp when the document was created.
    </ResponseField>

    <ResponseField name="updatedAt" type="string" required>
      ISO 8601 timestamp when the document was last updated.
    </ResponseField>

    <ResponseField name="resource" type="string" required>
      Resource type label. Always `"employee-document"`.
    </ResponseField>

    <ResponseField name="_links" type="object" required>
      HAL hypermedia links.

      <Expandable title="properties">
        <ResponseField name="self" type="object" required>
          Link to this document resource.

          <Expandable title="properties">
            <ResponseField name="href" type="string" required>
              URL of this document.
            </ResponseField>

            <ResponseField name="type" type="string" required>
              Media type.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="employee" type="object" required>
          Link to the employee who owns this document.

          <Expandable title="properties">
            <ResponseField name="href" type="string" required>
              URL of the owning employee.
            </ResponseField>

            <ResponseField name="type" type="string" required>
              Media type.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>


## OpenAPI

````yaml GET /employee-documents/{id}
openapi: 3.0.3
info:
  title: JobTicket API
  description: >-
    The JobTicket B2B API lets you read employee data, manage HR integrations,
    and access employee documents programmatically. All endpoints use HTTP Basic
    Auth — pass your API key credentials from the Developer Portal as the
    username and password.
  version: 1.0.0
servers:
  - url: https://v1-api-staging.ticket-plus.app
    description: Staging server
  - url: https://v1-api.ticket-plus.app
    description: Production Server
security:
  - basicAuth: []
externalDocs:
  url: https://jobticket-docs.ticket-plus.app
  description: View our documentation to get more info
paths:
  /employee-documents/{id}:
    get:
      tags:
        - Employee Documents
      summary: Get Employee Document
      description: >-
        Returns metadata for a single document — name, type, and whether it is
        downloadable. To fetch the actual file, use `GET
        /employee-documents/{id}/download`. Requires the `view-employees`
        permission.
      parameters:
        - schema:
            type: integer
          in: path
          name: id
          required: true
          description: The unique numeric ID of the document to retrieve.
      responses:
        '200':
          description: The requested document's metadata.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Unique document identifier.
                      employeeId:
                        type: integer
                        nullable: true
                        description: ID of the employee this document belongs to.
                      documentName:
                        type: string
                        description: Human-readable name of the document.
                      documentFileType:
                        type: string
                        description: Category of the document, e.g. `contract`, `payslip`.
                      downloadable:
                        type: boolean
                        description: >-
                          Whether the binary file can be fetched via the
                          download endpoint.
                      createdAt:
                        type: string
                        format: date-time
                        description: ISO 8601 timestamp when the document was created.
                      updatedAt:
                        type: string
                        format: date-time
                        description: ISO 8601 timestamp when the document was last updated.
                      resource:
                        type: string
                        description: Resource type label, always `employee-document`.
                      _links:
                        type: object
                        description: HAL hypermedia links.
                        properties:
                          self:
                            type: object
                            description: Link to this document.
                            properties:
                              href:
                                type: string
                              type:
                                type: string
                            required:
                              - href
                              - type
                          employee:
                            type: object
                            description: Link to the owning employee.
                            properties:
                              href:
                                type: string
                              type:
                                type: string
                            required:
                              - href
                              - type
                        required:
                          - self
                          - employee
                    required:
                      - id
                      - employeeId
                      - documentName
                      - documentFileType
                      - downloadable
                      - createdAt
                      - updatedAt
                      - resource
                      - _links
      security:
        - basicAuth: []
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        HTTP Basic Auth using your API key credentials. Use the username and
        password issued from the Developer Portal. Encode them as
        `Base64(username:password)` and pass in the `Authorization: Basic
        <token>` header.

````