Skip to content

Accounting API ​

由 scripts/generate-api-docs.ts 自动生成 —— 请勿手改 共 8 个端点

GET /orgs/{organizationId}/accounting/periods ​

本组织的期间列表(最新在前)

请求参数 ​

参数名位置类型必填说明
organizationIdpathstring✅

响应 ​

状态码说明
200

GET /orgs/{organizationId}/accounting/periods/{periodId} ​

期间详情(状态 / 币种 / 重开次数)

请求参数 ​

参数名位置类型必填说明
organizationIdpathstring✅
periodIdpathstring✅

响应 ​

状态码说明
200

GET /orgs/{organizationId}/accounting/periods/{periodId}/balance ​

科目余额与借贷款(试算平衡表)

请求参数 ​

参数名位置类型必填说明
organizationIdpathstring✅
periodIdpathstring✅

响应 ​

状态码说明
200

POST /orgs/{organizationId}/accounting/periods/{periodId}/close ​

关账(已关闭时幂等返回)

请求参数 ​

参数名位置类型必填说明
organizationIdpathstring✅
periodIdpathstring✅

请求体 ​

json
{
  "$ref": "#/components/schemas/ClosePeriodDto"
}

响应 ​

状态码说明
201

GET /orgs/{organizationId}/accounting/periods/{periodId}/entries ​

期间内的分录

请求参数 ​

参数名位置类型必填说明
organizationIdpathstring✅
periodIdpathstring✅

响应 ​

状态码说明
200

POST /orgs/{organizationId}/accounting/periods/{periodId}/reopen ​

重开期间(必须给原因;reopenCount +1)

请求参数 ​

参数名位置类型必填说明
organizationIdpathstring✅
periodIdpathstring✅

请求体 ​

json
{
  "$ref": "#/components/schemas/ReopenPeriodDto"
}

响应 ​

状态码说明
201

POST /orgs/{organizationId}/accounting/periods/{periodId}/verify ​

校验期间借贷平衡(I2);不平返回 409

请求参数 ​

参数名位置类型必填说明
organizationIdpathstring✅
periodIdpathstring✅

响应 ​

状态码说明
201

POST /orgs/{organizationId}/accounting/periods/open ​

开期间(幂等)

请求参数 ​

参数名位置类型必填说明
organizationIdpathstring✅

请求体 ​

json
{
  "$ref": "#/components/schemas/OpenPeriodDto"
}

响应 ​

状态码说明
201

Released under the MIT License.