[POST] .../v1/docopeningbalance/edit
Edits opening settlement document with partner. Use this method to patch an unposted opening partner balance document while it is locked for the current edit operation. The request body is required, id is required, the caller needs the opening balance edit permission and only positive patch values are written; if no editable values are supplied the persistent layer returns ErrorResult 1004. The document must exist, must not be deleted and must not be posted; unchanged, missing, posted or otherwise unavailable rows return ErrorResult 1009. The response returns row_affected and fires the DocOpeningBalanceEdited webhook; business errors such as missing body, invalid id, denied access, no changes, invalid exchange_rate or database failures are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| credit | Decimal | Optional | New credit amount value with up to 3 decimal places. Values less than or equal to 0 leave the existing credit unchanged. |
| currency_id | Int64 | Optional | New currency ID. Values less than or equal to 0 leave the existing currency unchanged. |
| date | Int64 | Optional | New document date as Unix time in seconds. Values less than or equal to 0 leave the existing date unchanged. |
| debit | Decimal | Optional | New debit amount value with up to 3 decimal places. Values less than or equal to 0 leave the existing debit unchanged. |
| exchange_rate | Decimal | Optional | New exchange rate relative to the base currency. For the base currency the server stores 1; positive non-base values must fit decimal(18,8). |
| firm_id | Int64 | Optional | New company ID. Values less than or equal to 0 leave the existing company unchanged. |
| id | Int64 | Required | Required opening partner balance document ID. |
| partner_id | Int64 | Optional | New partner ID. Values less than or equal to 0 leave the existing partner unchanged. |
Request Example
{
"id": 26,
"date": 1712016000,
"debit": 1300000.000,
"credit": 275000.000,
"exchange_rate": 1.00000000,
"currency_id": 1
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1
}
}