# Update a document category mapping

`PUT /lokta-lms/api/v1/documentcategories/{id}`

Updatable fields: documentTagIds, orderPosition, active

documentTagIds REPLACES the tag set when supplied and leaves it untouched when omitted. Wholesale rather than
a delta because the console edits a checkbox list.

entityType and documentCategoryId are not updatable: changing either describes a different mapping, so that is
a delete and a create.

## Parameters
- `id` (path, integer, required)

## Request body (application/json)
- `id` (integer, required)
- `active` (boolean)
- `documentTagIds` (array)
- `orderPosition` (integer)

## Responses
- `200`: OK

## Response fields
- `resourceId` (integer)

## Example request (cURL)
```bash
curl -X PUT \
  'https://default.lokta.tech/lokta-lms/api/v1/documentcategories/{id}' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": 1,
  "active": true,
  "documentTagIds": [
    1
  ],
  "orderPosition": 1
}'
```

## Example response
```json
{
  "resourceId": 1
}
```

Interactive: https://developer.lokta.ai/reference#operation/update
