---
title: "Bulk Set Item Apportionments By Ids"
method: POST
path: "/claims/{claim_id}/expenditures/items/bulk-apportionments-by-ids"
tags: ["expenditures"]
---

# Bulk Set Item Apportionments By Ids

`POST /claims/{claim_id}/expenditures/items/bulk-apportionments-by-ids`

## 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/bulk-apportionments-by-ids`
- Auth: none declared

Replace the R&D-activity split on every live item in ``item_ids`` with the
same ``apportionments``. Each changed item is flipped to R&D-eligible and gets
``manual_override=True``.

Mirrors :func:`bulk_update_items_by_ids` for auth/scoping: the
``claim_id``-scoped query is the authorization boundary (ids on another claim
match nothing). Synthetic salary ids and real salary-category rows are skipped
(employees are apportioned on the Salary tab), as are already-removed,
linked refund rows (derived — they follow their original via the mirror), or
unknown ids — so ``updated_count`` reflects only real changes. Items whose
split already equals the requested one are left untouched (idempotent).

## Path parameters

- `claim_id` integer, required

## Request body

- BulkSetApportionmentsByIdsRequest: Apply the same R&D-activity split to an explicit list of item ids. Backs the All-expenses "Set R&D split" button and the per-subgroup menu option (the frontend resolves a subgroup to its item ids). A non-empty ``apportionments`` list flips every matched item to R&D-eligible, matching the single-item PUT endpoint — clearing a split is the eligibility menu's job, so an empty list is rejected here.
  - `item_ids` integer[], required
  - `apportionments` ItemApportionmentInput[], required
    - `activity_id` integer, required
    - `percentage` union, required
      - number
      - string

## Response `200`

Successful Response

- BulkUpdateResponse
  - `updated_count` integer, required

## 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)
