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.
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.
- Mock serverhttps://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/me/inventory/item
- Your Rosterfy accounthttps://example.rosterfy.com/api/v2/me/inventory/item
curl -i -X GET \
'https://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/me/inventory/item?assigned_only=true&per_page=5&page=1&filter=%7Bfilter%7D&sort_by=%7Bsort_by%7D&sort_order=%7Bsort_order%7D&_locale=en-US' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Rosterfy-Platform: admin'[ { "current_page": 1, "data": [ … ], "first_page_url": "https://example.rosterfy.com/api/v2/me/inventory/item?per_page=5&_locale=en-US&page=1", "from": 1, "next_page_url": "https://example.rosterfy.com/api/v2/me/inventory/item?per_page=5&_locale=en-US&page=2", "path": "https://example.rosterfy.com/api/v2/me/inventory/item", "per_page": 5, "prev_page_url": null, "to": 5 } ]