What is the standard approach to handle the 400 error when exporting schedules via the WFM API?
Using Python SDK v5.2.1. Endpoint: /api/v2/wfm/schedules/export. Payload matches the schema exactly. Error response indicates ‘Invalid time range’. Timezone is Australia/Sydney. Start and end times are ISO 8601 with Z suffix. The same request works in the UI but fails in CLI. No specific field mentioned in the error body.
If you check the docs, they mention that the export endpoint requires UTC timestamps without the Z suffix for certain legacy API versions, or it expects a specific timezone offset format. Try converting your Australia/Sydney times to explicit UTC offsets instead of relying on the Z suffix.
Verify payload format against the latest OpenAPI spec
Check if the date range exceeds the maximum allowed window