I'm trying to use a post function, but this is not working

I've been using the API for quite sometime and it has been working perfectly, but I'm working with the Workforce Management API and found the following problem. This is the code i've been using (the auth part is deleted)

import PureCloudPlatformClientV2
import pandas
apiclient = #Deleted not to show the secret ID
WFM = PureCloudPlatformClientV2.WorkforceManagementApi(apiclient)
WFM.post_workforcemanagement_adherence_historical_bulk({
"items": [
    {
        "managementUnitId": "68c9c998-3f40-42d2-90a0-2d749886b9df",
        "startDate": "2023-09-05T00:00:00.000Z",
        "endDate": "2023-09-06T00:00:00.000Z",
        "userIds": ["96d4bfc4-f3a1-49e9-849c-02c291e04bcc","32358977-d7e6-48ea-a0bf-499964295550"],
        "includeExceptions": True,
        "includeActuals": True
    }
],
"timeZone": "Europe/Madrid"
})

I get this error "TypeError: WorkforceManagementApi.post_workforcemanagement_adherence_historical_bulk() takes 1 positional argument but 2 were given" yet i've always used the query that the developer API explorer provides with no issue. Could you please help me?

Thanks in advance!

Please refer to the SDK documentation. You must use the documented types with the SDK: https://developer.genesys.cloud/devapps/sdk/docexplorer/purecloudpython/WorkforceManagementApi#post_workforcemanagement_adherence_historical_bulk

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.