Employee

Authentication: All endpoints require an Authorization: Bearer <access token> header.

Most endpoints require an X-Company-ID: <company_id> header to scope requests to a specific company. This is the recommended header for most API operations.

Some endpoints require an X-Location-ID: <location_id> header when the query doesn't accept a locationId parameter.

See Authentication for details on how to obtain and use these headers.

Query All Employees

GraphQL Query

query ListEmployees($statuses: [EmployeeStatus!], $rosterable: Boolean, $visible: Boolean) {
  employees(statuses: $statuses, rosterable: $rosterable, visible: $visible) {
    id
    fullName
    workEmail
    status
    rosterable
    visible
    person {
      mobile
      email
      dateOfBirth
    }
    location {
      id
      name
    }
    position {
      id
      name
    }
    startDate
    terminatedAt
    modifiedAt
  }
}

Example Variables

{
  "statuses": ["Active", "Terminated", "Onboarding", "Invited"],
  "rosterable": true,
  "visible": true
}

Example Response

{
  "data": {
    "employees": [
      {
        "id": "72908",
        "fullName": "Craig Bussell",
        "workEmail": "craig_bussell_8hs54fg7@example.com",
        "status": "Active",
        "rosterable": true,
        "visible": true,
        "person": {
          "mobile": "0493811112",
          "email": "craig_bussell_8hs54fg7@gmail.com",
          "dateOfBirth": "2023-09-21"
        },
        "location": {
          "id": "12325",
          "name": "Integration Sandbox"
        },
        "position": {
          "id": "18101",
          "name": "General Manager"
        },
        "startDate": "2024-05-22",
        "terminatedAt": null,
        "modifiedAt": "2024-06-06T22:18:42.422Z"
      },
      {
        "id": "74444",
        "fullName": "James Invited-from-reserve-bench",
        "workEmail": "jamie_87a234wsdfgvqe@example.com",
        "status": "Invited",
        "rosterable": true,
        "visible": true,
        "person": {
          "mobile": "0423888192",
          "email": "7e65c421-d91e-48b0-b925-b4950aa8da3b@invite.roubler.com",
          "dateOfBirth": "2000-06-26"
        },
        "location": {
          "id": "12325",
          "name": "Integration Sandbox"
        },
        "position": {
          "id": "18100",
          "name": "Full Stack Developer"
        },
        "startDate": "2024-04-15",
        "terminatedAt": null,
        "modifiedAt": "2024-06-06T22:18:42.262Z"
      },
      {
        "id": "73542",
        "fullName": "Kate Mallone",
        "workEmail": "Kate_Mallone_4278930qh@example.com",
        "status": "Onboarding",
        "rosterable": true,
        "visible": true,
        "person": {
          "mobile": "0435728441",
          "email": "kate_mallone_4278930qh@gmail.com",
          "dateOfBirth": "2000-06-01"
        },
        "location": {
          "id": "12325",
          "name": "Integration Sandbox"
        },
        "position": {
          "id": "18102",
          "name": "Product Manager"
        },
        "startDate": null,
        "terminatedAt": null,
        "modifiedAt": "2024-06-07T04:42:46.299Z"
      }
    ]
  }
}

Query Archived Employees

GraphQL Query

query ListEmployees($onlyDeleted: Boolean!) {
  employees(onlyDeleted: $onlyDeleted) {
    id
    fullName
    workEmail
    status
    rosterable
    visible
    person {
      mobile
      email
      dateOfBirth
    }
    location {
      id
      name
    }
    position {
      id
      name
    }
    startDate
    terminatedAt
    modifiedAt
  }
}

Example Variables

{
  "onlyDeleted": true
}

Example Response

{
  "data": {
    "employees": [
      {
        "id": "73545",
        "fullName": "Ken Robertson",
        "workEmail": "ken_robertson_a7890qwehcc@roubler.com",
        "status": "Active",
        "rosterable": true,
        "visible": true,
        "person": {
          "mobile": null,
          "email": "2256f406-a769-4f9f-b6cf-bc3745da98c7@invite.roubler.com",
          "dateOfBirth": null
        },
        "location": {
          "id": "12325",
          "name": "Integration Sandbox"
        },
        "position": null,
        "startDate": null,
        "terminatedAt": null,
        "modifiedAt": "2024-06-06T22:10:45.174Z"
      }
    ]
  }
}

Query Comprehensive Employee Details

GraphQL Query

