# List my inventory items

Returns the inventory the signed-in user holds - uniforms, equipment, passes, awards and
anything else the organisation tracks against a person. Rows come back in the order the
user has arranged them.
This endpoint answers two different questions, and `assigned_only` chooses which. Left at
its default it returns the user's **allocations**: one row per item actually issued to
them, carrying the allocation's own serial number, expiry and collection state. Set it to
`0` and it returns the **catalogue** instead: the published items the user is eligible for,
whether or not they hold one yet.
The two modes return different shapes, so read `assigned_only` as a switch between two
resources rather than as a filter. The example below is the default, allocation shape.
Allocations that have already been collected, or whose expiry has passed, are left out of
the default listing.
The listing is only paginated when `page` is supplied. Without it every match is returned
as a flat array rather than in the paged envelope.

Endpoint: GET /api/v2/me/inventory/item
Version: 2.0.0
Security: default

## Query parameters:

  - `assigned_only` (boolean)
    Return the user's own allocations (`1`, the default) or
  the catalogue of items they are eligible for (`0`). The two return different shapes.

  - `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.,

## Header parameters:

  - `Rosterfy-Platform` (string)

## Response 200 fields (application/json):

  - `current_page` (integer)

  - `data` (array)

  - `data.object` (object)

  - `data.object.id` (integer)

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

  - `data.object.inventory_item_id` (integer)

  - `data.object.user_id` (integer)

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

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

  - `data.object.inventory_allocation_type` (string)

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

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

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

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

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

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

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

  - `data.object.sort_order` (integer)

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

  - `data.object.created_at` (string)

  - `data.object.updated_at` (string)

  - `data.nice` (object)

  - `data.nice.inventory_allocation_type` (string)

  - `data.nice.user_name` (string)

  - `data.relations` (array)

  - `data.permissions` (object)

  - `data.permissions.read` (boolean)

  - `data.permissions.update` (boolean)

  - `data.permissions.delete` (boolean)

  - `data.permissions.user_update` (boolean)

  - `first_page_url` (string)

  - `from` (integer)

  - `next_page_url` (string)

  - `path` (string)

  - `per_page` (integer)

  - `prev_page_url` (string | null)

  - `to` (integer)

