Payroll Employees
Usage
Fetch payroll employee identifiers:
import asyncio
import factorialhr
async def main():
auth = factorialhr.AccessTokenAuth("your_access_token")
async with factorialhr.ApiClient(auth=auth) as api:
identifiers = factorialhr.IdentifiersEndpoint(api)
response = await identifiers.get(params={"limit": 50})
for ident in response.data():
print(ident.employee_id, ident.identifier_type)
asyncio.run(main())
- class factorialhr.IdentifiersEndpoint(api: ApiClient)[source]
Endpoint for payroll_employees/identifiers operations.
- async all(**kwargs) ListApiResponse[Payrollemployeesidentifier][source]
Get all payroll employee identifiers records.
Official documentation: payroll_employees/identifiers
- 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) Payrollemployeesidentifier[source]
Create a new payroll employee identifier.
Official documentation: payroll_employees/identifiers
- 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(identifier_id: int | str, **kwargs) Payrollemployeesidentifier[source]
Delete a payroll employee identifier.
Official documentation: payroll_employees/identifiers
- Parameters:
identifier_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:
The deleted record.
- Return type:
- async get(**kwargs) MetaApiResponse[Payrollemployeesidentifier][source]
Get payroll employee identifiers with pagination metadata.
Official documentation: payroll_employees/identifiers
- 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(identifier_id: int | str, **kwargs) Payrollemployeesidentifier[source]
Get a specific payroll employee identifier by ID.
Official documentation: payroll_employees/identifiers
- Parameters:
identifier_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(identifier_id: int | str, data: Mapping[str, Any], **kwargs) Payrollemployeesidentifier[source]
Update a payroll employee identifier.
Official documentation: payroll_employees/identifiers
- Parameters:
identifier_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.Payrollemployeesidentifier(*, id: int, employee_id: int, social_security_number: str | None = None, tax_id: str | None = None, country: CountryCode)[source]
Model for payroll_employees_identifier.
- country: CountryCode
Country code of the employee (pt | it | de)
- employee_id: int
Identifier of the employee
- id: int
Payroll employee identifier
- social_security_number: str | None
Social security number of the employee
- tax_id: str | None
Tax id of the employee