# Update accounting entry type Update a specific accounting entry type by its ID. # 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": { "EntryType": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/EntryTypeID" }, "description": { "$ref": "#/components/schemas/EntryTypeDescription" }, "type": { "$ref": "#/components/schemas/EntryTypeType" }, "org_id": { "$ref": "#/components/schemas/OrgID" }, "history": { "$ref": "#/components/schemas/History" } } }, "EntryTypeDescription": { "type": "string", "maximum": 250, "description": "Entry type description.", "example": "CREDIT" }, "EntryTypeID": { "type": "integer", "format": "int64", "description": "Entry type ID", "example": 101 }, "EntryTypePatch": { "required": [ "reason" ], "type": "object", "properties": { "description": { "$ref": "#/components/schemas/EntryTypeDescription" }, "type": { "$ref": "#/components/schemas/EntryTypeType" }, "reason": { "$ref": "#/components/schemas/HistoryReason" }, "responsible": { "$ref": "#/components/schemas/HistoryResponsible" } }, "example": { "description": "DEBIT", "type": "CREATION", "reason": "Updating accounting entry type configuration.", "responsible": "John Doe" } }, "EntryTypeType": { "type": "string", "maximum": 100, "description": "Set the entry type:\n\n* `CREATION`: Default value for new entries. Also, this value is assumed when type is not provided.\n* `DUE_DATE`: Used only with a credit program to indicate a due date entry.\n", "enum": [ "DUE_DATE", "CREATION" ], "example": "DUE_DATE" }, "History": { "type": "object", "description": "Historical information for auditing the entity.", "properties": { "org_id": { "$ref": "#/components/schemas/OrgID" }, "action": { "type": "string", "description": "Action performed on the entity.", "example": "Created" }, "reason": { "$ref": "#/components/schemas/HistoryReason" }, "responsible": { "$ref": "#/components/schemas/HistoryResponsible" }, "version": { "type": "integer", "format": "int64", "description": "Entity version.", "example": 1 }, "jsonb": { "type": "string", "description": "JSON representation of the request body.", "example": "{\"id\": 101, \"description\": \"CREDIT\", \"type\": \"DUE_DATE\", \"reason\": \"Creation of a new entry type configuration.\", \"responsible\": \"John Doe\", \"created_at\": \"2021-10-10T10:10:00Z\"}" }, "created_at": { "type": "string", "format": "date-time", "description": "Date and time when the history was created (ISO 8601). Format: YYYY-MM-DDThh:mm:ssZ.", "example": "2021-10-10T10:10:00Z" } } }, "HistoryReason": { "type": "string", "maximum": 250, "description": "Reason for the operation.", "example": "Creation of a new entry type configuration." }, "HistoryResponsible": { "type": "string", "maximum": 100, "description": "User name or ID of the person performing the operation.", "example": "John Doe" }, "OrgID": { "type": "string", "description": "Organization ID", "example": "TN-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" } } }, "tags": [ { "name": "Accounting entry types", "description": "Endpoints to manage accounting entry types" } ], "paths": { "/v2/entry-types/{entryTypeId}": { "patch": { "operationId": "UpdateEntryTypeV2", "summary": "Update accounting entry type", "description": "Update a specific accounting entry type by its ID.", "tags": [ "Accounting entry types" ], "parameters": [ { "in": "path", "name": "entryTypeId", "schema": { "type": "integer", "format": "int64" }, "required": true, "description": "Numeric entry type ID" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EntryTypePatch" } } } }, "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/EntryType" } } } } }, "400": { "description": "Bad request when a provided parameter is invalid" }, "404": { "description": "Entry type not found" }, "500": { "description": "Internal server error" } } } } } } ```