---
title: "Update a key set for an inventory item"
method: PATCH
path: "/inventory/{inventoryId}/keyset/{keySetId}"
tags: ["Inventory"]
---

# Update a key set for an inventory item

`PATCH /inventory/{inventoryId}/keyset/{keySetId}`

## Request

- Base URL: `https://api.alto.zoopladev.co.uk`
- URL: `https://api.alto.zoopladev.co.uk/inventory/{inventoryId}/keyset/{keySetId}`
- Auth: `appAuth` (a scheme the document does not define)

## Path parameters

- `inventoryId` integer, required
- `keySetId` integer, required

## Headers

- `AgencyRef` string, required

## Request body

- SystemTextJsonPatchOperationsOperation1AltoInventoryApiModelsResponsesKeySetPatch[]: Array of operations to perform
  - union
    - object: The description of the key set.
      - `op` 'replace' | 'test'
      - `value` string
      - `path` string
    - object: The number of keys in the set.
      - `op` 'replace' | 'test'
      - `value` integer
      - `path` string
    - object: The status of the key set.
      - `op` 'replace' | 'test'
      - `value` 'Unspecified' | 'In' | 'Out' | 'Lost' | 'Returned'
      - `path` string
    - object: Notes for the key set.
      - `op` 'replace' | 'test'
      - `value` string
      - `path` string
    - object: The expected date the keys will be returned.
      - `op` 'replace' | 'test'
      - `value` object
      - `path` string
    - object: The type of holder when keys are out.
      - `op` 'replace' | 'test'
      - `value` 'Contact' | 'User'
      - `path` string
    - object: The identifier of the holder when keys are out.
      - `op` 'replace' | 'test'
      - `value` integer
      - `path` string

## Response `204`

The key set was updated

## Other responses

- `400`: When the request does not contain valid information
- `401`: When access has not been granted
- `404`: The inventory or key set was not found

---

[API](https://skmtc.dev/alto/apis/alto-api.md) - [All operations](https://skmtc.dev/alto/apis/alto-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alto/apis/alto-api/revisions/1b729d9b15a8?raw)
