Rippling: Create a new unassigned shift
Rippling restApi.createUnassignedshifts: arguments, response, policy and SDK examples.
← Rest API operations · Get started
Operation rippling.rest_api.create_unassignedshifts
Provider route: POST /unassignedshifts/. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/rippling with npm, or alter-sdk-rippling with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { RipplingIntegration } from "@alter-ai/rippling";
async function execute(input: Parameters<RipplingIntegration["restApi"]["createUnassignedshifts"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new RipplingIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.restApi.createUnassignedshifts(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_rippling import RipplingIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = RipplingIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.rest_api.create_unassignedshifts(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | Model | Optional | Expand Create a new unassigned shift — request body — body |
Referenced models: Create a new unassigned shift — request body — body
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 |
|---|---|---|---|
$ | object | Root | |
assigned_count | JSON | Optional | |
assigned_count (anyOf 1) | integer | Alternative | The number of assigned shifts |
assigned_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
assigned_shift_ids | array | Optional | The IDs of the assigned shifts that are part of this unassigned shift |
assigned_shift_ids[] | string | Each item | |
created_at | string | Required within parent | Record creation date |
custom_fields | array | Optional | Custom fields for the unassigned shift |
custom_fields[] | JSON | Each item | Additional keys: see wildcard field |
custom_fields[].* | JSON | Additional keys | |
id | string | Required within parent | Identifier field |
is_published | boolean | Required within parent | Whether the shift is published |
open_shift_config | object | Optional | Configuration for an open shift. If present, this is an open shift (workers can sign up). If absent/None, this is an empty shift (placeholder). |
published_version | Model | Optional | Expand Update a unassigned shift — response body — published version |
schedule | Model | Optional | Expand Update a shift assignment — response body — schedule |
schedule_id | string | Required within parent | The ID of the schedule |
shift_data | Model | Required within parent | Expand Update a shift assignment — response body — shift data |
target_count | JSON | Required within parent | |
target_count (anyOf 1) | integer | Alternative | The target count of the shift |
target_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
updated_at | string | Required within parent | Record update date |
Referenced models: Update a unassigned shift — response body — published version, Update a shift assignment — response body — schedule, Update a shift assignment — response body — shift data
Schemas
Section titled “Schemas”25 more schemas are linked from the tables above, on the schema pages.
Create a new unassigned shift — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
is_published | boolean | Required within parent | Whether the shift is published |
open_shift_config | object | Optional | Configuration for an open shift. If present, this is an open shift (workers can sign up). If absent/None, this is an empty shift (placeholder). |
schedule_id | string | Required within parent | The ID of the schedule |
shift_data | Model | Required within parent | Expand Update a shift assignment — request body — body shift data |
target_count | integer | Required within parent | The target count of the shift |
Referenced models: Update a shift assignment — request body — body shift data
Update a unassigned shift — response body — published version
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The published version of the shift |
end_time | string | Required within parent | The end time of the shift |
notes | string | Optional | Notes for the shift, max length 256 characters Maximum length: 256 |
shift_breaks | array | Optional | The breaks of the shift |
shift_breaks[] | Model | Each item | Expand Update a shift assignment — response body — shift data shift breaks item |
shift_segments | array | Optional | The segments of the shift |
shift_segments[] | Model | Each item | Expand Update a shift assignment — response body — shift data shift segments item |
start_time | string | Required within parent | The start time of the shift |
Referenced models: Update a shift assignment — response body — shift data shift breaks item, Update a shift assignment — response body — shift data shift segments item
Update a shift assignment — response body — schedule
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The schedule Expandable field |
can_edit | boolean | Optional | Whether the requesting role can edit the schedule. |
created_at | string | Required within parent | Record creation date |
id | string | Required within parent | Identifier field |
managers | array | Optional | The managers of the schedule. Expandable field |
managers[] | Model | Each item | Expand Retrieve a specific worker — response body — manager |
managers_id | array | Optional | The IDs of the managers of the schedule. |
managers_id[] | string | Each item | |
members | array | Optional | The members of the schedule. Expandable field |
members[] | Model | Each item | Expand Retrieve a specific worker — response body — manager |
members_id | array | Optional | The IDs of the members of the schedule. |
members_id[] | string | Each item | |
name | string | Optional | The name of the schedule. |
observers | array | Optional | The observers of the schedule. Expandable field |
observers[] | Model | Each item | Expand Retrieve a specific worker — response body — manager |
observers_id | array | Optional | The IDs of the observers of the schedule. |
observers_id[] | string | Each item | |
settings | object | Optional | The settings of the schedule. |
settings.timezone | string | Optional | The IANA timezone identifier for the schedule (e.g., 'America/New_York'). Accepted values are defined by the tz database, listed here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones |
updated_at | string | Required within parent | Record update date |
Referenced models: Retrieve a specific worker — response body — manager
Update a shift assignment — response body — shift data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The data of the shift |
end_time | string | Required within parent | The end time of the shift |
notes | string | Optional | Notes for the shift, max length 256 characters Maximum length: 256 |
shift_breaks | array | Optional | The breaks of the shift |
shift_breaks[] | Model | Each item | Expand Update a shift assignment — response body — shift data shift breaks item |
shift_segments | array | Optional | The segments of the shift |
shift_segments[] | Model | Each item | Expand Update a shift assignment — response body — shift data shift segments item |
start_time | string | Required within parent | The start time of the shift |
Referenced models: Update a shift assignment — response body — shift data shift breaks item, Update a shift assignment — response body — shift data shift segments item
Update a shift assignment — request body — body shift data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The data of the shift |
end_time | string | Required within parent | The end time of the shift |
notes | string | Optional | Notes for the shift, max length 256 characters Maximum length: 256 |
shift_breaks | array | Optional | The breaks of the shift |
shift_breaks[] | Model | Each item | Expand Update a shift assignment — request body — body shift data shift breaks item |
shift_segments | array | Optional | The segments of the shift |
shift_segments[] | Model | Each item | Expand Update a shift assignment — request body — body shift data shift segments item |
start_time | string | Required within parent | The start time of the shift |
Referenced models: Update a shift assignment — request body — body shift data shift breaks item, Update a shift assignment — request body — body shift data shift segments item
Update a shift assignment — response body — shift data shift breaks item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
duration_minutes | JSON | Required within parent | |
duration_minutes (anyOf 1) | integer | Alternative | The duration of the shift break in minutes (input only for creation) |
duration_minutes (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
end_time | string | Optional | The end time of the shift break (calculated from start_time + duration_minutes) |
start_time | string | Required within parent | The start time of the shift break |
type | string | Required within parent | The type of the shift break Known values: MEAL, REST |
Update a shift assignment — response body — shift data shift segments item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
duration_minutes | JSON | Required within parent | |
duration_minutes (anyOf 1) | integer | Alternative | The duration of the shift segment in minutes (input only for creation) |
duration_minutes (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
end_time | string | Optional | The end time of the shift segment (calculated from start_time + duration_minutes) |
job_codes_id | array | Optional | The IDs of the job codes associated with the shift segment |
job_codes_id[] | string | Each item | |
start_time | string | Required within parent | The start time of the shift segment |
Update a shift assignment — request body — body shift data shift breaks item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
duration_minutes | integer | Required within parent | The duration of the shift break in minutes (input only for creation) |
start_time | string | Required within parent | The start time of the shift break |
type | string | Required within parent | The type of the shift break One of: MEAL, REST |
Update a shift assignment — request body — body shift data shift segments item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
duration_minutes | integer | Required within parent | The duration of the shift segment in minutes (input only for creation) |
job_codes_id | array | Optional | The IDs of the job codes associated with the shift segment |
job_codes_id[] | string | Each item | |
start_time | string | Required within parent | The start time of the shift segment |
Retrieve a specific worker — response body — work schedule value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The scheduled working hours for a day of the week. |
hours | JSON | Optional | |
hours (anyOf 1) | number | Alternative | The number of scheduled working hours for the day. |
hours (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: rippling.rest_api.create_unassignedshifts. Catalog operation: create-unassignedshifts. 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: ["unassignedshifts.read-write"]
Provider entitlements: ["API_Tier_1"]
Pinned headers: {"Rippling-Api-Version": "2024-08-01"}