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

# Get the state of the company's HRIS sync

> Return the state of the company's HRIS sync (the employee directory synchronisation) as JSON: use it to check that the sync works and to find what is wrong. `integrations` lists each HRIS connected with its connection issue (null when it syncs), its first sync status and date, its last sync, and the outcome and counts (fetched, processed, refused, failed) of its last run; a disabled one is listed and flagged. `employees` counts the current employees in Primo and those imported by the HRIS, with how many lack a work email, a manager or a start date and up to 5 example names of each. `problems` is computed by Primo, each entry holding a `code`, the `hris` it is about and a `count`: NO_HRIS_CONNECTED, the connection issues RECONNECTION_NEEDED, SETUP_INCOMPLETE, IMPORTING, PAUSED and REMOVED_FROM_KOMBO, FIRST_SYNC_NOT_DONE, FIRST_SYNC_FAILED, LAST_SYNC_FAILED, EMPLOYEES_FAILED (an employee refused, such as a leaver with no usable data, is no problem), MISSING_WORK_EMAIL, MISSING_MANAGER (raised when more than one imported employee has none, since the top of the org chart has no manager) and MISSING_START_DATE. An empty `problems` means the sync looks right. For the status of the Setup task about the HRIS, use `getCompanySetup` instead. Only accessible with a Company API key.

Key: ReadScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json get /company/hris-sync-review
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /company/hris-sync-review:
    get:
      tags:
        - Company
      summary: Get the state of the company's HRIS sync
      description: >-
        Return the state of the company's HRIS sync (the employee directory
        synchronisation) as JSON: use it to check that the sync works and to
        find what is wrong. `integrations` lists each HRIS connected with its
        connection issue (null when it syncs), its first sync status and date,
        its last sync, and the outcome and counts (fetched, processed, refused,
        failed) of its last run; a disabled one is listed and flagged.
        `employees` counts the current employees in Primo and those imported by
        the HRIS, with how many lack a work email, a manager or a start date and
        up to 5 example names of each. `problems` is computed by Primo, each
        entry holding a `code`, the `hris` it is about and a `count`:
        NO_HRIS_CONNECTED, the connection issues RECONNECTION_NEEDED,
        SETUP_INCOMPLETE, IMPORTING, PAUSED and REMOVED_FROM_KOMBO,
        FIRST_SYNC_NOT_DONE, FIRST_SYNC_FAILED, LAST_SYNC_FAILED,
        EMPLOYEES_FAILED (an employee refused, such as a leaver with no usable
        data, is no problem), MISSING_WORK_EMAIL, MISSING_MANAGER (raised when
        more than one imported employee has none, since the top of the org chart
        has no manager) and MISSING_START_DATE. An empty `problems` means the
        sync looks right. For the status of the Setup task about the HRIS, use
        `getCompanySetup` instead. Only accessible with a Company API key.
      operationId: getHrisSyncReview
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetHrisSyncReview_Output'
components:
  schemas:
    GetHrisSyncReview_Output:
      type: object
      properties:
        integrations:
          type: array
          description: Every HRIS integration of the company, the disabled ones flagged
          items:
            type: object
            properties:
              name:
                description: Name of the HRIS
                type: string
              toolId:
                type: string
              disabled:
                description: A disabled integration no longer syncs and raises no problem
                type: boolean
              connectionIssue:
                description: >-
                  Why the integration does not sync right now, as the HR system
                  card says it; null when it syncs
                anyOf:
                  - type: string
                    enum:
                      - RECONNECTION_NEEDED
                      - SETUP_INCOMPLETE
                      - IMPORTING
                      - PAUSED
                      - REMOVED_FROM_KOMBO
                  - type: 'null'
              syncsCompanyDomainsOnly:
                description: >-
                  Whether only the employees with a company domain email are
                  synced
                type: boolean
              firstSyncStatus:
                anyOf:
                  - type: string
                    enum:
                      - WAITING_FOR_SYNC
                      - CONNECTED
                      - FAILED
                  - type: 'null'
              firstSyncAt:
                description: When the first successful sync ended
                anyOf:
                  - type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: 'null'
              lastSyncAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: 'null'
              lastRun:
                description: The latest sync run, null when the integration never ran
                anyOf:
                  - type: object
                    properties:
                      outcome:
                        description: Null while the run is still in progress
                        anyOf:
                          - type: string
                            enum:
                              - SUCCEEDED
                              - FAILED
                          - type: 'null'
                      startedAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      completedAt:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          - type: 'null'
                      errorMessage:
                        anyOf:
                          - type: string
                          - type: 'null'
                      counts:
                        anyOf:
                          - type: object
                            properties:
                              fetched:
                                description: Employees fetched from the HRIS
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              processed:
                                description: Employees created or updated in Primo
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              refused:
                                description: Employees Primo refused to import
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              failed:
                                description: Employees whose import failed
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                            required:
                              - fetched
                              - processed
                              - refused
                              - failed
                            additionalProperties: false
                          - type: 'null'
                    required:
                      - outcome
                      - startedAt
                      - completedAt
                      - errorMessage
                      - counts
                    additionalProperties: false
                  - type: 'null'
            required:
              - name
              - toolId
              - disabled
              - connectionIssue
              - syncsCompanyDomainsOnly
              - firstSyncStatus
              - firstSyncAt
              - lastSyncAt
              - lastRun
            additionalProperties: false
        employees:
          type: object
          properties:
            inPrimo:
              description: Current employees that are not hidden
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            imported:
              description: Those of them imported by an active HRIS integration
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            missingWorkEmail:
              description: Imported employees without a work email
              type: object
              properties:
                count:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                examples:
                  description: At most 5 employee names, as First Last
                  type: array
                  items:
                    type: string
              required:
                - count
                - examples
              additionalProperties: false
            missingManager:
              description: Imported employees without a manager
              type: object
              properties:
                count:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                examples:
                  description: At most 5 employee names, as First Last
                  type: array
                  items:
                    type: string
              required:
                - count
                - examples
              additionalProperties: false
            missingStartDate:
              description: Imported employees without a start date
              type: object
              properties:
                count:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                examples:
                  description: At most 5 employee names, as First Last
                  type: array
                  items:
                    type: string
              required:
                - count
                - examples
              additionalProperties: false
          required:
            - inPrimo
            - imported
            - missingWorkEmail
            - missingManager
            - missingStartDate
          additionalProperties: false
        problems:
          type: array
          description: >-
            The problems found, computed by Primo. Empty when the sync looks
            right
          items:
            type: object
            properties:
              code:
                type: string
                enum:
                  - NO_HRIS_CONNECTED
                  - RECONNECTION_NEEDED
                  - SETUP_INCOMPLETE
                  - IMPORTING
                  - PAUSED
                  - REMOVED_FROM_KOMBO
                  - FIRST_SYNC_NOT_DONE
                  - FIRST_SYNC_FAILED
                  - LAST_SYNC_FAILED
                  - EMPLOYEES_FAILED
                  - MISSING_WORK_EMAIL
                  - MISSING_MANAGER
                  - MISSING_START_DATE
              hris:
                description: The HRIS the problem is about, null for a company-wide one
                anyOf:
                  - type: string
                  - type: 'null'
              count:
                description: Employees concerned, null when the problem is not a count
                anyOf:
                  - type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  - type: 'null'
            required:
              - code
              - hris
              - count
            additionalProperties: false
      required:
        - integrations
        - employees
        - problems
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.