> ## 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 an employee creation intent

> Return the intent behind an EMPLOYEE_CREATION task of an onboarding ticket: the HR information the employee will be created from (name, emails, phone, start date, employment type, job, legal entity, work location, teams, manager, address), and once executed `employeeId` and `executedAt`. Use it to check what an intent holds before `executeEmployeeCreationIntent`, or after a refusal left its task PENDING. Take the `intentId` from the EMPLOYEE_CREATION task of the onboarding ticket (`getOnboarding` gives its `ticketId`, `getTicket` lists its tasks with their `type` and `intentId`). A field the intent does not pin is read from the onboarding until the employee is created. Once created, read the employee with `getEmployee` and `employeeId`. To change the information before it executes, use `updateEmployeeCreationIntent`. Refused with `INTENT_NOT_FOUND`.

Key: ReadScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json get /employee-creation-intents/{intentId}
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:
  /employee-creation-intents/{intentId}:
    get:
      tags:
        - Onboardings
      summary: Get an employee creation intent
      description: >-
        Return the intent behind an EMPLOYEE_CREATION task of an onboarding
        ticket: the HR information the employee will be created from (name,
        emails, phone, start date, employment type, job, legal entity, work
        location, teams, manager, address), and once executed `employeeId` and
        `executedAt`. Use it to check what an intent holds before
        `executeEmployeeCreationIntent`, or after a refusal left its task
        PENDING. Take the `intentId` from the EMPLOYEE_CREATION task of the
        onboarding ticket (`getOnboarding` gives its `ticketId`, `getTicket`
        lists its tasks with their `type` and `intentId`). A field the intent
        does not pin is read from the onboarding until the employee is created.
        Once created, read the employee with `getEmployee` and `employeeId`. To
        change the information before it executes, use
        `updateEmployeeCreationIntent`. Refused with `INTENT_NOT_FOUND`.
      operationId: getEmployeeCreationIntent
      parameters:
        - name: intentId
          required: true
          in: path
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmployeeCreationIntent_Output'
components:
  schemas:
    EmployeeCreationIntent_Output:
      type: object
      properties:
        id:
          type: string
          description: >-
            Intent id — pass it to `updateEmployeeCreationIntent` and
            `executeEmployeeCreationIntent`
        taskId:
          description: The EMPLOYEE_CREATION task that tracks this employee creation
          anyOf:
            - type: string
            - type: 'null'
        ticketId:
          description: >-
            The ticket holding that task: the parentTicketId sent, or the one
            Primo opened. Null if it could not be read back.
          anyOf:
            - type: string
            - type: 'null'
        onboardingId:
          type: string
        firstName:
          anyOf:
            - type: string
            - type: 'null'
        lastName:
          anyOf:
            - type: string
            - type: 'null'
        emails:
          type: array
          description: Every address of the hire.
          default: []
          items:
            type: string
        phone:
          anyOf:
            - type: string
            - type: 'null'
        startDate:
          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'
        employmentType:
          anyOf:
            - type: string
              enum:
                - INTERNAL
                - CONTRACTOR
            - type: 'null'
        job:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: 'null'
                name:
                  type: string
              required:
                - id
                - name
              additionalProperties: false
            - type: 'null'
        legalEntity:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: 'null'
                name:
                  type: string
              required:
                - id
                - name
              additionalProperties: false
            - type: 'null'
        workLocation:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: 'null'
                name:
                  type: string
              required:
                - id
                - name
              additionalProperties: false
            - type: 'null'
        teams:
          type: array
          items:
            type: object
            properties:
              id:
                anyOf:
                  - type: string
                  - type: 'null'
              name:
                type: string
            required:
              - id
              - name
            additionalProperties: false
        managerId:
          anyOf:
            - type: string
            - type: 'null'
        address:
          anyOf:
            - type: object
              properties:
                name:
                  anyOf:
                    - type: string
                    - type: 'null'
                contactName:
                  anyOf:
                    - type: string
                    - type: 'null'
                phone:
                  anyOf:
                    - type: string
                    - type: 'null'
                street:
                  type: string
                  minLength: 1
                complement:
                  anyOf:
                    - type: string
                    - type: 'null'
                postalCode:
                  type: string
                  minLength: 1
                city:
                  type: string
                  minLength: 1
                country:
                  anyOf:
                    - type: string
                    - type: 'null'
                countryCode:
                  anyOf:
                    - type: string
                    - type: 'null'
              required:
                - name
                - contactName
                - phone
                - street
                - complement
                - postalCode
                - city
                - country
                - countryCode
              additionalProperties: false
            - type: 'null'
        employeeId:
          description: The employee created on execute, null until then
          anyOf:
            - type: string
            - type: 'null'
        executedAt:
          description: When the intent was executed; null while it can still change
          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'
        createdAt:
          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))$
        updatedAt:
          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))$
      required:
        - id
        - taskId
        - ticketId
        - onboardingId
        - firstName
        - lastName
        - emails
        - phone
        - startDate
        - employmentType
        - job
        - legalEntity
        - workLocation
        - teams
        - managerId
        - address
        - employeeId
        - executedAt
        - createdAt
        - updatedAt
      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.