# Update a shift

Changes one shift and returns it. Every field is optional; send only what you are
changing.
**A shift in a linked series cannot be updated without saying what to do about the
rest of the series.** The first attempt comes back as a 400 carrying
`reference: "_options.update_linked_shifts"` - a prompt rather than an error.
Answer it by sending `_options.update_linked_shifts`: false changes this shift
alone and returns it, true also changes the shifts linked to it, and **that form
returns `{"queue": "<token>"}` instead of the shift**, because the rest of the
series is changed in the background. The token is not something you can poll; read
the shifts back to confirm.
Where the shift was built from a template, the template's values replace what you
send for the fields it locks, unless you also send `<field>:override` as true and
are allowed to override locked fields.
Any attribute your account has configured for a shift is accepted here alongside
the fields below, under the code you gave it. The shift has to belong to the event
in the URL; a mismatch is a 404.

Endpoint: PUT /api/v2/event/{event_id}/shift/{id}
Version: 2.0.0
Security: default

## Path parameters:

  - `event_id` (integer, required)
    The ID of the event.

  - `id` (integer, required)
    The ID of the shift.

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `name` (string)
    What the shift is called. Shown to people choosing shifts.

  - `timezone` (string)
    The timezone the start and end times are given in, as an IANA name such as `Australia/Melbourne`.

  - `min_demand` (integer)
    The fewest people the shift needs. Defaults to 1.

  - `max_demand` (integer)
    The most people the shift can take. Applications are refused once it is full.

  - `leader_demand` (integer)
    How many of those places are for leaders. Defaults to 0.

  - `start_timestamp` (string)
    When the shift starts, as `YYYY-MM-DD HH:MM:SS` in the shift's timezone.

  - `end_timestamp` (string)
    When the shift ends, as `YYYY-MM-DD HH:MM:SS` in the shift's timezone.

  - `is_virtual` (boolean)
    Whether the shift happens online rather than at a place.

  - `event_shift_type_id` (integer)
    The shift type, which groups shifts for reporting and for the per-type application limits an event can set.

  - `shift_status_default` (integer)
    The status a new application on this shift starts at.

  - `shift_confirmed_status_default` (integer)
    The status an application moves to when it is confirmed.

  - `shift_rejected_status_default` (integer)
    The status an application moves to when it is rejected.

  - `shift_can_withdraw_default` (boolean)
    Whether people can withdraw from the shift themselves.

  - `shift_can_withdraw_limit` (integer)
    How long before the shift starts withdrawing stops being allowed, in seconds.

  - `shift_can_confirm` (boolean)
    Whether people can confirm their own place on the shift.

  - `shift_can_confirm_limit` (integer)
    How long before the shift starts confirming stops being allowed, in seconds.

  - `shift_checked_in_status_default` (integer)
    The status an assignment moves to on check-in.

  - `shift_checked_out_status_default` (integer)
    The status an assignment moves to on check-out.

  - `address` (object)
    Where the shift happens, as an address object. Required on a create unless the shift is virtual or takes its location from a venue.

  - `headcount_location_venue_id` (integer)
    The venue the shift happens at. Sending one takes the location from the venue instead of from `address`.

  - `certificate_id` (integer)
    A certificate awarded for attending the shift.

  - `shift_application_form_id` (integer)
    The form someone fills in when applying for this shift.

  - `allow_application_form_resubmit` (boolean)
    Whether someone can submit the application form again.

  - `shift_precheckin_form_id` (integer)
    The form filled in at pre-check-in.

  - `shift_checkin_form_id` (integer)
    The form filled in at check-in.

  - `shift_attended_form_id` (integer)
    The form filled in once the shift has been attended.

  - `shift_checkout_form_id` (integer)
    The form filled in at check-out.

  - `shift_withdraw_form_id` (integer)
    The form filled in when withdrawing.

  - `visibility_show_groups` (array)
    Only members of these groups can see the shift.

  - `visibility_hide_groups` (array)
    Members of these groups cannot see the shift.

  - `visibility_show_roleoffer` (array)
    Only people holding one of these role offers can see the shift.

  - `apps_open_timestamp` (string)
    When applications open. Before this, applying is refused.

  - `apps_close_timestamp` (string)
    When applications close. After this, applying is refused.

  - `role_offer_id` (integer)
    The role offer this shift belongs to.

  - `role_offer_address` (boolean)
    Take the shift's location from the role offer rather than from `address`.

  - `shift_precheckin_open` (integer)
    How long before the shift starts pre-check-in opens, in seconds.

  - `max_group_demand` (integer)
    How many places a single group booking can take.

  - `group_booking_ttl` (integer)
    How long a group booking is held before it lapses, in seconds.

  - `max_group_size` (integer)
    The largest group that can book onto the shift.

  - `reserved_expiry` (integer)
    How long a reserved place is held before it lapses, in seconds.

  - `self_checkin` (boolean)
    Whether people can check themselves in to the shift.

  - `self_checkin_open` (integer)
    How long before the shift starts self check-in opens, in seconds.

  - `self_checkin_close` (integer)
    How long after the shift starts self check-in closes, in seconds.

  - `self_checkout_close` (integer)
    How long after the shift ends self check-out closes, in seconds.

  - `checkin_close` (integer)
    How long after the shift ends check-in closes, in seconds.

  - `geofence_checkin_limit` (integer)
    How close to the shift's location someone has to be to check in, in metres.

  - `checkin_visible_attributes` (array)
    Which of a person's attributes are shown on the check-in screen.

  - `training_ids` (array)
    Training people must have completed before they can be placed on the shift.

  - `post_feedback_form` (integer)
    The form people fill in about the shift afterwards.

  - `shift_leader_feedback_form_id` (integer)
    The form a leader fills in about the shift.

  - `shift_enable_waitlist_default` (boolean)
    Whether people can join a waitlist once the shift is full.

  - `max_waitlist` (integer)
    How many people the waitlist holds.

  - `publish` (boolean)
    Whether the shift is visible to people who can apply for it. Ignored from a caller who cannot publish shifts.

  - `public` (boolean)
    Whether the shift can be seen without signing in, on a public event.

  - `is_cancelled` (boolean)
    Whether the shift is cancelled. Cancelling this way does not move anyone already on the shift; use the cancel endpoint for that.

  - `sort_order` (integer)
    Where the shift sits when shifts are shown in a fixed order.

  - `minimum_dob` (string)
    Latest date of birth allowed on the shift. Cannot be sent together with `minimum_age`.

  - `minimum_age` (string)
    Youngest age allowed on the shift, as `years:months`.

  - `maximum_dob` (string)
    Earliest date of birth allowed on the shift. Cannot be sent together with `maximum_age`.

  - `maximum_age` (string)
    Oldest age allowed on the shift, as `years:months`.

  - `price_excluding_tax` (number)
    What taking this shift costs the person, before tax.

  - `tax_percentage` (integer)
    Tax charged on the price, as a percentage between 0 and 100.

  - `cost_description` (string)
    Free text shown alongside the price.

  - `custom_*` (string)
    A custom attribute, named by its code - custom_shirt_size, for example. The value follows the attribute's own type, so it may be a string, a number, a boolean or a list. See the custom attributes documentation.

