---
title: "Set the responsibility-center assignments on one journal entry line."
method: POST
path: "/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/UpsertJournalEntryLineCostCenterCommand"
tags: ["PortfolioTransactionCommands"]
---

# Set the responsibility-center assignments on one journal entry line.

`POST /v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/UpsertJournalEntryLineCostCenterCommand`

## Request

- Base URL: `https://api.tokenbooks.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tokenbooks.io/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/UpsertJournalEntryLineCostCenterCommand`
- Auth: API key in header `x-api-key`

## Path parameters

- `transactionId` string, required
- `portfolioSlug` string, required

## Query parameters

- `mode` 'sync' | 'async'

## Request body

- object
  - `lineNumber` integer, required
  - `responsibilityCenterAssignments` object[], required
    - `responsibilityCenterTypeId` string, required
    - `responsibilityCenterId` string, required
    - `percentageBps` integer, required

## Response `200`

- CommandResultDto
  - `mode` 'sync' | 'async', required: Whether the command ran sync or async
  - `result` union: The command result, present for synchronous commands
    - object
      - `success` true, required
      - `data` unknown
    - object
      - `success` false, required
      - `error` object, required
        - `name` string, required: The class name of the error
        - `message` string, required: The error message
        - `body` union, required: The error body, usually fields needed to reconstruct the specific error fields
          - object
            - `usageType` string, required
            - `currentUsage` number, required
            - `limit` number, required
          - unknown
  - `jobId` string: Tracking job id, present for asynchronous commands
  - `status` 'queued': Queue status, present for asynchronous commands

---

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