> ## 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 HR Integration

> Retrieve full details for a single HR integration by its ID.

Returns the complete record for one HR integration — connection status, last sync details, and whether a manual sync can be triggered.

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url "https://v1-api.ticket-plus.app/hr-integrations/7" \
    --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/hr-integrations/7",
      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/hr-integrations/7", {
    headers: { Authorization: `Basic ${credentials}` },
  });
  console.log(await res.json());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": {
      "id": 7,
      "name": "BambooHR",
      "type": "hr-integration",
      "status": "active",
      "initialConnectionStatus": "completed",
      "lastSyncId": "sync_abc123",
      "lastSynced": "2024-05-10T08:00:00Z",
      "lastSyncStatus": "succeeded",
      "canTriggerSync": true,
      "resource": "hr-integration",
      "_links": {
        "self": { "href": "https://v1-api.ticket-plus.app/hr-integrations/7", "type": "application/json" }
      }
    }
  }
  ```
</ResponseExample>

## Path Parameters

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

## Response

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

    <ResponseField name="name" type="string" required>
      Display name of the integration, e.g. `"BambooHR"`.
    </ResponseField>

    <ResponseField name="type" type="string" required>
      Integration type. Allowed values: - `hr-integration` — syncs from a
      third-party HR system. - `api-integration` — you push employee data
      directly via the sync API.
    </ResponseField>

    <ResponseField name="status" type="string" required>
      Connection health. Allowed values: - `active` — connected and working
      normally. - `invalid` — credentials have expired or been revoked;
      re-authentication required. - `inactive` — integration has been disabled.
    </ResponseField>

    <ResponseField name="initialConnectionStatus" type="string" required>
      Onboarding progress. Allowed values: - `incomplete` — setup has not been
      completed. - `final-sync-pending` — setup done; awaiting first full sync.

      * `completed` — fully set up and initial sync done.
    </ResponseField>

    <ResponseField name="lastSyncId" type="string | null">
      ID of the most recent sync operation. `null` if no sync has run yet.
    </ResponseField>

    <ResponseField name="lastSynced" type="string | null">
      ISO 8601 timestamp of the last completed sync. `null` if no sync has run.
    </ResponseField>

    <ResponseField name="lastSyncStatus" type="string | null">
      Outcome of the last sync. `null` if no sync has run. Allowed values: -
      `succeeded` — all records synced successfully. - `partially-failed` — some
      records failed; job still completed. - `failed` — entire sync job failed.

      * `authentication-failed` — sync failed due to invalid credentials.
    </ResponseField>

    <ResponseField name="canTriggerSync" type="boolean" required>
      `true` if a manual sync can be triggered via [Trigger HR
      Sync](/v1/endpoint/hr-integrations-sync). Only `true` when `status` is
      `active` and setup is complete.
    </ResponseField>

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

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

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

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

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


## OpenAPI

````yaml GET /hr-integrations/{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:
  /hr-integrations/{id}:
    get:
      tags:
        - HR Integrations
      summary: Get HR Integration
      description: >-
        Returns the full record for a single HR integration by ID, including
        status, last sync details, and whether a manual sync can be triggered.
        Requires the `view-hr-integrations` permission.
      parameters:
        - schema:
            type: integer
          in: path
          name: id
          required: true
          description: The unique numeric ID of the HR integration to retrieve.
      responses:
        '200':
          description: The requested HR integration's full record.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Unique integration identifier.
                      name:
                        type: string
                        description: Display name of the integration, e.g. `BambooHR`.
                      type:
                        type: string
                        enum:
                          - hr-integration
                          - api-integration
                        description: >-
                          `hr-integration` for third-party HR systems;
                          `api-integration` for direct API push integrations.
                      status:
                        type: string
                        enum:
                          - active
                          - invalid
                          - inactive
                        description: >-
                          Connection health: `active` (working), `invalid`
                          (credentials expired or revoked), `inactive`
                          (disabled).
                      initialConnectionStatus:
                        type: string
                        enum:
                          - incomplete
                          - final-sync-pending
                          - completed
                        description: >-
                          Onboarding progress: `incomplete`,
                          `final-sync-pending`, or `completed`.
                      lastSyncId:
                        type: string
                        nullable: true
                        description: ID of the most recent sync operation.
                      lastSynced:
                        type: string
                        nullable: true
                        description: ISO 8601 timestamp of the last completed sync.
                      lastSyncStatus:
                        type: string
                        enum:
                          - succeeded
                          - failed
                          - partially-failed
                          - authentication-failed
                        nullable: true
                        description: Outcome of the last sync.
                      canTriggerSync:
                        type: boolean
                        description: >-
                          Whether a manual sync can be triggered for this
                          integration.
                      resource:
                        type: string
                        description: Resource type label.
                      _links:
                        type: object
                        description: HAL hypermedia links.
                        properties:
                          self:
                            type: object
                            description: Link to this integration.
                            properties:
                              href:
                                type: string
                              type:
                                type: string
                            required:
                              - href
                              - type
                        required:
                          - self
                    required:
                      - id
                      - name
                      - type
                      - status
                      - initialConnectionStatus
                      - canTriggerSync
                      - 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.

````