Marketplace

Usage

List marketplace installations and settings:

import asyncio
import factorialhr

async def main():
    auth = factorialhr.AccessTokenAuth("your_access_token")
    async with factorialhr.ApiClient(auth=auth) as api:
        installations = factorialhr.InstallationsEndpoint(api)
        response = await installations.all()
        for inst in response.data():
            print(inst.id, inst.app_id)
        settings = factorialhr.InstallationSettingsEndpoint(api)
        for s in (await settings.get(params={"limit": 10})).data():
            print(s.installation_id)

asyncio.run(main())
class factorialhr.Installation(*, id: int, name: str, company_id: int, created_at: datetime, updated_at: datetime)[source]

Model for marketplace_installation.

company_id: int

Company identifier

created_at: datetime

Creation date

id: int

Installation identifier

name: str

Installation name

updated_at: datetime

Last update date

class factorialhr.InstallationsEndpoint(api: ApiClient)[source]

Endpoint for marketplace/installations operations.

async all(**kwargs) ListApiResponse[Installation][source]

Get all installations records.

Official documentation: marketplace/installations

Parameters:

kwargs (optional) – Optional keyword arguments (e.g. params for 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:

ListApiResponse[Installation]

async create(data: Mapping[str, Any], **kwargs) Installation[source]

Create a new installation.

Official documentation: marketplace/installations

Parameters:
  • data (Mapping[str, Any]) – Payload for the new record (key-value mapping).

  • kwargs (optional) – Optional keyword arguments (e.g. params for query string) forwarded to the HTTP request.

Raises:

httpx.HTTPStatusError – When the API returns an error status code.

Returns:

The created record.

Return type:

Installation

async get(**kwargs) MetaApiResponse[Installation][source]

Get installations with pagination metadata.

Official documentation: marketplace/installations

Parameters:

kwargs (optional) – Optional keyword arguments (e.g. params for 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:

MetaApiResponse[Installation]

async get_by_id(installation_id: int | str, **kwargs) Installation[source]

Get a specific installation by ID.

Official documentation: marketplace/installations

Parameters:
  • installation_id (int | str) – The unique identifier.

  • kwargs (optional) – Optional keyword arguments (e.g. params for query string) forwarded to the HTTP request.

Raises:

httpx.HTTPStatusError – When the API returns an error status code.

Returns:

The record.

Return type:

Installation

class factorialhr.InstallationSettings(*, leave_types: Sequence[Any], additional_compensation_types: Sequence[Any], file_numbers: Sequence[Any], establishment_codes: Sequence[Any], timeoff_allowance_code: Sequence[Any])[source]

Model for marketplace_installation_settings.

additional_compensation_types: Sequence[Any]

List of additional compensation types

establishment_codes: Sequence[Any]

List of establishment codes

file_numbers: Sequence[Any]

List of file numbers

leave_types: Sequence[Any]

List of leave types

timeoff_allowance_code: Sequence[Any]

List of timeoff allowance codes

class factorialhr.InstallationSettingsEndpoint(api: ApiClient)[source]

Endpoint for marketplace/installation_settings operations.

async all(**kwargs) ListApiResponse[InstallationSettings][source]

Get all installation settings records.

Official documentation: marketplace/installation_settings

Parameters:

kwargs (optional) – Optional keyword arguments (e.g. params for 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:

ListApiResponse[InstallationSettings]

async get(**kwargs) MetaApiResponse[InstallationSettings][source]

Get installation settings with pagination metadata.

Official documentation: marketplace/installation_settings

Parameters:

kwargs (optional) – Optional keyword arguments (e.g. params for 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:

MetaApiResponse[InstallationSettings]