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

# Get Employee Details

> Returns detailed information for a specific employee.

For field enums, refer the [employee details](/api-reference/employees/employee-details-api) page.


## OpenAPI

````yaml POST /api/external/employee/
openapi: 3.0.0
info:
  title: Employee List API
  description: Retrieve a paginated list of employees from the organization.
  version: 1.0.0
servers:
  - url: https://{env}.tartanhq.com
    description: Dynamic environment-based server
    variables:
      env:
        default: dev
security: []
paths:
  /api/external/employee/:
    post:
      summary: Get Employee Details - V2
      description: Returns detailed information for a specific employee.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - encrypted_payload
              properties:
                encrypted_payload:
                  $ref: '#/components/schemas/EmployeeEncryptedPayload'
                  type: string
                  description: >
                    JWE Compact Serialization string containing a signed
                    payload.


                    Encryption Flow:


                    1. Construct payload using `EmployeeEncryptedPayload` schema

                    2. Convert payload to JSON string and sign it as a JWT (JWS)
                    using **RS256** with the client’s private key (`alg: RS256`,
                    `typ: JWT`)

                    3. Encrypt the signed JWT using JWE:

                      * `alg`: RSA-OAEP-256
                      * `enc`: A256GCM
                      * key: Tartan public key
                    4. Send the result as a compact JWE string


                    JWE Format:

                    `<protected-header>.<encrypted-key>.<iv>.<ciphertext>.<auth-tag>`


                    Example header:


                    ```json

                    {
                      "alg": "RSA-OAEP-256",
                      "enc": "A256GCM",
                      "cty": "JWT"
                    }

                    ```


                    Decryption & Validation (Server-side):


                    * Decrypt using Tartan private key

                    * Extract signed JWT (JWS)

                    * Verify signature using client public key

                    * Extract and validate original payload
                  example: eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIn0....
      responses:
        '200':
          description: Employee details retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  requestId:
                    type: string
                    example: f6e80421-3901-4132-85c0-7bcdc1236ce9
                  message:
                    type: string
                    example: success
                  status_code:
                    type: string
                    example: success
                  status:
                    type: integer
                    example: 200
                  data:
                    $ref: '#/components/schemas/EmployeeEncrypted'
        '400':
          description: Not Found – Invalid Connection ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  requestId:
                    type: string
                    example: 6899af7d-a9cb-48cb-9875-c848932407a1
                  message:
                    type: string
                    example: Invalid Connection ID
                  data:
                    type: string
                    nullable: true
                    example: null
        '401':
          description: Unauthorized – Invalid token
          content:
            application/json:
              schema:
                type: object
                properties:
                  requestId:
                    type: string
                    example: 96783506-9a1c-4af2-a74f-8ac6a41ca82d
                  message:
                    type: string
                    example: Invalid token.
                  data:
                    type: string
                    nullable: true
                    example: null
        '424':
          description: Forbidden – Source Permission denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Source Permission denied
                  data:
                    type: object
                    example: {}
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  requestId:
                    type: string
                    example: be2915d5-fc30-4d13-bcca-3d62aefac2a0
                  message:
                    type: string
                    example: Internal Server Error
                  data:
                    type: string
                    nullable: true
                    example: null
      security:
        - basicAuth: []
components:
  schemas:
    EmployeeEncryptedPayload:
      type: object
      required:
        - connection_id
        - employee_id
      properties:
        connection_id:
          type: string
          description: Unique connection identifier provided by Tartan
          example: conn_12345
        employee_id:
          type: string
          description: Employee identifier in the external system
          example: emp_67890
    EmployeeEncrypted:
      type: string
      example: >-
        eyJfdfasdfasdfasdfaIjoiQUl6YVN5QmJHc0t3bVZ6SUU5a2VnPT0iLCJkYXRhIjoiU2FtcGxlIEVuY3J5cHRlZCBTdHJpbmcifQ==
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Create a Basic Auth token by base64-encoding username:password

````