Deel: Retrieve average time per interview plan stage
Deel ats.retrieveAtsInsightsStageDurations: arguments, response, policy and SDK examples.
← ATS operations · Get started
Operation deel.ats_retrieveatsinsightsstagedurations_v2026_10_28
Provider route: GET /ats/insights/stage-durations. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/deel with npm, or alter-sdk-deel with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { DeelIntegration } from "@alter-ai/deel";
async function execute(input: Parameters<DeelIntegration["ats"]["retrieveAtsInsightsStageDurations"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new DeelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.ats.retrieveAtsInsightsStageDurations(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_deel import DeelIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = DeelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.ats.retrieve_ats_insights_stage_durations(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | Model | Optional | Expand Retrieve average time per interview plan stage — request body — query |
headers | object | Required within parent | Additional keys: not allowed |
headers.X-Beta | string | Required within parent | Default: true One of: true |
Referenced models: Retrieve average time per interview plan stage — request body — query
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Retrieve average time per interview plan stage — 200 response body |
Referenced models: Retrieve average time per interview plan stage — 200 response body
Schemas
Section titled “Schemas”Retrieve average time per interview plan stage — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | Average time applications spent in each interview plan stage. |
data[] | Model | Each item | Expand Retrieve average time per interview plan stage — 200 response body — data item |
has_more | boolean | Required within parent | Always false: the result is a single aggregate page. |
next_cursor | JSON | Required within parent | |
next_cursor (anyOf 1) | string | Alternative | Always null: the result is a single aggregate page. |
next_cursor (anyOf 2) | null | Alternative | Always null: the result is a single aggregate page. |
total_count | JSON | Required within parent | |
total_count (anyOf 1) | integer | Alternative | Number of rows in data. |
total_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Retrieve average time per interview plan stage — 200 response body — data item
Retrieve average time per interview plan stage — request body — query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
job_ids | array | Optional | |
job_ids[] | string | Each item | Format: uuid |
hiring_member_hou_ids | array | Optional | |
hiring_member_hou_ids[] | string | Each item | Format: uuid |
interview_plan_ids | array | Optional | |
interview_plan_ids[] | string | Each item | Format: uuid |
department_ids | array | Optional | |
department_ids[] | string | Each item | Format: uuid |
team_ids | array | Optional | |
team_ids[] | string | Each item | Format: uuid |
employment_type_ids | array | Optional | |
employment_type_ids[] | string | Each item | Format: uuid |
location_ids | array | Optional | |
location_ids[] | string | Each item | Format: uuid |
candidate_tag_ids | array | Optional | |
candidate_tag_ids[] | string | Each item | Format: uuid |
candidate_tag_ids_operator | string | Optional | One of: ANY, ALL |
source_slugs | array | Optional | |
source_slugs[] | string | Each item | Maximum length: 50 |
job_statuses | array | Optional | |
job_statuses[] | string | Each item | One of: DRAFT, WAITING_FOR_APPROVAL, APPROVED, NOT_APPROVED, OPEN, PAUSED, CLOSED, ARCHIVED |
work_arrangements | array | Optional | |
work_arrangements[] | string | Each item | One of: ON_SITE, HYBRID, REMOTE |
date_range_start | string | Optional | Format: date-time |
date_range_end | string | Optional | Format: date-time |
workspace_ids | array | Optional | |
workspace_ids[] | string | Each item | Format: uuid |
Retrieve average time per interview plan stage — 200 response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
average_seconds | JSON | Required within parent | |
average_seconds (anyOf 1) | number | Alternative | Average seconds an application spent in the stage before leaving it, excluding time the job was paused Format: double |
average_seconds (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
interview_plan_stage_name | string | Required within parent | Customer-defined stage name. Stages with the same name in different interview plans are reported once. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.ats_retrieveatsinsightsstagedurations_v2026_10_28. Catalog operation: ats_retrieveatsinsightsstagedurations_v2026_10_28. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["ats:read", "worker:read"]
Pinned headers: {"X-Version": "2026-10-28"}