# Update accounting scripts V1 Update accounting scripts. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Core platform - Accounting", "version": "1.0.0", "description": "API used to manage the accounting context", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io/accounting", "description": "Sandbox API server for testing" } ], "components": { "schemas": { "AccountingScriptPatch": { "type": "object", "properties": { "debit_account_number": { "type": "string", "description": "Debit account accounting number" }, "credit_account_number": { "type": "string", "description": "Credit account accounting number" }, "debit_cost": { "type": "string", "description": "Debit cost center" }, "credit_cost": { "type": "string", "description": "Credit cost center" } } }, "AccountingScriptPatchResponse": { "type": "object", "additionalProperties": { "type": "object", "properties": { "has_error": { "description": "Indicates whether an error occurred during the update process.", "type": "boolean" }, "error_message": { "description": "Provides a detailed description of the error encountered, if any.", "type": "string" }, "new_id": { "type": "integer", "format": "int64", "description": "Unique identifier of the newly created accounting script. (The old one will be deactivated)" } } } }, "BatchAccountingScriptPatch": { "type": "object", "properties": { "operations": { "type": "array", "items": { "properties": { "accounting_script_id": { "type": "integer", "format": "int64", "description": "Accounting script ID" }, "set": { "$ref": "#/components/schemas/AccountingScriptPatch" } } } } } } } }, "tags": [ { "name": "Accounting scripts V1", "description": "Endpoints to manage accounting scripts V1" } ], "paths": { "/v1/accounting-scripts/batch": { "patch": { "operationId": "BatchUpdateAccountingScript", "summary": "Update accounting scripts V1", "description": "Update accounting scripts.\n", "tags": [ "Accounting scripts V1" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BatchAccountingScriptPatch" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountingScriptPatchResponse" }, "example": { "393028": { "has_error": false, "new_id": 403948 } } } } }, "400": { "description": "Bad request - invalid parameter", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountingScriptPatchResponse" }, "example": { "393028": { "has_error": true, "error_message": "Debit account not found" } } } } } } } } } } ```