Deel: Process time-off requests from an external HRIS
Deel timeOff.syncTimeOffGlobalPayroll: arguments, response, policy and SDK examples.
← Time off operations · Get started
Operation deel.timeoff_synctimeoffglobalpayroll
Provider route: POST /time_offs/global-payroll/sync. 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["timeOff"]["syncTimeOffGlobalPayroll"]>[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.timeOff.syncTimeOffGlobalPayroll(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.time_off.sync_time_off_global_payroll(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | object | Optional | |
body.data | Model | Optional | Expand Process time-off requests from an external HRIS — request body — body data |
Referenced models: Process time-off requests from an external HRIS — request body — body data
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 Process time-off requests from an external HRIS — 200 response body |
Referenced models: Process time-off requests from an external HRIS — 200 response body
Schemas
Section titled “Schemas”Process time-off requests from an external HRIS — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | List of time offs persisted at Deel |
data | Model | Optional | Expand Process time-off requests from an external HRIS — 200 response body — data |
Referenced models: Process time-off requests from an external HRIS — 200 response body — data
Process time-off requests from an external HRIS — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
time_offs | array | Required within parent | |
time_offs[] | Model | Each item | Expand Process time-off requests from an external HRIS — request body — body data time offs item |
Referenced models: Process time-off requests from an external HRIS — request body — body data time offs item
Process time-off requests from an external HRIS — 200 response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
deleted | JSON | Optional | |
deleted (anyOf 1) | number | Alternative | Number of time off requests that were deleted Format: double |
deleted (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
inserted | JSON | Optional | |
inserted (anyOf 1) | number | Alternative | Number of time off requests that were inserted Format: double |
inserted (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
updated | JSON | Optional | |
updated (anyOf 1) | number | Alternative | Number of time off requests that were updated Format: double |
updated (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Process time-off requests from an external HRIS — request body — body data time offs item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (oneOf 1) | Model | Alternative | Expand Process time-off requests from an external HRIS — request body — body / data / time_offs / item / entitlement_unit: HOUR, BUSINESS DAY, CALENDAR DAY, WEEK, MONTH, YEAR |
$ (oneOf 2) | Model | Alternative | Expand Process time-off requests from an external HRIS — request body — body data time offs item contract oid, deleted, external id |
Referenced models: Process time-off requests from an external HRIS — request body — body / data / time_offs / item / entitlement_unit: HOUR, BUSINESS DAY, CALENDAR DAY, WEEK, MONTH, YEAR, Process time-off requests from an external HRIS — request body — body data time offs item contract oid, deleted, external id
Process time-off requests from an external HRIS — request body — body / data / time_offs / item / entitlement_unit: HOUR, BUSINESS DAY, CALENDAR DAY, WEEK, MONTH, YEAR
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | string | Optional | The amount in time units for this time off. When no amount is informed, it will be calculated using work schedules and public holidays defined at Deel. |
approved_at | string | Optional | The approval date of the time off. If no approval date is informed, the start date of this request will be used as the approval date. Note: use this field in order to support retrospective leaves so Deel can identify requests made after the payroll cycle. Format: date |
contract_oid | string | Required within parent | The contract id that has requested the time off. Maximum length: 24 |
description | string or null | Optional | The description of the time off. Maximum length: 500 |
end_date | string | Required within parent | The end date of the time off. Format: date |
entitlement_unit | string | Optional | The time unit for this time off. *Mandatory when amount parameter is informed*. If no amount and no entitlement_unit are informed, it will be calculated using Deel's internal country templates for compliant time off policies. One of: HOUR, BUSINESS_DAY, CALENDAR_DAY, WEEK, MONTH, YEAR |
external_id | string | Required within parent | External ID to link a Deel time off object with an external time off object. It will be used to determine which operation should be done: INSERT, UPDATE or DELETE. Maximum length: 48 |
is_paid | boolean | Optional | Allows the consumer to specify whether the time off is considered as paid (at statutory) or unpaid based on the configuration of the policy in the external HRIS. |
policy_name | string | Optional | The policy name the time off is being requested for. If not informed, a default name will be generated using the policy type and contract's country (eg: Vacation - US). Maximum length: 256 |
policy_type | JSON | Required within parent | The Deel policy type of the policy the time off is being requested for. |
policy_type (oneOf 1) | Model | Alternative | Expand Process time-off requests from an external HRIS — request body — body / data / time_offs / item / entitlement_unit: HOUR, BUSINESS DAY, CALENDAR DAY, WEEK, MONTH, YEAR policy type string |
policy_type (oneOf 2) | null | Alternative | |
requested_at | string | Optional | The request date of the time off. Format: date |
start_date | string | Required within parent | The start date of the time off. Format: date |
Process time-off requests from an external HRIS — request body — body data time offs item contract oid, deleted, external id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
contract_oid | string | Required within parent | The contract id that has requested the time off. Maximum length: 24 |
deleted | boolean | Required within parent | Indicates this time off request must be deleted |
external_id | string | Required within parent | External ID to link a Deel time off object with an external time off object. It will be used to determine which operation should be done: INSERT, UPDATE or DELETE. Maximum length: 48 |
Process time-off requests from an external HRIS — request body — body / data / time_offs / item / entitlement_unit: HOUR, BUSINESS DAY, CALENDAR DAY, WEEK, MONTH, YEAR policy type string
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | string | Root | The Deel policy type of the policy the time off is being requested for. One of: Adoption leave, Advanced vacation, Bereaved partner's paternity leave, Bereavement leave, Blood donation leave, Breastfeeding leave, Carer's leave, Childbirth leave, Childcare leave, Civic/public duty leave, Compensatory leave, Disability leave, Doctor's appointment leave, Family & domestic violence leave, Family responsibility leave, Floating Holiday Allowance, Hajj leave, Hospitalization leave, Long Service Leave, Marriage/wedding leave, Maternity leave, Menstrual leave, Military leave, Moving leave, Neonatal care leave, Other leave, Paid leave, Parental bereavement leave, Parental leave, Paternity leave, Personal leave, Pregnancy leave, Regional holiday, RTT, Shared parental leave, Sick leave, Strike, Study leave, Supplementary Leave, Unpaid leave, Vacation, Vacation - public holidays replacement, Volunteer leave, Work accident leave, Work away from office, Work Location |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.timeoff_synctimeoffglobalpayroll. Catalog operation: timeoff_synctimeoffglobalpayroll. 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: ["time-off:write"]
Pinned headers: {"X-Version": "2026-01-01"}