# Update accounting script V1 Update accounting script. # 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" } } }, "AccountingScriptSinglePatchResponse": { "type": "object", "properties": { "new_id": { "type": "integer", "format": "int64", "description": "Unique identifier of the newly created accounting script. (The old one will be deactivated)" } } } } }, "tags": [ { "name": "Accounting scripts V1", "description": "Endpoints to manage accounting scripts V1" } ], "paths": { "/v1/accounting-scripts/{accountingScriptId}": { "patch": { "operationId": "UpdateAccountingScript", "summary": "Update accounting script V1", "description": "Update accounting script.\n", "tags": [ "Accounting scripts V1" ], "parameters": [ { "in": "path", "name": "accountingScriptId", "schema": { "type": "integer", "format": "int64" }, "required": true, "description": "Accounting script ID" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountingScriptPatch" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountingScriptSinglePatchResponse" }, "example": { "new_id": 403948 } } } }, "400": { "description": "Bad request - invalid parameter", "content": { "application/json": { "example": { "message": "Debit account not found" } } } } } } } } } ```