# List accounting scripts V2 List existing accounting scripts for your organization. # 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": { "AccountingAccountAccountSctiptPost": { "required": [ "description", "account" ], "type": "object", "properties": { "description": { "type": "string", "description": "Description that helps to identify the accounting account. Can be `0` or any value if there's no corresponding account.", "maximum": 100 }, "account": { "type": "string", "description": "Accounting account number. Can be `0` or any value if there's no corresponding account.", "maximum": 50 } }, "example": { "description": "SAMPLE ACCOUNT", "account": "123123132-x" } }, "AccountingScriptBucket": { "type": "object", "properties": { "name": { "type": "string", "description": "Bucket name", "example": "bacen_pre_2039" }, "account": { "type": "integer", "format": "int64", "description": "Account ID", "example": 123456 } } }, "AccountingScriptParameters": { "required": [ "name", "value" ], "type": "object", "properties": { "name": { "type": "string", "description": "Parameter name [pismo:timing or bacen:classification]", "example": "pismo:timing" }, "value": { "type": "string", "description": "Parameter value [REGULAR, DUEDATE, TRUE, or 3]", "example": "REGULAR, DUEDATE" } } }, "AccountingScriptV2": { "type": "object", "properties": { "cash_in_bucket": { "$ref": "#/components/schemas/AccountingScriptBucket" }, "cash_out_bucket": { "$ref": "#/components/schemas/AccountingScriptBucket" }, "credit_accounting": { "$ref": "#/components/schemas/AccountingAccountAccountSctiptPost" }, "cost_center": { "$ref": "#/components/schemas/CostCenterAccountingScriptPost" }, "debit_accounting": { "$ref": "#/components/schemas/AccountingAccountAccountSctiptPost" }, "entry_type_id": { "type": "integer", "format": "int64", "description": "Entry type ID" }, "event_type_id": { "type": "integer", "format": "int64", "description": "Event type ID" }, "expression": { "type": "string", "description": "Expression to calculate the value of the accounting entry. \nIt can be a simple mathematical expression or a more complex one using functions.\n" }, "fee_information": { "type": "object", "description": "Information about the fee applied to the accounting entry.\nIt can include details such as fee type, amount, and currency.\n" }, "history": { "$ref": "#/components/schemas/History" }, "id": { "type": "integer", "format": "int64", "description": "Accounting script ID" }, "is_database_stage": { "type": "string", "description": "Indicates if the accounting script is for a database stage.\nIf yes, the script is used for testing purposes and does not affect production data.\n", "default": "no", "example": "yes" }, "max_days_due": { "type": "integer", "format": "int64", "description": "Maximum number of days for the due date", "example": 90 }, "min_days_due": { "type": "integer", "format": "int64", "description": "Minimum number of days for the due date", "example": 30 }, "parameters": { "$ref": "#/components/schemas/AccountingScriptParameters" }, "processing_code": { "type": "string", "description": "Processing code" }, "program_id": { "type": "integer", "format": "int64", "description": "Program ID" } } }, "CostCenterAccountingScriptPost": { "required": [ "debit_org", "credit_org", "debit_cost", "credit_cost" ], "type": "object", "properties": { "debit_org": { "type": "string", "maximum": 50, "description": "Number of your Org’s debit accounting account" }, "credit_org": { "type": "string", "maximum": 50, "description": "Number of your Org’s credit accounting account" }, "debit_cost": { "type": "string", "maximum": 50, "description": "Number of the cost center of the debit accounting account" }, "credit_cost": { "type": "string", "maximum": 50, "description": "Number of the cost center of the credit accounting account" } }, "example": { "debit_org": "999999", "credit_org": "999999", "debit_cost": "999999", "credit_cost": "999999" } }, "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" }, "Page": { "type": "object", "properties": { "has_next": { "type": "boolean", "description": "Indicates if there are more items to be retrieved." }, "items": { "type": "array", "description": "Items retrieved from a given request.", "items": { "type": "object" } } } } }, "parameters": { "pageSize": { "in": "query", "name": "pageSize", "description": "Maximum number of accounting event types per page.", "schema": { "type": "integer" } }, "pageOffset": { "name": "pageOffset", "in": "query", "description": "Number to offset page resuts. For example, value `2` returns the third page. Defaults to `0`, which returns the first page.", "schema": { "type": "integer" } } } }, "tags": [ { "name": "Accounting scripts V2", "description": "Endpoints to manage accounting scripts V2" } ], "paths": { "/v2/accounting-scripts": { "get": { "tags": [ "Accounting scripts V2" ], "summary": "List accounting scripts V2", "operationId": "listAccountingScriptsV2", "description": "List existing accounting scripts for your organization.\n", "parameters": [ { "$ref": "#/components/parameters/pageSize" }, { "$ref": "#/components/parameters/pageOffset" }, { "in": "query", "name": "debitAccountingAccount", "description": "List all accounting scripts related to a debit accounting account", "schema": { "type": "string" } }, { "in": "query", "name": "creditAccountingAccount", "description": "List all accounting scripts related to a credit accounting account", "schema": { "type": "string" } }, { "in": "query", "name": "programId", "description": "List all accounting scripts related to a program", "schema": { "type": "integer", "format": "int64" } }, { "in": "query", "name": "eventTypeId", "description": "List all accounting scripts related to an event type", "schema": { "type": "integer", "format": "int64" } }, { "in": "query", "name": "entryTypeId", "description": "List all accounting scripts related to an entry type", "schema": { "type": "integer", "format": "int64" } }, { "in": "query", "name": "cashInBucketName", "description": "List all accounting scripts related to a cash-in bucket name", "schema": { "type": "integer", "format": "int64" } }, { "in": "query", "name": "cashOutBucketName", "description": "List all accounting scripts related to a cash-out bucket name", "schema": { "type": "integer", "format": "int64" } }, { "in": "query", "name": "isStage", "description": "List all accounting scripts in production or staging environment", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/Page" }, { "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/AccountingScriptV2" } } } } ] } } } }, "400": { "description": "Bad request" } }, "deprecated": false } } } } ```