---
title: "Patch an existing item-relation"
method: PATCH
path: "/api/workspaces/item-relations/{itemRelationId}"
tags: ["CRUD", "Items:Relations"]
---

# Patch an existing item-relation

`PATCH /api/workspaces/item-relations/{itemRelationId}`

## Request

- Base URL: `https://app.airfocus.com`
- URL: `https://app.airfocus.com/api/workspaces/item-relations/{itemRelationId}`
- Auth: HTTP bearer

Returns the whole updated item-relation with its sanitised data.<br/>Requirements:<br/>- auth-client scopes: "workspace"<br/>- user permission: "write" or higher

## Path parameters

- `itemRelationId` string, uuid, required

## Query parameters

- `actAsAdmin` boolean

## Request body

- JsonPatchOperation[]: A JSON Patch document. See https://jsonpatch.com/ for more information.
  - union
    - JsonPatchAdd
      - `op` 'add', required
      - `path` string, required
      - `value` unknown, required
    - JsonPatchCopy
      - `from` string, required
      - `op` 'copy', required
      - `path` string, required
    - JsonPatchMove
      - `from` string, required
      - `op` 'move', required
      - `path` string, required
    - JsonPatchRemove
      - `old` unknown
      - `op` 'remove', required
      - `path` string, required
    - JsonPatchReplace
      - `old` unknown
      - `op` 'replace', required
      - `path` string, required
      - `value` unknown, required
    - JsonPatchTest
      - `op` 'test', required
      - `path` string, required
      - `value` unknown, required

## Response `200`

- ItemRelationWithItemRelationEmbed
  - `_embedded` ItemRelationEmbed, required
    - `constraints` ItemRelationConstraint[], required
      - `extensionId` string, uuid, required
      - `type` 'readonly', required
  - `childId` string, uuid, required
  - `childOrder` integer, required
  - `id` string, uuid, required
  - `parentId` string, uuid, required
  - `parentOrder` integer, required

## Other responses

- `400`: If path parameters are invalid or payload is invalid or resource does not exist.
- `401`: If missing authentication token.
- `403`: If user does not have the required permission, or authenticated client does not have the required access scopes.
- `default`: If any other error happens.

---

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