Attendance data model

Updated:

Also called timesheets

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)
employee_user_idstringYes(reference to HrisEmployee)
start_atstring (date-time)Yesclock-in (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
end_atstring (date-time)Yesclock-out (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
timeshift_idstringNothe scheduled hris_timeshift this attendance record fulfils
location_idstringNo(reference to HrisLocation)
company_idstringNo(reference to HrisCompany)
group_idstringNodepartment, team, etc. (reference to HrisGroup)
timezonestringNo
addressobjectNo
address.address1stringNo
address.address2stringNo
address.citystringNo
address.regionstringNo
address.region_codestringNo
address.postal_codestringNo
address.countrystringNo
address.country_codestringNoISO 2-digit country code
hoursnumberNoworked hours
currencystringNopairs with hourly_rate and tip amounts
statusenumNoValues: OPEN, CLOSED, APPROVED
breaksHrisAttendanceBreak[]No
breaks[].idstringNo
breaks[].start_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
breaks[].end_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
breaks[].is_paidbooleanNo
breaks[].duration_minutesnumberNo
breaks[].namestringNobreak type label, e.g. "Lunch"
declared_tips_amountnumberNocash tips declared by the employee for this attendance record
non_cash_tips_amountnumberNocard/non-cash tips attributed to this attendance record
job_namestringNo
hourly_ratenumberNo
approver_user_idstringNo(reference to HrisEmployee)
approved_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
metadataHrisMetadata[]No
metadata[].idstringNoThe ID of the custom field definition (from the metadata/metadata endpoint).
metadata[].valueobjectNoThe field's value, typed by format: DATE as ISO-8601 (YYYY-MM-DD, or YYYY-MM-DDTHH:MM:SSZ for date-times); NUMBER, PRICE and CURRENCY as a number; BOOLEAN and YES_NO as true/false; MULTIPLE_SELECT as an array of option values; otherwise a string.
metadata[].namespacestringNo
metadata[].formatenumNoThe data type of the custom field, which determines how value is formatted. Values: TEXT, NUMBER, DATE, BOOLEAN, FILE, TEXTAREA, SINGLE_SELECT, MULTIPLE_SELECT, MEASUREMENT, PRICE, YES_NO, CURRENCY, URL
metadata[].extra_dataobjectNo
metadata[].slugstringNoThe integration's API name (key) of an existing custom field. List valid slugs for this object with the metadata/metadata endpoint; unknown slugs are rejected by the integration.

TypeScript

TypeScript
export type HrisAttendance = {
	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)
	employee_user_id: string; // (reference to HrisEmployee)
	start_at: string-time; // clock-in (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	end_at: string-time; // clock-out (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	timeshift_id?: string; // the scheduled hris_timeshift this attendance record fulfils
	location_id?: string; // (reference to HrisLocation)
	company_id?: string; // (reference to HrisCompany)
	group_id?: string; // department, team, etc. (reference to HrisGroup)
	timezone?: string;
	address?: {
		address1?: string; 
		address2?: string; 
		city?: string; 
		region?: string; 
		region_code?: string; 
		postal_code?: string; 
		country?: string; 
		country_code?: string; // ISO 2-digit country code 
	};
	hours?: number; // worked hours
	currency?: string; // pairs with hourly_rate and tip amounts
	status?: 'OPEN' | 'CLOSED' | 'APPROVED';
	breaks?: [];
	declared_tips_amount?: number; // cash tips declared by the employee for this attendance record
	non_cash_tips_amount?: number; // card/non-cash tips attributed to this attendance record
	job_name?: string;
	hourly_rate?: number;
	approver_user_id?: string; // (reference to HrisEmployee)
	approved_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	metadata?: [];
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodHrisAttendance = 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)"),
	employee_user_id: z.string().describe("(reference to HrisEmployee)"),
	start_at: z.string-time().describe("clock-in (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	end_at: z.string-time().describe("clock-out (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	timeshift_id: z.string().optional().describe("the scheduled hris_timeshift this attendance record fulfils"),
	location_id: z.string().optional().describe("(reference to HrisLocation)"),
	company_id: z.string().optional().describe("(reference to HrisCompany)"),
	group_id: z.string().optional().describe("department, team, etc. (reference to HrisGroup)"),
	timezone: z.string().optional(),
	address: z.object({
			address1: z.string().optional(),
			address2: z.string().optional(),
			city: z.string().optional(),
			region: z.string().optional(),
			region_code: z.string().optional(),
			postal_code: z.string().optional(),
			country: z.string().optional(),
			country_code: z.string().optional().describe("ISO 2-digit country code")
}).optional(),
	hours: z.number().optional().describe("worked hours"),
	currency: z.string().optional().describe("pairs with hourly_rate and tip amounts"),
	status: z.enum("OPEN", "CLOSED", "APPROVED").optional(),
	breaks: z.array().optional(),
	declared_tips_amount: z.number().optional().describe("cash tips declared by the employee for this attendance record"),
	non_cash_tips_amount: z.number().optional().describe("card/non-cash tips attributed to this attendance record"),
	job_name: z.string().optional(),
	hourly_rate: z.number().optional(),
	approver_user_id: z.string().optional().describe("(reference to HrisEmployee)"),
	approved_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class HrisAttendanceStatus(str, Enum):
	OPEN = 'OPEN'
	CLOSED = 'CLOSED'
	APPROVED = 'APPROVED'

@dataclasses.dataclass
class PropertyHrisAttendanceAddress:
	address1: Optional[str]
	address2: Optional[str]
	city: Optional[str]
	region: Optional[str]
	region_code: Optional[str]
	postal_code: Optional[str]
	country: Optional[str]
	"""ISO 2-digit country code"""
	country_code: Optional[str]

@dataclasses.dataclass
class HrisAttendance:
	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]
	"""(reference to HrisEmployee)"""
	employee_user_id: str
	"""clock-in (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	start_at: str
	"""clock-out (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	end_at: str
	"""the scheduled hris_timeshift this attendance record fulfils"""
	timeshift_id: Optional[str]
	"""(reference to HrisLocation)"""
	location_id: Optional[str]
	"""(reference to HrisCompany)"""
	company_id: Optional[str]
	"""department, team, etc. (reference to HrisGroup)"""
	group_id: Optional[str]
	timezone: Optional[str]
	address: Optional[PropertyHrisAttendanceAddress]
	"""worked hours"""
	hours: Optional[int]
	"""pairs with hourly_rate and tip amounts"""
	currency: Optional[str]
	status: Optional[HrisAttendanceStatus]
	breaks: Optional[PropertyHrisAttendanceBreaks]
	"""cash tips declared by the employee for this attendance record"""
	declared_tips_amount: Optional[int]
	"""card/non-cash tips attributed to this attendance record"""
	non_cash_tips_amount: Optional[int]
	job_name: Optional[str]
	hourly_rate: Optional[int]
	"""(reference to HrisEmployee)"""
	approver_user_id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	approved_at: Optional[str]
	metadata: Optional[PropertyHrisAttendanceMetadata]
Are we missing anything? Let us know
Was this page helpful?