# Mark allocations as collected

Records that items already allocated to people have now been handed over,
several at once. This is the counterpart to setting collected_at on a single
allocation, and it also records who handed the item over.
Each entry in items names the allocation to collect. Entries are matched only
against allocations held by one of the people in user_ids and only against
allocations not already collected, so calling this twice with the same body
does not double-record anything.
**Every entry is checked before anything is recorded** - an unknown allocation,
one belonging to an unpublished item, or a missing or unusable serial where the
item needs one, rejects the whole request with a 422 and nothing is collected.
An entry that passes validation but matches no uncollected allocation is
skipped silently, so a success does not by itself mean every entry took effect.
The response carries no body; read the allocations back to confirm.

Endpoint: POST /api/v2/inventory/item/user/collect
Version: 2.0.0
Security: default

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `user_ids` (array, required)
    The IDs of the people whose allocations are being collected. An entry in items is only matched against allocations held by one of these people.

  - `items` (array, required)
    The allocations being collected. Each entry is an object with an `item_user_id`, the ID of the allocation to mark as collected, and, for an item whose serials are assigned by hand, a `serial` naming the unit handed over. Every entry is checked before anything is recorded, and one bad entry rejects the whole request.