query ListEmployees($statuses: [EmployeeStatus!], $rosterable: Boolean, $visible: Boolean) {
  employees(statuses: $statuses, rosterable: $rosterable, visible: $visible) {
    id
    startDate
    anniversaryDate
    workEmail
    status
    rosterable
    visible
    hasBiometricConsent
    residencyStatus
    person {
      firstName
      lastName
      fullName
      gender
      mobile
      alternatePhone
      email
      dateOfBirth
      residentialAddress {
        line1
        line2
        city
        suburb
        state
        postalCode
        country
      }
      postalAddress {
        line1
        line2
        city
        suburb
        state
        postalCode
        country
      }
      regionalAU {
        australiaHomeAddress
        doesWantToClaimCarerTax
        doesWantToClaimSeniorPensionerTax
        hasFsDebt
        hasHelpSslTsl
        isAustralianForTaxPurposes
        paidBasis
        previousFamilyName
        taxDeclaration
        taxFileNumber
        title
        hasWorkingHolidayVisa
        previousResidentialCountry
        hasWithholdingVariation
        taxVariation
      }
    }
    location {
      id
      name
    }
    position {
      id
      name
    }
    payLevel {
      id
      name
      description
      versions {
        id
        name
        description
        commencedAt
      }
    }
    payRule {
      id
      name
      description
      versions {
        id
        name
        description
        commencedAt
      }
    }
    bankAccounts {
      id
      accountName
      accountNumber
      branch
    }
    superAccounts {
      id
      selfManaged
      fundName
    }
    userDefinedFields {
      userDefinedFieldSetting {
        name
        label
        dataType
        fieldLevel
        available
      }
      value
      ownerId
      ownerType
    }
    employeeRequirements {
      id
      name
      state
      requirement {
        id
        name
        abbreviation
        evidence
        expires
      }
    }
    terminatedAt
    modifiedAt
  }
}

Example Variables

{
  "statuses": ["Active", "Terminated", "Onboarding", "Invited"],
  "rosterable": true,
  "visible": true
}

Example Response

{
  "data": {
    "employees": [
      {
        "id": "72908",
        "startDate": "2024-05-22",
        "anniversaryDate": null,
        "workEmail": "craig_bussell_8hs54fg7@example.com",
        "status": "Active",
        "rosterable": true,
        "visible": true,
        "hasBiometricConsent": false,
        "residencyStatus": null,
        "person": {
          "firstName": "Craig",
          "lastName": "Bussell",
          "fullName": "Craig Bussell",
          "gender": "Male",
          "mobile": "0493811112",
          "alternatePhone": null,
          "email": "craig_bussell_8hs54fg7@gmail.com",
          "dateOfBirth": "2023-09-21",
          "residentialAddress": {
            "line1": "123 Real Place",
            "line2": "Suites on Real Place",
            "city": "Brisbane",
            "suburb": "Brisbane",
            "state": "QLD",
            "postalCode": "4000",
            "country": "AU"
          },
          "postalAddress": null,
          "regionalAU": {
            "australiaHomeAddress": null,
            "doesWantToClaimCarerTax": null,
            "doesWantToClaimSeniorPensionerTax": null,
            "hasFsDebt": null,
            "hasHelpSslTsl": null,
            "isAustralianForTaxPurposes": true,
            "paidBasis": null,
            "previousFamilyName": null,
            "taxDeclaration": "NotClaimingException",
            "taxFileNumber": "123456782",
            "title": null,
            "hasWorkingHolidayVisa": null,
            "previousResidentialCountry": null,
            "hasWithholdingVariation": null,
            "taxVariation": null
          }
        },
        "location": {
          "id": "12325",
          "name": "Integration Sandbox"
        },
        "position": {
          "id": "18101",
          "name": "General Manager"
        },
        "payLevel": null,
        "payRule": {
          "id": "538",
          "name": "Standard",
          "description": "Standard pay rules",
          "versions": [
            {
              "id": "521",
              "name": "Ordinary, overtime (8+) and weekend hours",
              "description": null,
              "commencedAt": "2021-01-01"
            }
          ]
        },
        "bankAccounts": [
          {
            "id": "98310",
            "accountName": "CraigB",
            "accountNumber": "123123123",
            "branch": "013013"
          }
        ],
        "superAccounts": [
          {
            "id": "23851",
            "selfManaged": false,
            "fundName": "AustralianSuper"
          }
        ],
        "userDefinedFields": [
          {
            "userDefinedFieldSetting": {
              "name": "Has relevant qualifications?",
              "label": "Do you have the latest qualification?",
              "dataType": "checkbox",
              "fieldLevel": "optional",
              "available": true
            },
            "value": "true",
            "ownerId": "72908",
            "ownerType": "employee"
          }
        ],
        "employeeRequirements": [],
        "terminatedAt": null,
        "modifiedAt": "2024-06-06T22:18:42.422Z"
      }
    ]
  }
}

