# List shift assignments

Returns one row per person-on-a-shift, carrying the status they are at and the
times they checked in and out.
**The same listing is published on two paths and they differ in scope.**
`/event/{event_id}/shift/{shift_id}/user` returns the people on that one shift.
`/event/shift/user` returns every assignment in the account, across every event,
and is the one to reach for when you are syncing rather than looking at a single
shift - narrow it with `filter` and page through it.
The response is only wrapped in a paginated envelope when a `page` parameter is
sent. Without one, every match comes back as a flat array. The envelope carries
no `total` and no `last_page` - page until `next_page_url` is null rather than
counting pages up front.
Rows carry no related records at all, whichever path you use. The person's name
and the shift's name are on the row as `nice.user_name` and `nice.shift_name`;
for anything more, read the user or the shift by the ids the row carries.

Endpoint: GET /api/v2/event/{event_id}/shift/{shift_id}/user
Version: 2.0.0
Security: default

## Path parameters:

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

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

## Query parameters:

  - `scan` (string)
    Match people by name, email, phone or reference, the way
the console's search box does.

  - `active` (boolean)
    Keep only assignments at a status that counts towards
the shift's demand.

  - `leader` (boolean)
    Keep only assignments at an active status. On
`/event/shift/user`, where no shift is named, this also narrows the results to
shifts starting within twelve hours either side of now, and a caller who cannot
update shift assignments sees only the shifts they lead.

  - `per_page` (integer)
    The number of results to return per page. The higher the number the longer the request may take.
It is highly recommended to use this to avoid timeouts as your data grows.
Used in conjunction with the `page` parameter to paginate results.

  - `page` (integer)
    The page of results to return. Used in conjunction with the `per_page` parameter to paginate
results. If not specified, defaults to 1.
The response's next_page_url will be null if there are no
more pages.

  - `filter` (array)
    A filter to apply to the results. Declared as an array of objects, where each object
contains an attr (attribute code), operator and value key. Examples:

?filter[0]['attr']=name&filter[0][operator]=like&filter[0][value]=luke 

?filter[0]['attr']=id&filter[0][operator]=>&filter[0][value]=265 

See the filters documentation for more details on how to use this.

  - `sort_by` (string)
    The field to sort the results by. No ordering is applied unless you specify one, so
row order is not guaranteed. Always send it when paging through a list, otherwise
records can repeat or be missed between pages.
Example: id

  - `sort_order` (string)
    The direction to sort the results by. Can be 'asc' or 'desc', default is 'asc'.

  - `_locale` (string)
    The locale to use for the response. This primarily affects the results of the `nice` field, which
contain human-readable labels and terms, as well as locale-specific date formats.,

  - `extras` (array)
    A list of extras to include in the response. These are objects or arrays that are not part of
the model's primary attributes, such as stats and counts.
For fast responses, avoid requesting them if you don't need them.

  - `with` (array)
    A list of relations to include in the response. May be single records or collections.
It is often more efficient to retrieve this way, to avoid follow-up API calls.

## Header parameters:

  - `Rosterfy-Platform` (string)

## Response 200 fields (application/json):

  - `current_page` (integer)

  - `data` (array)

  - `data.object` (object)

  - `data.object.id` (integer)

  - `data.object.event_shift_id` (integer)

  - `data.object.user_id` (integer)

  - `data.object.post_shift_feedback_form_completed_at` (string | null)

  - `data.object.precheckin_form_completed_at` (string | null)

  - `data.object.event_shift_status_id` (integer)

  - `data.object.demand` (integer)

  - `data.object.break` (string | null)

  - `data.object.start_timestamp` (string | null)

  - `data.object.end_timestamp` (string | null)

  - `data.object.cost` (string)

  - `data.object.cost_meta` (array)

  - `data.object.meta` (string | null)

  - `data.object.latitude` (string | null)

  - `data.object.longitude` (string | null)

  - `data.object.payment_authorization_id` (string | null)

  - `data.object.waitlist_notification_last_sent_at` (string | null)

  - `data.object.timesheet_status` (string)

  - `data.object.rating` (string | null)

  - `data.object.demand_expire` (string | null)

  - `data.object.deleted_at` (string | null)

  - `data.object.is_erased` (integer)

  - `data.object.created_at` (string)

  - `data.object.updated_at` (string)

  - `data.object.deleted_by` (string | null)

  - `data.nice` (object)

  - `data.nice.rrn` (string)

  - `data.nice.journey_step` (string)

  - `data.nice.journey_step_category` (string)

  - `data.nice.created_at` (string)

  - `data.nice.created_at__date` (string)

  - `data.nice.created_at__time` (string)

  - `data.nice.created_at__offset` (string)

  - `data.nice.created_at__offset_minutes` (integer)

  - `data.nice.created_at__dayofweek` (string)

  - `data.nice.event_shift_status_id` (string)

  - `data.nice.event_shift_status_id:value` (integer)

  - `data.nice.event_shift_status_id:array` (string)

  - `data.nice.payment_authorization_id` (string)

  - `data.nice.timesheet_status` (string)

  - `data.nice.timesheet_status:value` (string)

  - `data.nice.timesheet_status:array` (string)

  - `data.nice.updated_at` (string)

  - `data.nice.updated_at__date` (string)

  - `data.nice.updated_at__time` (string)

  - `data.nice.updated_at__offset` (string)

  - `data.nice.updated_at__offset_minutes` (integer)

  - `data.nice.updated_at__dayofweek` (string)

  - `data.nice.attended` (object)

  - `data.nice.attended.seconds` (integer)

  - `data.nice.attended.minutes` (integer)

  - `data.nice.attended.hours` (integer)

  - `data.nice.attended.pretty` (string)

  - `data.nice.attended_without_checkout` (object)

  - `data.nice.attended_without_checkout.seconds` (integer)

  - `data.nice.attended_without_checkout.minutes` (integer)

  - `data.nice.attended_without_checkout.hours` (integer)

  - `data.nice.attended_without_checkout.pretty` (string)

  - `data.nice.event_id` (integer)

  - `data.nice.event_name` (string)

  - `data.nice.is_event_leader` (boolean)

  - `data.nice.is_leader` (boolean)

  - `data.nice.checkin_location` (array)

  - `data.nice.shift_name` (string)

  - `data.nice.user_name` (string)

  - `data.nice.requires_pre_checkin` (boolean)

  - `data.nice.has_shift_attended_form` (boolean)

  - `data.nice.has_checkin_form` (boolean)

  - `data.nice.has_checkout_form` (boolean)

  - `data.nice.shift_checkin_visible_attributes` (array)

  - `data.nice.has_confirmed` (boolean)

  - `data.nice.has_rejected` (boolean)

  - `data.nice.has_cancelled` (boolean)

  - `data.relations` (array)

  - `data.permissions` (object)

  - `data.permissions.read` (boolean)

  - `data.permissions.update` (boolean)

  - `data.permissions.delete` (boolean)

  - `data.permissions.status_update` (boolean)

  - `data.permissions.precheckin` (boolean)

  - `data.permissions.checkin` (boolean)

  - `data.permissions.checkout` (boolean)

  - `data.permissions.submitAttendedForm` (boolean)

  - `data.attributes` (array)

  - `data.is_leader` (integer)

  - `first_page_url` (string)

  - `from` (integer)

  - `next_page_url` (string)

  - `path` (string)

  - `per_page` (integer)

  - `prev_page_url` (string | null)

  - `to` (integer)

