# Update an item on an allocation rule

Updates the fields supplied and returns the line in the same shape as reading
it. Only the fields sent are touched.
Changes apply to allocations made from here on. Anything already handed out
keeps the validity period it was given, so shortening `valid_duration` does not
bring forward an expiry that has already been set.
The line has to belong to the rule named in the URL; updating one under the
wrong rule is not found and nothing is written.

Endpoint: PUT /api/v2/inventory/allocation/{allocation_id}/item/{id}
Version: 2.0.0
Security: default

## Path parameters:

  - `allocation_id` (integer, required)
    The ID of the allocation rule.

  - `id` (integer, required)
    The ID of the item line on that rule.

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `inventory_item_id` (integer)
    The ID of the catalogue item to give out.

  - `quantity` (integer)
    How many of the item each qualifying person receives, as a whole number of 1 or more. Each one is allocated separately, so a quantity of 3 produces three allocations.

  - `valid_duration` (integer)
    How long the allocation stays valid, in seconds, counted from the moment it is granted. Leave it unset for an allocation that does not expire.

## Response 200 fields (application/json):

  - `object` (object)

  - `object.id` (integer)

  - `object.inventory_item_id` (integer)

  - `object.quantity` (integer)

  - `object.valid_duration` (integer)

  - `object.created_at` (string)

  - `object.updated_at` (string)

  - `nice` (array)

  - `relations` (array)

  - `permissions` (object)

  - `permissions.read` (boolean)

  - `permissions.update` (boolean)

  - `permissions.delete` (boolean)

