---
title: "Update accounting scripts V1"
method: PATCH
path: "/v1/accounting-scripts/batch"
tags: ["Accounting scripts V1"]
---

# Update accounting scripts V1

`PATCH /v1/accounting-scripts/batch`

## Request

- Base URL: `https://sandbox.pismolabs.io/accounting`
- URL: `https://sandbox.pismolabs.io/accounting/v1/accounting-scripts/batch`
- Auth: HTTP bearer

Update accounting scripts.

## Request body

- BatchAccountingScriptPatch
  - `operations` object[]
    - `accounting_script_id` integer: Accounting script ID
    - `set` AccountingScriptPatch: Fields to update on an accounting script. At least one recognized field with a non-zero/non-empty value MUST be provided; otherwise the API returns 400 with `ErrNoChangesProvided` (PISMO-376794 silent-clone guard). Unknown JSON fields are silently ignored by the decoder, so a body composed exclusively of unknown fields is treated as "no changes provided".
      - `debit_accounting_account_id` integer: Debit accounting account ID
      - `credit_accounting_account_id` integer: Credit accounting account ID
      - `debit_cost` string: Debit cost center
      - `credit_cost` string: Credit cost center
      - `entry_name` string: New entry name (e.g., "amount", "interest", "iof"). Must match the allow-list from `POST /v1/accounting-scripts`.

## Response `200`

OK

- AccountingScriptPatchResponse

## Other responses

- `400`: Bad request — validation failure, any operation error other than not-found/deactivated, or no changes provided in any operation payload (PISMO-376794). When the body itself fails to deserialize because a field was sent with the wrong JSON type, the response is the shared `V1BindTypeMismatchError` shape (`error`, `cid`, `invalid_field`) instead of the per-item map below.
- `404`: Every failing operation targets a missing or deactivated accounting script
- `500`: Internal server error (client receives generic "something went wrong")

---

[API](https://skmtc.dev/pismo/apis/core-platform-accounting.md) - [All operations](https://skmtc.dev/pismo/apis/core-platform-accounting/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/core-platform-accounting/revisions/fdb645c3e65c?raw)
