Contracts
Usage
List contract versions and compensations:
import asyncio
import factorialhr
async def main():
auth = factorialhr.AccessTokenAuth("your_access_token")
async with factorialhr.ApiClient(auth=auth) as api:
versions = factorialhr.ContractVersionsEndpoint(api)
response = await versions.get(params={"page": 1})
for v in response.data():
print(v.employee_id, v.start_date, v.end_date)
comps = factorialhr.CompensationsEndpoint(api)
comp_list = await comps.all()
for c in comp_list.data():
print(c.concept_id, c.amount)
asyncio.run(main())
Enums
- class factorialhr.TimeCondition(*values)[source]
Bases:
StrEnumEnum for time conditions.
- CUSTOM = 'custom'
- FULL_DAY = 'full_day'
- HALF_DAY = 'half_day'
Models and endpoints
- class factorialhr.Compensation(*, id: int, contract_version_id: int, contracts_taxonomy_id: int, description: str | None = None, compensation_type: str | None = None, amount: int | None = None, unit: str, sync_with_supplements: bool | None = None, payroll_policy_id: int | None = None, recurrence_count: int | None = None, starts_on: date | None = None, recurrence: str | None = None, first_payment_on: date | None = None, calculation: str | None = None, currency: str | None = None, time_condition: TimeCondition | None = None, minimum_amount_of_hours: int | None = None, minimum_amount_of_hours_in_cents: int | None = None)[source]
Model for contracts_compensation.
- amount: int | None
Required field unless your compensation type is undefined
- calculation: str | None
Compensation calculation
- compensation_type: str | None
Required field. You can only use the following options: fixed, undefined, up_to, per_worked_day, per_worked_hour
- contract_version_id: int
Contract version ID
- contracts_taxonomy_id: int
Contracts taxonomy ID
- currency: str | None
Currency of the compensation
- description: str | None
Compensation description
- first_payment_on: date | None
When the first payment is done
- id: int
Compensation ID
- minimum_amount_of_hours: int | None
Minimum amount of hours
- minimum_amount_of_hours_in_cents: int | None
Compensation expected minimum amount of hours in cents
- payroll_policy_id: int | None
Payroll policy ID
- recurrence: str | None
Compensation recurrence
- recurrence_count: int | None
Recurrence count
- starts_on: date | None
When the compensation starts_on
- sync_with_supplements: bool | None
Sync with supplements
- time_condition: TimeCondition | None
Time condition for the compensation
- unit: str
Unit of the compensation
- class factorialhr.CompensationsEndpoint(api: ApiClient)[source]
Endpoint for contract compensations.
- async all(**kwargs) ListApiResponse[Compensation][source]
Get all compensations.
Official documentation: contracts/compensations
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async create(data: Mapping[str, Any], **kwargs) Compensation[source]
Create a new compensation.
Official documentation: contracts/compensations
- Parameters:
data (Mapping[str, Any]) – Payload for the new record (key-value mapping).
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The created record.
- Return type:
- async delete(compensation_id: int | str, **kwargs) None[source]
Delete a compensation.
Official documentation: contracts/compensations
- Parameters:
compensation_id (int | str) – The unique identifier of the record to delete.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
None.
- Return type:
None
- async get(**kwargs) MetaApiResponse[Compensation][source]
Get compensations with pagination metadata.
Official documentation: contracts/compensations
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(compensation_id: int | str, **kwargs) Compensation[source]
Get a specific compensation by ID.
Official documentation: contracts/compensations
- Parameters:
compensation_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- async update(compensation_id: int | str, data: Mapping[str, Any], **kwargs) Compensation[source]
Update a compensation.
Official documentation: contracts/compensations
- Parameters:
compensation_id (int | str) – The unique identifier of the record to update.
data (Mapping[str, Any]) – Payload with fields to update (key-value mapping).
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The updated record.
- Return type:
- class factorialhr.ContractTemplate(*, id: int, company_id: int | None = None, contract_version_type: str | None = None)[source]
Model for contracts_contract_template.
- company_id: int | None
ID of the company this template belongs to
- contract_version_type: str | None
Type of contract version (e.g., es for Spain, fr for France)
- id: int
Unique identifier for the contract template
- class factorialhr.ContractTemplatesEndpoint(api: ApiClient)[source]
Endpoint for contract templates.
- async all(**kwargs) ListApiResponse[ContractTemplate][source]
Get all contract templates.
Official documentation: contracts/contract_templates
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async get(**kwargs) MetaApiResponse[ContractTemplate][source]
Get contract templates with pagination metadata.
Official documentation: contracts/contract_templates
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(template_id: int | str, **kwargs) ContractTemplate[source]
Get a specific contract template by ID.
Official documentation: contracts/contract_templates
- Parameters:
template_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- class factorialhr.ContractVersion(*, id: int | None = None, company_id: int, employee_id: int, effective_on: date, country: str | None = None, job_title: str | None = None, job_catalog_level_id: int | None = None, starts_on: date | None = None, ends_on: date | None = None, has_payroll: bool, has_trial_period: bool | None = None, trial_period_ends_on: date | None = None, salary_amount: int | None = None, salary_frequency: str | None = None, working_week_days: str | None = None, working_hours: int | None = None, working_hours_frequency: str | None = None, max_legal_yearly_hours: int | None = None, maximum_weekly_hours: int | None = None, bank_holiday_treatment: BankHolidayTreatment, working_time_percentage_in_cents: int | None = None, annual_working_time_distribution: AnnualWorkingTimeDistribution | None = None, min_rest_minutes_between_days: int | None = None, max_work_minutes_per_day: int | None = None, max_work_days_in_row: int | None = None, min_rest_hours_in_row: int | None = None, created_at: datetime, updated_at: datetime, es_has_teleworking_contract: bool | None = None, es_cotization_group: int | None = None, contracts_es_tariff_group_id: int | None = None, es_contract_observations: str | None = None, es_job_description: str | None = None, es_contract_type_id: int | None = None, es_working_day_type_id: int | None = None, es_education_level_id: int | None = None, es_professional_category_id: int | None = None, fr_employee_type: str | None = None, fr_forfait_jours: bool, fr_jours_par_an: int | None = None, fr_coefficient: str | None = None, fr_contract_type_id: int | None = None, fr_level_id: int | None = None, fr_step_id: int | None = None, fr_mutual_id: int | None = None, fr_professional_category_id: int | None = None, fr_work_type_id: int | None = None, de_contract_type_id: int | None = None, pt_contract_type_id: int | None = None, job_catalog_role_id: int | None = None, job_catalog_tree_node_uuid: str | None = None, is_reference: bool | None = None)[source]
Model for contracts_contract_version.
- annual_working_time_distribution: AnnualWorkingTimeDistribution | None
Allows companies to define how annual working hours are spread across the year to ensure compliance with legal limits
- bank_holiday_treatment: BankHolidayTreatment
Defines whether a bank holiday should be considered as a workable or non-workable day
- company_id: int
Identifier for company
- contracts_es_tariff_group_id: int | None
The group of cotization of the employee
- country: str | None
Nationality country code of the employee (Spain ES, United Kingdom GB)
- created_at: datetime
The date the contract version was created
- de_contract_type_id: int | None
Contract type identifier
- effective_on: date
The day the specific contract starts, in case of hiring the same than starts_on
- employee_id: int
Employee identifier, refers to /employees/employees endpoint
- ends_on: date | None
The day the employee is terminated
- es_contract_observations: str | None
Observations of the contract
- es_contract_type_id: int | None
Contract type identifier
- es_cotization_group: int | None
The group of cotization of the employee
- es_education_level_id: int | None
Education level identifier
- es_has_teleworking_contract: bool | None
Flag that indicates if the contract has teleworking
- es_job_description: str | None
The job description of the employee
- es_professional_category_id: int | None
Professional category identifier
- es_working_day_type_id: int | None
Working day type identifier
- fr_coefficient: str | None
Coefficient for france contracts
- fr_contract_type_id: int | None
Contract type identifier
- fr_employee_type: str | None
Employee type
- fr_forfait_jours: bool
Flag that indicates if the employee is allowed to work within the framework of a fixed number of days
- fr_jours_par_an: int | None
The number of days the employee is allowed to work
- fr_level_id: int | None
Level identifier
- fr_mutual_id: int | None
Mutual identifier
- fr_professional_category_id: int | None
Professional category identifier
- fr_step_id: int | None
Step identifier
- fr_work_type_id: int | None
Work type identifier
- has_payroll: bool
Boolean that indicates if the employee associated to this contract belongs to a payroll policy
- has_trial_period: bool | None
A flag that indicates if the employee has a trial period
- id: int | None
Identifier for the contract version
- is_reference: bool | None
Whether it is the reference contract today or not. It is important to remark that reference contract does not mean active
- job_catalog_level_id: int | None
Job catalog level identifier, refers to /job_catalog/levels endpoint
- job_catalog_role_id: int | None
The role id of the employee in the job catalog
- job_catalog_tree_node_uuid: str | None
The uuid node in the job catalog tree. For now it only supports level nodes. From this point in the job catalog tree you can get the full ancestor path to the root node including the role. Refer to job_catalog/tree_nodes endpoint.
- job_title: str | None
Job title of the employee
- max_legal_yearly_hours: int | None
The maximum amount of hours the employee can work in a year
- max_work_days_in_row: int | None
The maximum amount of days the employee can work in a row
- max_work_minutes_per_day: int | None
The maximum amount of minutes the employee can work in a day
- maximum_weekly_hours: int | None
The maximum amount of hours the employee can work in a week
- min_rest_hours_in_row: int | None
The minimum amount of hours the employee must rest in a row
- min_rest_minutes_between_days: int | None
The minimum amount of minutes the employee must rest between working periods
- pt_contract_type_id: int | None
Contract type identifier
- salary_amount: int | None
The amount of money the employee earns
- salary_frequency: str | None
The frequency of the salary payment
- starts_on: date | None
The day the employee is hired
- trial_period_ends_on: date | None
When the trial period ends
- updated_at: datetime
The date of the last contract version updated
- working_hours: int | None
The amount of hours the employee works
- working_hours_frequency: str | None
The frequency of the working hours
- working_time_percentage_in_cents: int | None
Working time percentage in cents (e.g., when an employee is working part-time, the percentage of full-time hours they are working)
- working_week_days: str | None
The days of the week the employee works
- class factorialhr.ContractVersionHistoriesEndpoint(api: ApiClient)[source]
Endpoint for contract version histories.
- async all(**kwargs) ListApiResponse[ContractVersionHistory][source]
Get all contract version histories.
Official documentation: contracts/contract_version_histories
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async get(**kwargs) MetaApiResponse[ContractVersionHistory][source]
Get contract version histories with pagination metadata.
Official documentation: contracts/contract_version_histories
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(history_id: int | str, **kwargs) ContractVersionHistory[source]
Get a specific contract version history by ID.
Official documentation: contracts/contract_version_histories
- Parameters:
history_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- class factorialhr.ContractVersionHistory(*, id: int, contract_version_id: int, changes: str, job_catalog_tree_node_uuid: str | None = None, created_at: datetime, updated_at: datetime)[source]
Model for contracts_contract_version_history.
- changes: str
Description of changes made
- contract_version_id: int
Contract version identifier
- created_at: datetime
Creation date
- id: int
Contract version history identifier
- job_catalog_tree_node_uuid: str | None
The uuid node in the job catalog tree. For now it only supports level nodes. From this point in the job catalog tree you can get the full ancestor path to the root node including the role. Refer to job_catalog/tree_nodes endpoint.
- updated_at: datetime
Last update date
- class factorialhr.ContractVersionMetaDataEndpoint(api: ApiClient)[source]
Endpoint for contract version meta data.
- async all(**kwargs) ListApiResponse[ContractVersionMetaDatum][source]
Get all contract version meta data.
Official documentation: contracts/contract_version_meta_data
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async get(**kwargs) MetaApiResponse[ContractVersionMetaDatum][source]
Get contract version meta data with pagination metadata.
Official documentation: contracts/contract_version_meta_data
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(meta_datum_id: int | str, **kwargs) ContractVersionMetaDatum[source]
Get a specific contract version meta datum by ID.
Official documentation: contracts/contract_version_meta_data
- Parameters:
meta_datum_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- class factorialhr.ContractVersionMetaDatum(*, id: int, contract_version_id: int, key: str, value: str, created_at: datetime, updated_at: datetime)[source]
Model for contracts_contract_version_meta_datum.
- contract_version_id: int
Contract version identifier
- created_at: datetime
Creation date
- id: int
Contract version meta datum identifier
- key: str
Meta data key
- updated_at: datetime
Last update date
- value: str
Meta data value
- class factorialhr.ContractVersionsEndpoint(api: ApiClient)[source]
Endpoint for contract versions.
- async all(**kwargs) ListApiResponse[ContractVersion][source]
Get all contract versions.
Official documentation: contracts/contract_versions
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async create(data: Mapping[str, Any], **kwargs) ContractVersion[source]
Create a new contract version.
Official documentation: contracts/contract_versions
- Parameters:
data (Mapping[str, Any]) – Payload for the new record (key-value mapping).
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The created record.
- Return type:
- async delete(version_id: int | str, **kwargs) None[source]
Delete a contract version.
Official documentation: contracts/contract_versions
- Parameters:
version_id (int | str) – The unique identifier of the record to delete.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
None.
- Return type:
None
- async get(**kwargs) MetaApiResponse[ContractVersion][source]
Get contract versions with pagination metadata.
Official documentation: contracts/contract_versions
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(version_id: int | str, **kwargs) ContractVersion[source]
Get a specific contract version by ID.
Official documentation: contracts/contract_versions
- Parameters:
version_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- async update(version_id: int | str, data: Mapping[str, Any], **kwargs) ContractVersion[source]
Update a contract version.
Official documentation: contracts/contract_versions
- Parameters:
version_id (int | str) – The unique identifier of the record to update.
data (Mapping[str, Any]) – Payload with fields to update (key-value mapping).
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The updated record.
- Return type:
- class factorialhr.FrenchContractType(*, id: int, name: str, archived: bool | None = None)[source]
Model for contracts_french_contract_type.
- archived: bool | None
Whether to show archived types or not
- id: int
Identifier for the contract type
- name: str
Contract type name
- class factorialhr.FrenchContractTypesEndpoint(api: ApiClient)[source]
Endpoint for French contract types.
- async all(**kwargs) ListApiResponse[FrenchContractType][source]
Get all French contract types.
Official documentation: contracts/french_contract_types
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async get(**kwargs) MetaApiResponse[FrenchContractType][source]
Get French contract types with pagination metadata.
Official documentation: contracts/french_contract_types
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(type_id: int | str, **kwargs) FrenchContractType[source]
Get a specific French contract type by ID.
Official documentation: contracts/french_contract_types
- Parameters:
type_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- class factorialhr.GermanContractType(*, id: int, name: str, archived: bool | None = None)[source]
Model for contracts_german_contract_type.
- archived: bool | None
Whether to show archived types or not
- id: int
Identifier for the contract type
- name: str
Contract type name
- class factorialhr.GermanContractTypesEndpoint(api: ApiClient)[source]
Endpoint for German contract types.
- async all(**kwargs) ListApiResponse[GermanContractType][source]
Get all German contract types.
Official documentation: contracts/german_contract_types
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async get(**kwargs) MetaApiResponse[GermanContractType][source]
Get German contract types with pagination metadata.
Official documentation: contracts/german_contract_types
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(type_id: int | str, **kwargs) GermanContractType[source]
Get a specific German contract type by ID.
Official documentation: contracts/german_contract_types
- Parameters:
type_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- class factorialhr.PortugueseContractType(*, id: int, name: str, archived: bool | None = None)[source]
Model for contracts_portuguese_contract_type.
- archived: bool | None
Whether to show archived types or not
- id: int
Identifier for the contract type
- name: str
Contract type name
- class factorialhr.PortugueseContractTypesEndpoint(api: ApiClient)[source]
Endpoint for Portuguese contract types.
- async all(**kwargs) ListApiResponse[PortugueseContractType][source]
Get all Portuguese contract types.
Official documentation: contracts/portuguese_contract_types
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async get(**kwargs) MetaApiResponse[PortugueseContractType][source]
Get Portuguese contract types with pagination metadata.
Official documentation: contracts/portuguese_contract_types
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(type_id: int | str, **kwargs) PortugueseContractType[source]
Get a specific Portuguese contract type by ID.
Official documentation: contracts/portuguese_contract_types
- Parameters:
type_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- class factorialhr.ReferenceContractsEndpoint(api: ApiClient)[source]
Endpoint for reference contracts.
- async all(**kwargs) ListApiResponse[ContractVersion][source]
Get all reference contracts.
Official documentation: contracts/reference_contracts
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async get(**kwargs) MetaApiResponse[ContractVersion][source]
Get reference contracts with pagination metadata.
Official documentation: contracts/reference_contracts
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- class factorialhr.SpanishContractType(*, id: int, name: str, default: bool | None = None, contracts_contract_template_id: int | None = None)[source]
Model for contracts_spanish_contract_type.
- contracts_contract_template_id: int | None
The contract template identifier. Refers to contracts/contract_templates
- default: bool | None
This contract type is a predefined one
- id: int
Identifier for the contract type
- name: str
The name of the contract type
- class factorialhr.SpanishContractTypesEndpoint(api: ApiClient)[source]
Endpoint for Spanish contract types.
- async all(**kwargs) ListApiResponse[SpanishContractType][source]
Get all Spanish contract types.
Official documentation: contracts/spanish_contract_types
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async create(data: Mapping[str, Any], **kwargs) SpanishContractType[source]
Create a new Spanish contract type.
Official documentation: contracts/spanish_contract_types
- Parameters:
data (Mapping[str, Any]) – Payload for the new record (key-value mapping).
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The created record.
- Return type:
- async get(**kwargs) MetaApiResponse[SpanishContractType][source]
Get Spanish contract types with pagination metadata.
Official documentation: contracts/spanish_contract_types
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(type_id: int | str, **kwargs) SpanishContractType[source]
Get a specific Spanish contract type by ID.
Official documentation: contracts/spanish_contract_types
- Parameters:
type_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- class factorialhr.SpanishEducationLevel(*, id: int, name: str, default: bool | None = None, contracts_contract_template_id: int)[source]
Model for contracts_spanish_education_level.
- contracts_contract_template_id: int
Contract template identifier, refers to contracts/contract_templates
- default: bool | None
Whether the education level is a predefined value
- id: int
Education level identifier
- name: str
Education level name
- class factorialhr.SpanishEducationLevelsEndpoint(api: ApiClient)[source]
Endpoint for Spanish education levels.
- async all(**kwargs) ListApiResponse[SpanishEducationLevel][source]
Get all Spanish education levels.
Official documentation: contracts/spanish_education_levels
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async create(data: Mapping[str, Any], **kwargs) SpanishEducationLevel[source]
Create a new Spanish education level.
Official documentation: contracts/spanish_education_levels
- Parameters:
data (Mapping[str, Any]) – Payload for the new record (key-value mapping).
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The created record.
- Return type:
- async get(**kwargs) MetaApiResponse[SpanishEducationLevel][source]
Get Spanish education levels with pagination metadata.
Official documentation: contracts/spanish_education_levels
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(level_id: int | str, **kwargs) SpanishEducationLevel[source]
Get a specific Spanish education level by ID.
Official documentation: contracts/spanish_education_levels
- Parameters:
level_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- class factorialhr.SpanishProfessionalCategoriesEndpoint(api: ApiClient)[source]
Endpoint for Spanish professional categories.
- async all(**kwargs) ListApiResponse[SpanishProfessionalCategory][source]
Get all Spanish professional categories.
Official documentation: contracts/spanish_professional_categories
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async create(data: Mapping[str, Any], **kwargs) SpanishProfessionalCategory[source]
Create a new Spanish professional category.
Official documentation: contracts/spanish_professional_categories
- Parameters:
data (Mapping[str, Any]) – Payload for the new record (key-value mapping).
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The created record.
- Return type:
- async get(**kwargs) MetaApiResponse[SpanishProfessionalCategory][source]
Get Spanish professional categories with pagination metadata.
Official documentation: contracts/spanish_professional_categories
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(category_id: int | str, **kwargs) SpanishProfessionalCategory[source]
Get a specific Spanish professional category by ID.
Official documentation: contracts/spanish_professional_categories
- Parameters:
category_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- class factorialhr.SpanishProfessionalCategory(*, id: int, name: str, default: bool | None = None, contracts_contract_template_id: int)[source]
Model for contracts_spanish_professional_category.
- contracts_contract_template_id: int
Contract template identifier, refers to contracts/contract_templates
- default: bool | None
Whether the professional category is a predefined value
- id: int
Professional category identifier
- name: str
Professional category name
- class factorialhr.SpanishWorkingDayType(*, id: int, name: str, default: bool | None = None, contracts_contract_template_id: int | None = None)[source]
Model for contracts_spanish_working_day_type.
- contracts_contract_template_id: int | None
Contract template identifier, refers to contracts/contract_templates
- default: bool | None
Whether the Working day type is a predefined value
- id: int
Working day type identifier
- name: str
Working day type name
- class factorialhr.SpanishWorkingDayTypesEndpoint(api: ApiClient)[source]
Endpoint for Spanish working day types.
- async all(**kwargs) ListApiResponse[SpanishWorkingDayType][source]
Get all Spanish working day types.
Official documentation: contracts/spanish_working_day_types
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async create(data: Mapping[str, Any], **kwargs) SpanishWorkingDayType[source]
Create a new Spanish working day type.
Official documentation: contracts/spanish_working_day_types
- Parameters:
data (Mapping[str, Any]) – Payload for the new record (key-value mapping).
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The created record.
- Return type:
- async get(**kwargs) MetaApiResponse[SpanishWorkingDayType][source]
Get Spanish working day types with pagination metadata.
Official documentation: contracts/spanish_working_day_types
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(type_id: int | str, **kwargs) SpanishWorkingDayType[source]
Get a specific Spanish working day type by ID.
Official documentation: contracts/spanish_working_day_types
- Parameters:
type_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- class factorialhr.TaxonomiesEndpoint(api: ApiClient)[source]
Endpoint for contract taxonomies.
- async all(**kwargs) ListApiResponse[Taxonomy][source]
Get all taxonomies.
Official documentation: contracts/taxonomies
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing the list of records.
- Return type:
- async get(**kwargs) MetaApiResponse[Taxonomy][source]
Get taxonomies with pagination metadata.
Official documentation: contracts/taxonomies
- Parameters:
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
Response containing records and pagination metadata.
- Return type:
- async get_by_id(taxonomy_id: int | str, **kwargs) Taxonomy[source]
Get a specific taxonomy by ID.
Official documentation: contracts/taxonomies
- Parameters:
taxonomy_id (int | str) – The unique identifier.
kwargs (optional) – Optional keyword arguments (e.g.
paramsfor query string) forwarded to the HTTP request.
- Raises:
httpx.HTTPStatusError – When the API returns an error status code.
- Returns:
The record.
- Return type:
- class factorialhr.Taxonomy(*, id: int, name: str, archived: bool, default: bool, legal_entity_id: int)[source]
Model for contracts_taxonomy.
- archived: bool
Whether the taxonomy is archived
- default: bool
Whether the taxonomy is a default value
- id: int
Taxonomy identifier
- legal_entity_id: int
Legal entity identifier
- name: str
Taxonomy name