---
title: "Set Item Distribution Link"
method: PUT
path: "/claims/{claim_id}/expenditures/items/{item_id}/distribution-link"
tags: ["expenditures"]
---

# Set Item Distribution Link

`PUT /claims/{claim_id}/expenditures/items/{item_id}/distribution-link`

## Request

- Base URL: `https://api.claimkit.co` (the document declares no server; this is the origin it was published from)
- URL: `https://api.claimkit.co/claims/{claim_id}/expenditures/items/{item_id}/distribution-link`
- Auth: none declared

Link this item to an employee distribution, or opt it out.

'all' / 'engineering' link it (an unavailable scope is accepted — the
link persists and the sync no-ops until the aggregate exists; the UI's
disabled state is guidance, not an invariant). 'none' is the explicit
opt-out — uniform for individually-linked items and subgroup-derived
members; an opted-out item is not recaptured by a future subgroup link.
Never writes NULL (the follow-subgroup default) — once toggled, the
item's state is its own. Documented permanence, not an oversight.

Opting out also zeroes the row's R&D (see :func:`_zero_item_rd_for_unlink`):
the derived split goes with the link. Editing the split is the path that
keeps the numbers — it opts the item out on its own.

## Path parameters

- `claim_id` integer, required
- `item_id` integer, required

## Request body

- SetItemDistributionLinkRequest
  - `scope` 'all' | 'engineering' | 'none', required

## Response `200`

Successful Response

- ItemResponse
  - `id` integer, required
  - `import_id` integer, nullable, required
  - `source_sheet` string, required
  - `name` string, required
  - `description` string, nullable, required
  - `note` string, nullable
  - `source_amount` number, nullable, required
  - `source_date` string, nullable, required
  - `source_account_code` string, nullable, required
  - `source_account_name` string, nullable
  - `source_employee_name` string, nullable, required
  - `source_department` string, nullable, required
  - `source_tax_amount` number, nullable
  - `category` string, nullable, required
  - `subgroup_key` string, nullable, required
  - `activity_id` integer, nullable, required
  - `eligibility` string, required
  - `rd_percentage` number, nullable, required
  - `rd_amount` number, nullable, required
  - `manual_override` boolean, required
  - `manual_override_by_admin` boolean, nullable
  - `auto_categorised` boolean
  - `import_source_type` string, nullable
  - `open_query_count` integer
  - `apportionments` ApportionmentOut[]
    - `activity_id` integer, required
    - `activity_name` string, nullable
    - `percentage` number, required
  - `refund_of_item_id` integer, nullable
  - `refund_of_item_name` string, nullable
  - `distribution_linked` boolean
  - `distribution_link_source` string, nullable
  - `distribution_scope` string, nullable

## Other responses

- `422`: Validation Error

---

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