Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 24.9 KB

File metadata and controls

61 lines (43 loc) · 24.9 KB

EmployeeSchedulesSDK

(hris.employee_schedules)

Overview

Available Operations

  • list - List Employee Schedules

list

List schedules for employee, a schedule is a work pattern, not the actual worked hours, for an employee.

Example Usage

from apideck_unify import Apideck
import os

with Apideck(
    api_key=os.getenv("APIDECK_API_KEY", ""),
    consumer_id="test-consumer",
    app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
) as apideck:

    res = apideck.hris.employee_schedules.list(employee_id="<id>", service_id="salesforce", pass_through={
        "search": "San Francisco",
    }, fields="id,updated_at")

    assert res.get_employee_schedules_response is not None

    # Handle response
    print(res.get_employee_schedules_response)

Parameters

Parameter Type Required Description Example
employee_id str ✔️ ID of the employee you are acting upon.
raw Optional[bool] Include raw response. Mostly used for debugging purposes
service_id Optional[str] Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. salesforce
pass_through Dict[str, Any] Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads {
"search": "San Francisco"
}
fields OptionalNullable[str] The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: fields=name,email,addresses.city

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
id,updated_at
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.HrisEmployeeSchedulesAllResponse

Errors

Error Type Status Code Content Type
models.BadRequestResponse 400 application/json
models.UnauthorizedResponse 401 application/json
models.PaymentRequiredResponse 402 application/json
models.NotFoundResponse 404 application/json
models.UnprocessableResponse 422 application/json
models.APIError 4XX, 5XX */*