## Response 200 fields (application/json):

  - `object` (object)

  - `object.id` (integer)

  - `object.event_id` (integer)

  - `object.event_shift_type_id` (string | null)

  - `object.event_shift_template_id` (string | null)

  - `object.journey_id` (string | null)

  - `object.min_demand` (integer)

  - `object.max_demand` (integer)

  - `object.leader_demand` (integer)

  - `object.start_timestamp` (string)

  - `object.end_timestamp` (string)

  - `object.timezone` (string)

  - `object.no_shift_time` (integer)

  - `object.apps_open_timestamp` (string | null)

  - `object.apps_close_timestamp` (string | null)

  - `object.headcount_location_venue_id` (string | null)

  - `object.shift_status_default` (integer)

  - `object.shift_confirmed_status_default` (integer)

  - `object.shift_rejected_status_default` (integer)

  - `object.journey_complete_status` (string | null)

  - `object.shift_can_withdraw_default` (integer)

  - `object.shift_can_confirm` (integer)

  - `object.shift_can_confirm_limit` (integer)

  - `object.shift_can_withdraw_limit` (integer)

  - `object.shift_checked_in_status_default` (integer)

  - `object.shift_checked_out_status_default` (integer)

  - `object.certificate_id` (string | null)

  - `object.shift_application_form_id` (string | null)

  - `object.allow_application_form_resubmit` (integer)

  - `object.shift_checkin_form_id` (string | null)

  - `object.shift_attended_form_id` (string | null)

  - `object.shift_checkout_form_id` (string | null)

  - `object.shift_precheckin_form_id` (string | null)

  - `object.shift_withdraw_form_id` (string | null)

  - `object.training_ids` (string | null)

  - `object.visibility_show_groups` (array)

  - `object.visibility_hide_groups` (array)

  - `object.visibility_show_roleoffer` (array)

  - `object.role_offer_id` (string | null)

  - `object.role_offer_address` (integer)

  - `object.checkin_visible_attributes` (array)

  - `object.shift_enable_waitlist_default` (integer)

  - `object.max_waitlist` (integer)

  - `object.group_booking_ttl` (string | null)

  - `object.max_group_demand` (string | null)

  - `object.max_group_size` (string | null)

  - `object.reserved_expiry` (string | null)

  - `object.minimum_dob` (string | null)

  - `object.minimum_age` (string | null)

  - `object.maximum_dob` (string | null)

  - `object.maximum_age` (string | null)

  - `object.self_checkin` (integer)

  - `object.self_checkin_open` (integer)

  - `object.self_checkin_close` (integer)

  - `object.self_checkout_close` (integer)

  - `object.checkin_close` (integer)

  - `object.shift_precheckin_open` (integer)

  - `object.break` (integer)

  - `object.post_feedback_form` (string | null)

  - `object.shift_leader_feedback_form_id` (string | null)

  - `object.is_virtual` (integer)

  - `object.geofence_checkin_limit` (string | null)

  - `object.tax` (string | null)

  - `object.price_excluding_tax` (integer)

  - `object.tax_percentage` (string | null)

  - `object.publish` (integer)

  - `object.public` (integer)

  - `object.sort_order` (integer)

  - `object.is_cancelled` (integer)

  - `object.deleted_at` (string | null)

  - `object.is_erased` (integer)

  - `object.is_draft` (boolean)

  - `object.created_at` (string)

  - `object.updated_at` (string)

  - `object.deleted_by` (string | null)

  - `object.cost_description` (string | null)

  - `object.event_shift_description` (string)

  - `object.name` (string | null)

  - `object.address` (object)

  - `object.address.iso` (string)

  - `object.address.region_code` (string)

  - `object.address.coordinates` (object)

  - `object.address.coordinates.latitude` (string)

  - `object.address.coordinates.longitude` (string)

  - `object.address.street_address_1` (string)

  - `object.address.street_address_2` (string | null)

  - `object.address.street_address_3` (string | null)

  - `object.address.city` (string)

  - `object.address.postcode` (string)

  - `object.address.region` (string)

  - `object.address.country` (string)

  - `object.address.latitude` (string)

  - `object.address.longitude` (string)

  - `nice` (object)

  - `nice.rrn` (string)

  - `nice.address` (string)

  - `nice.address_oneline` (string)

  - `nice.address.country` (string)

  - `nice.address.country:raw` (string)

  - `nice.address.city` (string)

  - `nice.address.region` (string)

  - `nice.address.region:raw` (string)

  - `nice.address.postcode` (string)

  - `nice.address.street_address_1` (string)

  - `nice.address.street_address_2` (string)

  - `nice.address.street_address_3` (string)

  - `nice.address.latitude` (string)

  - `nice.address.longitude` (string)

  - `nice.created_at` (string)

  - `nice.created_at__date` (string)

  - `nice.created_at__time` (string)

  - `nice.created_at__offset` (string)

  - `nice.created_at__offset_minutes` (integer)

  - `nice.created_at__dayofweek` (string)

  - `nice.end_timestamp` (string)

  - `nice.end_timestamp__date` (string)

  - `nice.end_timestamp__time` (string)

  - `nice.end_timestamp__offset` (string)

  - `nice.end_timestamp__offset_minutes` (integer)

  - `nice.end_timestamp__dayofweek` (string)

  - `nice.event_shift_template_id` (string | null)

  - `nice.event_shift_template_id:value` (string | null)

  - `nice.event_shift_template_id:array` (string | null)

  - `nice.event_shift_type_id` (string | null)

  - `nice.event_shift_type_id:value` (string | null)

  - `nice.event_shift_type_id:array` (string | null)

  - `nice.headcount_location_venue_id` (string | null)

  - `nice.headcount_location_venue_id:value` (string | null)

  - `nice.headcount_location_venue_id:array` (string | null)

  - `nice.is_virtual` (string)

  - `nice.minimum_age` (string)

  - `nice.name` (string)

  - `nice.no_shift_time` (string)

  - `nice.post_feedback_form` (string | null)

  - `nice.post_feedback_form:value` (string | null)

  - `nice.post_feedback_form:array` (string | null)

  - `nice.public` (string)

  - `nice.publish` (string)

  - `nice.role_offer_address` (string)

  - `nice.role_offer_id` (string | null)

  - `nice.role_offer_id:value` (string | null)

  - `nice.role_offer_id:array` (string | null)

  - `nice.self_checkin` (string)

  - `nice.shift_application_form_id` (string | null)

  - `nice.shift_application_form_id:value` (string | null)

  - `nice.shift_application_form_id:array` (string | null)

  - `nice.shift_attended_form_id` (string | null)

  - `nice.shift_attended_form_id:value` (string | null)

  - `nice.shift_attended_form_id:array` (string | null)

  - `nice.shift_checkin_form_id` (string | null)

  - `nice.shift_checkin_form_id:value` (string | null)

  - `nice.shift_checkin_form_id:array` (string | null)

  - `nice.shift_checkout_form_id` (string | null)

  - `nice.shift_checkout_form_id:value` (string | null)

  - `nice.shift_checkout_form_id:array` (string | null)

  - `nice.shift_precheckin_form_id` (string | null)

  - `nice.shift_precheckin_form_id:value` (string | null)

  - `nice.shift_precheckin_form_id:array` (string | null)

  - `nice.shift_withdraw_form_id` (string | null)

  - `nice.shift_withdraw_form_id:value` (string | null)

  - `nice.shift_withdraw_form_id:array` (string | null)

  - `nice.start_timestamp` (string)

  - `nice.start_timestamp__date` (string)

  - `nice.start_timestamp__time` (string)

  - `nice.start_timestamp__offset` (string)

  - `nice.start_timestamp__offset_minutes` (integer)

  - `nice.start_timestamp__dayofweek` (string)

  - `nice.updated_at` (string)

  - `nice.updated_at__date` (string)

  - `nice.updated_at__time` (string)

  - `nice.updated_at__offset` (string)

  - `nice.updated_at__offset_minutes` (integer)

  - `nice.updated_at__dayofweek` (string)

  - `nice.visibility_hide_groups` (string)

  - `nice.visibility_show_groups` (string)

  - `nice.visibility_show_roleoffer` (string)

  - `nice.info` (string)

  - `nice.event_shift_link_id` (string | null)

  - `nice.event_shift_link_repeat` (integer)

  - `nice.event_shift_link_name` (string)

  - `nice.shift_status_default_id` (integer)

  - `nice.length` (integer)

  - `nice.account_id` (integer)

  - `nice.account_url` (string)

  - `nice.is_any_leader` (boolean)

  - `nice.post_shift_feedback_form_completed_at` (string)

  - `nice.pre_checkin_form_completed_at` (string)

  - `nice.event_name` (string | null)

  - `relations` (object)

  - `permissions` (object)

  - `permissions.read` (boolean)

  - `permissions.update` (boolean)

  - `permissions.delete` (boolean)

  - `permissions.apply` (boolean)

  - `permissions.apply_error` (string)

  - `permissions.apply_error_code` (string)

  - `permissions.is_unavailable` (boolean)

  - `permissions.confirm` (boolean)

  - `permissions.reject` (boolean)

  - `permissions.selfCheckin` (boolean)

  - `permissions.selfCheckout` (boolean)

  - `permissions.submitAttendedForm` (boolean)

  - `permissions.precheckin` (boolean)

  - `permissions.applyWaitlist` (boolean)

  - `attributes` (object)

## Response 400 fields (application/json):

  - `message` (string)

  - `reference` (string)

