v1

latestOpenAPI 3.1.0Copyright Pismo2026-07-247702,7523.1 MB
Accounting scripts V2

Create accounting script V2

Create an accounting script.

Refer to the How to create accounting script guide for more information.

post/v2/accounting-scripts

Request body

expressionstring required

Expression to calculate the value of the accounting entry. It can be a simple mathematical expression or a more complex one using functions.

event_type_idinteger

Event type ID

except_program_idsinteger[]
fee_informationobject

Information about the fee applied to the accounting entry. It can include details such as fee type, amount, and currency.

is_database_stagestring

Is this accounting script for database staging? If yes, the script is used for testing purposes and does not affect production data.

max_days_dueinteger

Maximum number of days for the due date

min_days_dueinteger

Minimum number of days for the due date

processing_codestring

Processing code

program_idinteger

Program ID

program_list_idinteger[]
program_typesstring[]
reasonstring

Reason for the operation.

responsiblestring

User name or ID of the person performing the operation.

Example request

{
  "credit_accounting": {
    "description": "SAMPLE ACCOUNT",
    "account": "123123132-x"
  },
  "debit_accounting": {
    "description": "SAMPLE ACCOUNT",
    "account": "123123132-x"
  },
  "entry_type_id": {
    "id": 101,
    "description": "CREDIT",
    "type": "DUE_DATE",
    "reason": "Creation of a new entry type configuration.",
    "responsible": "John Doe"
  },
  "cash_in_bucket": {
    "name": "bacen_pre_2039",
    "account": 123456
  },
  "cash_out_bucket": {
    "name": "bacen_pre_2039",
    "account": 123456
  },
  "cost_center": {
    "debit_org": "999999",
    "credit_org": "999999",
    "debit_cost": "999999",
    "credit_cost": "999999"
  },
  "except_program_ids": [
    78,
    91
  ],
  "is_database_stage": "yes",
  "max_days_due": 90,
  "min_days_due": 30,
  "parameters": {
    "name": "pismo:timing",
    "value": "REGULAR, DUEDATE"
  },
  "program_list_id": [
    12,
    34,
    56
  ],
  "program_types": [
    "CREDIT",
    "DEBIT"
  ],
  "reason": "Creation of a new entry type configuration.",
  "responsible": "John Doe"
}

Response

Created

idinteger

Accounting script ID

program_idinteger

Program ID

event_type_idinteger

Event type ID

entry_type_idinteger

Entry type ID

processing_codestring

Processing code

expressionstring

Expression to calculate the value of the accounting entry. It can be a simple mathematical expression or a more complex one using functions.

fee_informationobject

Information about the fee applied to the accounting entry. It can include details such as fee type, amount, and currency.

is_database_stagestring

Indicates if the accounting script is for a database stage. If yes, the script is used for testing purposes and does not affect production data.

min_days_dueinteger

Minimum number of days for the due date

max_days_dueinteger

Maximum number of days for the due date

Example response

[
  {
    "debit_accounting": {
      "description": "SAMPLE ACCOUNT",
      "account": "123123132-x"
    },
    "credit_accounting": {
      "description": "SAMPLE ACCOUNT",
      "account": "123123132-x"
    },
    "cost_center": {
      "debit_org": "999999",
      "credit_org": "999999",
      "debit_cost": "999999",
      "credit_cost": "999999"
    },
    "parameters": {
      "name": "pismo:timing",
      "value": "REGULAR, DUEDATE"
    },
    "cash_in_bucket": {
      "name": "bacen_pre_2039",
      "account": 123456
    },
    "cash_out_bucket": {
      "name": "bacen_pre_2039",
      "account": 123456
    },
    "is_database_stage": "yes",
    "min_days_due": 30,
    "max_days_due": 90,
    "history": {
      "org_id": "TN-cc8f8b89-233a-4582-9f36-63ee85278d6d",
      "action": "Created",
      "reason": "Creation of a new entry type configuration.",
      "responsible": "John Doe",
      "version": 1,
      "jsonb": "{\"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": "2021-10-10T10:10:00Z"
    }
  }
]