---
title: "Replace all splits for a transaction"
method: PUT
path: "/companies/{companyId}/transactions/{id}/splits"
tags: ["Transactions"]
---

# Replace all splits for a transaction

`PUT /companies/{companyId}/transactions/{id}/splits`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/transactions/{id}/splits`
- Auth: HTTP bearer

## Request body

- ReplaceSplitsInput
  - `splits` object[], required
    - `glAccountId` string, uuid, required
    - `classId` string, uuid, nullable: Optional split class. Omit to derive from the parent transaction class; set null for intentionally unassigned.
    - `amountCents` integer, required
    - `memo` string

## Response `200`

Splits replaced

- TransactionSplitsListResponse
  - `success` boolean
  - `data` TransactionSplit[]
    - `id` string, uuid
    - `transactionId` string, uuid
    - `glAccountId` string, uuid
    - `classId` string, uuid, nullable: Line-level class dimension. Customer-facing responses include this field only when CUSTOMER_APP_INTELLIGENCE_HOME_COMPANY_IDS allowlists the company.
    - `amountCents` integer
    - `currency` string
    - `memo` string, nullable

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Transaction not found
- `422`: Validation or business rule error

---

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