Document data model

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)
document_urlstringNodownload link, expires after 1 hour
document_datastringNobase64 encoded file contents for create/update
filenamestringNo
typeenumNounified, normalized document type (OTHER when unmappable) Values: CONTRACT, OFFER_LETTER, POLICY, TAX, ID, VISA, PAYSLIP, BENEFITS, CERTIFICATION, PERFORMANCE_REVIEW, ONBOARDING, TERMINATION, MEDICAL, OTHER
user_idstringNopointer to the HR Employee object that owns this document (reference to HrisEmployee)
company_idstringNo(reference to HrisCompany)

TypeScript

TypeScript
export type HrisDocument = {
	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)
	document_url?: string; // download link, expires after 1 hour
	document_data?: string; // base64 encoded file contents for create/update
	filename?: string;
	type?: 'CONTRACT' | 'OFFER_LETTER' | 'POLICY' | 'TAX' | 'ID' | 'VISA' | 'PAYSLIP' | 'BENEFITS' | 'CERTIFICATION' | 'PERFORMANCE_REVIEW' | 'ONBOARDING' | 'TERMINATION' | 'MEDICAL' | 'OTHER'; // unified, normalized document type (OTHER when unmappable)
	user_id?: string; // pointer to the HR Employee object that owns this document (reference to HrisEmployee)
	company_id?: string; // (reference to HrisCompany)
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodHrisDocument = 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)"),
	document_url: z.string().optional().describe("download link, expires after 1 hour"),
	document_data: z.string().optional().describe("base64 encoded file contents for create/update"),
	filename: z.string().optional(),
	type: z.enum("CONTRACT", "OFFER_LETTER", "POLICY", "TAX", "ID", "VISA", "PAYSLIP", "BENEFITS", "CERTIFICATION", "PERFORMANCE_REVIEW", "ONBOARDING", "TERMINATION", "MEDICAL", "OTHER").optional().describe("unified, normalized document type (OTHER when unmappable)"),
	user_id: z.string().optional().describe("pointer to the HR Employee object that owns this document (reference to HrisEmployee)"),
	company_id: z.string().optional().describe("(reference to HrisCompany)"),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class HrisDocumentType(str, Enum):
	CONTRACT = 'CONTRACT'
	OFFER_LETTER = 'OFFER_LETTER'
	POLICY = 'POLICY'
	TAX = 'TAX'
	ID = 'ID'
	VISA = 'VISA'
	PAYSLIP = 'PAYSLIP'
	BENEFITS = 'BENEFITS'
	CERTIFICATION = 'CERTIFICATION'
	PERFORMANCE_REVIEW = 'PERFORMANCE_REVIEW'
	ONBOARDING = 'ONBOARDING'
	TERMINATION = 'TERMINATION'
	MEDICAL = 'MEDICAL'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HrisDocument:
	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]
	"""download link, expires after 1 hour"""
	document_url: Optional[str]
	"""base64 encoded file contents for create/update"""
	document_data: Optional[str]
	filename: Optional[str]
	"""unified, normalized document type (OTHER when unmappable)"""
	type: Optional[HrisDocumentType]
	"""pointer to the HR Employee object that owns this document (reference to HrisEmployee)"""
	user_id: Optional[str]
	"""(reference to HrisCompany)"""
	company_id: Optional[str]
Are we missing anything? Let us know
Was this page helpful?