Deduction data model

Employee-specific deduction/benefit enrolment.

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNo
created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
user_idstringNoemployee ID (reference to HrisEmployee)
company_idstringNo(reference to HrisCompany)
benefit_idstringNo
amountnumberNopercentage or absolute amount (employee's portion)
typeenumNoValues: FIXED, PERCENTAGE
coverage_levelenumNoLevel selected by employee (e.g. "FAMILY", "EMPLOYEE_ONLY", or other) Values: EMPLOYEE_ONLY, EMPLOYEE_SPOUSE, EMPLOYEE_CHILD, EMPLOYEE_CHILDREN, EMPLOYEE_FAMILY, FAMILY, OTHER
frequencyenumNoFrequency for this deduction (should always be set, matches IHrisBenefit.frequency) Values: ONE_TIME, DAY, QUARTER, YEAR, HOUR, MONTH, WEEK, BIWEEKLY, SEMIMONTHLY
start_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
end_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
is_activebooleanNo
notesstringNo
employer_amountnumberNopercentage or absolute amount (employer's portion/match)
employer_typeenumNoValues: PERCENTAGE, FIXED
max_amountnumberNoannual maximum employee amount (always money)
paycode_idstringNothe hris_paycode (deduction code) this deduction uses
garnishment_typeenumNoset when this deduction is a court-ordered garnishment Values: CHILD_SUPPORT, TAX_LEVY, STUDENT_LOAN, CREDITOR, BANKRUPTCY, OTHER

TypeScript

TypeScript
export type HrisDeduction = {
	id?: string;
	created_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	user_id?: string; // employee ID (reference to HrisEmployee)
	company_id?: string; // (reference to HrisCompany)
	benefit_id?: string;
	amount?: number; // percentage or absolute amount (employee's portion)
	type?: 'FIXED' | 'PERCENTAGE';
	coverage_level?: 'EMPLOYEE_ONLY' | 'EMPLOYEE_SPOUSE' | 'EMPLOYEE_CHILD' | 'EMPLOYEE_CHILDREN' | 'EMPLOYEE_FAMILY' | 'FAMILY' | 'OTHER'; // Level selected by employee (e.g. "FAMILY", "EMPLOYEE_ONLY", or other)
	frequency?: 'ONE_TIME' | 'DAY' | 'QUARTER' | 'YEAR' | 'HOUR' | 'MONTH' | 'WEEK' | 'BIWEEKLY' | 'SEMIMONTHLY'; // Frequency for this deduction (should always be set, matches IHrisBenefit.frequency)
	start_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	end_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	is_active?: boolean;
	notes?: string;
	employer_amount?: number; // percentage or absolute amount (employer's portion/match)
	employer_type?: 'PERCENTAGE' | 'FIXED';
	max_amount?: number; // annual maximum employee amount (always money)
	paycode_id?: string; // the hris_paycode (deduction code) this deduction uses
	garnishment_type?: 'CHILD_SUPPORT' | 'TAX_LEVY' | 'STUDENT_LOAN' | 'CREDITOR' | 'BANKRUPTCY' | 'OTHER'; // set when this deduction is a court-ordered garnishment
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodHrisDeduction = z.object({
	id: z.string().optional(),
	created_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	user_id: z.string().optional().describe("employee ID (reference to HrisEmployee)"),
	company_id: z.string().optional().describe("(reference to HrisCompany)"),
	benefit_id: z.string().optional(),
	amount: z.number().optional().describe("percentage or absolute amount (employee's portion)"),
	type: z.enum("FIXED", "PERCENTAGE").optional(),
	coverage_level: z.enum("EMPLOYEE_ONLY", "EMPLOYEE_SPOUSE", "EMPLOYEE_CHILD", "EMPLOYEE_CHILDREN", "EMPLOYEE_FAMILY", "FAMILY", "OTHER").optional().describe("Level selected by employee (e.g. "FAMILY", "EMPLOYEE_ONLY", or other)"),
	frequency: z.enum("ONE_TIME", "DAY", "QUARTER", "YEAR", "HOUR", "MONTH", "WEEK", "BIWEEKLY", "SEMIMONTHLY").optional().describe("Frequency for this deduction (should always be set, matches IHrisBenefit.frequency)"),
	start_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	end_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	is_active: z.boolean().optional(),
	notes: z.string().optional(),
	employer_amount: z.number().optional().describe("percentage or absolute amount (employer's portion/match)"),
	employer_type: z.enum("PERCENTAGE", "FIXED").optional(),
	max_amount: z.number().optional().describe("annual maximum employee amount (always money)"),
	paycode_id: z.string().optional().describe("the hris_paycode (deduction code) this deduction uses"),
	garnishment_type: z.enum("CHILD_SUPPORT", "TAX_LEVY", "STUDENT_LOAN", "CREDITOR", "BANKRUPTCY", "OTHER").optional().describe("set when this deduction is a court-ordered garnishment"),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class HrisDeductionType(str, Enum):
	FIXED = 'FIXED'
	PERCENTAGE = 'PERCENTAGE'

@dataclasses.dataclass
class HrisDeductionCoverage_level(str, Enum):
	EMPLOYEE_ONLY = 'EMPLOYEE_ONLY'
	EMPLOYEE_SPOUSE = 'EMPLOYEE_SPOUSE'
	EMPLOYEE_CHILD = 'EMPLOYEE_CHILD'
	EMPLOYEE_CHILDREN = 'EMPLOYEE_CHILDREN'
	EMPLOYEE_FAMILY = 'EMPLOYEE_FAMILY'
	FAMILY = 'FAMILY'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HrisDeductionFrequency(str, Enum):
	ONE_TIME = 'ONE_TIME'
	DAY = 'DAY'
	QUARTER = 'QUARTER'
	YEAR = 'YEAR'
	HOUR = 'HOUR'
	MONTH = 'MONTH'
	WEEK = 'WEEK'
	BIWEEKLY = 'BIWEEKLY'
	SEMIMONTHLY = 'SEMIMONTHLY'

@dataclasses.dataclass
class HrisDeductionEmployer_type(str, Enum):
	PERCENTAGE = 'PERCENTAGE'
	FIXED = 'FIXED'

@dataclasses.dataclass
class HrisDeductionGarnishment_type(str, Enum):
	CHILD_SUPPORT = 'CHILD_SUPPORT'
	TAX_LEVY = 'TAX_LEVY'
	STUDENT_LOAN = 'STUDENT_LOAN'
	CREDITOR = 'CREDITOR'
	BANKRUPTCY = 'BANKRUPTCY'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HrisDeduction:
	id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""employee ID (reference to HrisEmployee)"""
	user_id: Optional[str]
	"""(reference to HrisCompany)"""
	company_id: Optional[str]
	benefit_id: Optional[str]
	"""percentage or absolute amount (employee's portion)"""
	amount: Optional[int]
	type: Optional[HrisDeductionType]
	"""Level selected by employee (e.g. "FAMILY", "EMPLOYEE_ONLY", or other)"""
	coverage_level: Optional[HrisDeductionCoverage_level]
	"""Frequency for this deduction (should always be set, matches IHrisBenefit.frequency)"""
	frequency: Optional[HrisDeductionFrequency]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	start_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	end_at: Optional[str]
	is_active: Optional[bool]
	notes: Optional[str]
	"""percentage or absolute amount (employer's portion/match)"""
	employer_amount: Optional[int]
	employer_type: Optional[HrisDeductionEmployer_type]
	"""annual maximum employee amount (always money)"""
	max_amount: Optional[int]
	"""the hris_paycode (deduction code) this deduction uses"""
	paycode_id: Optional[str]
	"""set when this deduction is a court-ordered garnishment"""
	garnishment_type: Optional[HrisDeductionGarnishment_type]
Are we missing anything? Let us know
Was this page helpful?