Referencia de APIAccounting / Chart Of Accounts
Update Chart Of Accounts
← Back to full API reference
PATCH
/v1/chart-of-accountsAuth required- Requires organization permissions for this resource.
- Validated by Zod schema: patchChartAccount.
Request details
Body fields
| Field | Required | Description |
|---|---|---|
| id | Yes | Type: number |
| name | No | Type: string |
| code | No | Type: string |
| type | No | z.enum without literal array values |
| category | No | Type: enumExample: REAL |
| parentAccountId | No | Type: number |
| description | No | Type: string |
| isActive | No | Type: boolean |
| dataSources | No | Type: arrayExample: |
| dataSources[] | Yes | Type: object |
| dataSources[].id | No | Type: string |
| dataSources[].type | Yes | Type: enumExample: INVOICES |
| dataSources[].operation | Yes | Type: enumExample: ADD |
| dataSources[].config | No | Type: object |
| dataSources[].config.multiplier | No | Type: numberExample: 1 |
| dataSources[].config.invoice | No | Type: object |
| dataSources[].config.invoice.sourceField | Yes | Type: enumExample: amount |
| dataSources[].config.invoice.isSell | Yes | Type: boolean |
| dataSources[].config.invoice.states | No | Type: arrayExample: |
| dataSources[].config.invoice.states[] | Yes | z.enum without literal array values |
| dataSources[].config.resources | No | Type: object |
| dataSources[].config.resources.ids | No | Type: arrayExample: |
| dataSources[].config.resources.ids[] | Yes | Type: number |
| dataSources[].config.resources.types | No | Type: arrayExample: |
| dataSources[].config.resources.types[] | Yes | Enum-like validator generated by zodFromObj |
| dataSources[].config.chartAccounts | No | Type: object |
| dataSources[].config.chartAccounts.ids | No | Type: arrayExample: |
| dataSources[].config.chartAccounts.ids[] | Yes | Type: number |
| dataSources[].config.accountBalances | No | Type: object |
| dataSources[].config.accountBalances.excludeAccountIds | No | Type: arrayExample: |
| dataSources[].config.accountBalances.excludeAccountIds[] | Yes | Type: number |
| dataSources[].config.commissions | No | Type: object |
| dataSources[].config.commissions.isSell | No | Type: boolean |
| dataSources[].config.payrollBenefits | No | Type: object |
| dataSources[].config.payrollBenefits.sourceField | No | Type: enumExample: total |
| dataSources[].config.manual | No | Type: object |
| dataSources[].config.manual.amount | No | Type: number |
Default payloads
Path params
json
{}Query
json
{}Body
json
{
"id": 1
}Sample response
json
{}