Skip to main content

Payroll employees

Payroll employees store the demographic, employment, and payment data required to calculate and deliver payslips. Use the queries and mutations below to sync Naqood with an external HRIS or onboarding workflow without exposing anything outside the public GraphQL surface.

Prerequisites

  • A Naqood API secret or OAuth-issued secret scoped to the target organization
  • The organization slug for every organization-scoped operation
  • A role that grants Payroll permissions (employees)

Employee fields

PayrollEmployee objects expose structured fields that mirror what the Naqood UI captures.

FieldTypeNotes
idID!Stable identifier for follow-up mutations.
name / emailString! / EmailShown on payslips and used when emailing documents.
employmentTypeEmploymentType!permanent, temporary, or intern. Defaults to permanent.
dateOfJoining / probationEndDateDateUsed for gratuity and compliance reporting.
currencyStringDefaults to the organization currency; override when paying in FX.
paymentMethodPaymentMethodbank, cash, or check. Determines the payment metadata required.
bankAccountHolderName / bankName / iban / swiftStringRequired when paymentMethod is bank.
earnings[PayrollEmployeeEarning!]!Optional defaults (basic salary, housing, etc.) tied to salary components.
createdAt / updatedAtTimestamp!Audit timestamps.

List employees

query PayrollEmployees(
$slug: Slug!
$offset: Int
$limit: Int
$orderBy: OrderByInput
$filter: JSONObject
) {
organization(slug: $slug) {
payrollEmployees(
offset: $offset
limit: $limit
orderBy: $orderBy
filter: $filter
) {
count
entries {
id
name
email
employmentType
currency
paymentMethod
earnings {
salaryComponent {
id
name
type
}
amount
}
}
}
}
}

Use filters to restrict results by department, employment type, payment method, or any other indexed field. Standard comparison operators (equalTo, greaterThan, between, and/or, etc.) are supported.

Create employees

mutation CreatePayrollEmployee($input: CreatePayrollEmployeeInput!) {
createPayrollEmployee(input: $input)
}

CreatePayrollEmployeeInput highlights:

FieldRequiredNotes
slugOrganization that owns the employee.
nameDisplay name shown anywhere the employee appears.
emailOptionalNeeded to email payslips directly to the employee.
employmentTypeOptionalDefaults to permanent if omitted.
currencyOptionalOverride when paying in a different currency.
paymentMethodOptionalDrives which payment fields become mandatory.
earningsOptionalArray of { salaryComponentId, amount } defaults injected when drafting payslips.

Update employees

mutation UpdatePayrollEmployee($input: UpdatePayrollEmployeeInput!) {
updatePayrollEmployee(input: $input) {
id
updatedAt
}
}
  • Provide the id plus only the fields you want to change; unspecified properties stay untouched.
  • Setting the earnings array replaces the existing defaults in a single call.

With these operations you can keep Naqood in sync with HR onboarding systems while relying on the same validation paths used by the UI.