---
updatedAt: 2026-04-30T23:09:33.000Z
---

Fetch the complete documentation index at: https://developers.pismo.io/pismo-docs/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Get accounting script V2

Get a specific accounting script 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": {
      "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": {
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Accounting script ID"
          },
          "program_id": {
            "type": "integer",
            "format": "int64",
            "description": "Program ID"
          },
          "event_type_id": {
            "type": "integer",
            "format": "int64",
            "description": "Event type ID"
          },
          "entry_type_id": {
            "type": "integer",
            "format": "int64",
            "description": "Entry type ID"
          },
          "debit_accounting": {
            "$ref": "#/components/schemas/AccountingAccountAccountSctiptPost"
          },
          "credit_accounting": {
            "$ref": "#/components/schemas/AccountingAccountAccountSctiptPost"
          },
          "cost_center": {
            "$ref": "#/components/schemas/CostCenterAccountingScriptPost"
          },
          "processing_code": {
            "type": "string",
            "description": "Processing code"
          },
          "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"
          },
          "parameters": {
            "$ref": "#/components/schemas/AccountingScriptParameters"
          },
          "cash_in_bucket": {
            "$ref": "#/components/schemas/AccountingScriptBucket"
          },
          "cash_out_bucket": {
            "$ref": "#/components/schemas/AccountingScriptBucket"
          },
          "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"
          },
          "min_days_due": {
            "type": "integer",
            "format": "int64",
            "description": "Minimum number of days for the due date",
            "example": 30
          },
          "max_days_due": {
            "type": "integer",
            "format": "int64",
            "description": "Maximum number of days for the due date",
            "example": 90
          },
          "history": {
            "$ref": "#/components/schemas/History"
          }
        }
      },
      "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"
      }
    }
  },
  "tags": [
    {
      "name": "Accounting scripts V2",
      "description": "Endpoints to manage accounting scripts V2"
    }
  ],
  "paths": {
    "/v2/accounting-scripts/{accountingScriptId}": {
      "get": {
        "tags": [
          "Accounting scripts V2"
        ],
        "summary": "Get accounting script V2",
        "operationId": "getAccountingScriptByIdV2",
        "description": "Get a specific accounting script by its ID.\n",
        "parameters": [
          {
            "in": "path",
            "name": "accountingScriptId",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "required": true,
            "description": "Accounting script ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Accounting script found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountingScriptV2"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        },
        "deprecated": false
      }
    }
  }
}
```