Add Employee

GraphQL Mutation

mutation AddEmployee($input: AddEmployeeInput!) {
  addEmployee(input: $input) {
    id
    fullName
    modifiedAt
  }
}

Example Variables

{
  "input": {
    "anniversaryDate": "2024-05-30",
    "bankAccounts": {
      "accountName": "BSnell",
      "branch": "013013",
      "accountNumber": "123432121"
    },
    "locationId": "12326",
    "permissionGroupId": "1",
    "payLevelId": null,
    "payRuleId": null,
    "positionId": "18103",
    "onboardedAt": null,
    "visible": true,
    "probationDate": "2024-09-24",
    "recordProbationPeriod": true,
    "person": {
      "dateOfBirth": "2000-04-23",
      "firstName": "Bridget",
      "lastName": "Snell",
      "email": "bridget.snell@example.com",
      "postalAddress": {},
      "residentialAddress": {
        "line1": "123 Real Place",
        "line2": null,
        "suburb": "Brisbane",
        "state": "Queensland",
        "postalCode": "4000",
        "country": "Australia"
      },
      "preferredName": null,
      "regionalAU": {
        "australiaHomeAddress": null,
        "doesWantToClaimCarerTax": null,
        "doesWantToClaimSeniorPensionerTax": null,
        "hasFsDebt": null,
        "hasHelpSslTsl": null,
        "isAustralianForTaxPurposes": true,
        "paidBasis": null,
        "previousFamilyName": null,
        "taxDeclaration": "NotClaimingException",
        "taxFileNumber": "123456782",
        "title": null,
        "hasWorkingHolidayVisa": null,
        "previousResidentialCountry": null,
        "hasWithholdingVariation": null,
        "taxVariation": null,
        "hasClaimExemptionUnderEighteen": null,
        "hasClaimExemptionPension": null
      }
    }
  }
}

Example Response

{
  "data": {
    "addEmployee": {
      "id": "76144",
      "fullName": "Bridget Snell",
      "modifiedAt": "2024-06-11T02:43:14.538Z"
    }
  }
}

Add Draft Employee

GraphQL Mutation

mutation AddEmployee($input: AddEmployeeInput!) {
  addEmployee(input: $input) {
    id
    fullName
    status
  }
}

Example Variables

{
  "input": {
    "locationId": "12325",
    "permissionGroupId": "1",
    "recordProbationPeriod": false,
    "person": {
      "firstName": "Marcus",
      "lastName": "Connell",
      "email": "marcus.connell@example.com"
    },
    "status": "Draft"
  }
}

Example Response

{
  "data": {
    "addEmployee": {
      "id": "77435",
      "fullName": "Marcus Connell",
      "status": "Draft"
    }
  }
}

Update Employee

GraphQL Mutation

mutation UpdateEmployee($input: UpdateEmployeeInput!) {
  updateEmployee(input: $input) {
    id
    fullName
    modifiedAt
  }
}

Example Variables

{
  "input": {
    "id": "76144",
    "anniversaryDate": "2024-05-30",
    "startDate": "2024-05-30",
    "rosterable": true,
    "bankAccounts": {
      "accountName": "BSnell",
      "branch": "013013",
      "accountNumber": "123432121"
    },
    "person": {
      "dateOfBirth": "2000-04-23",
      "firstName": "Bridget",
      "lastName": "Snell",
      "email": "bridget.snell@example.com",
      "postalAddress": {},
      "residentialAddress": {
        "line1": "456 Real Place",
        "line2": null,
        "suburb": "Brisbane",
        "state": "Queensland",
        "postalCode": "4000",
        "country": "Australia"
      },
      "preferredName": null,
      "regionalAU": {
        "australiaHomeAddress": null,
        "doesWantToClaimCarerTax": null,
        "doesWantToClaimSeniorPensionerTax": null,
        "hasFsDebt": null,
        "hasHelpSslTsl": null,
        "isAustralianForTaxPurposes": true,
        "paidBasis": null,
        "previousFamilyName": null,
        "taxDeclaration": "NotClaimingException",
        "taxFileNumber": "123456782",
        "title": null,
        "hasWorkingHolidayVisa": null,
        "previousResidentialCountry": null,
        "hasWithholdingVariation": null,
        "taxVariation": null,
        "hasClaimExemptionUnderEighteen": null,
        "hasClaimExemptionPension": null
      }
    }
  }
}

Example Response

{
  "data": {
    "updateEmployee": {
      "id": "76144",
      "fullName": "Bridget Snell",
      "modifiedAt": "2024-06-11T03:36:04.538Z"
    }
  }
}