Edit

[POST] .../v1/docreturnstopartner/edit

Edits partner return document. Use this method to update an existing return-to-partner document header before it is posted. The request body must contain id; optional fields update only provided values, contract_id and attached_user_id can be reset with 0 and description is limited to 300 characters. The document must be locked by the current request user and editable, stock access and closed-period rules are enforced, attached_user_id must reference an existing user when assigned and contract/currency combinations must remain valid; missing id, no changed fields, denied access, lock conflicts, posted or deleted documents, period, contract, currency, stock access, database, webhook or persistence errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
attached_user_id Int64 Optional Responsible user ID. Null means no change, 0 clears the responsible user and a positive value assigns that user.
contract_id Int64 Optional Contract ID. Null means no change, 0 clears the contract and a positive value assigns that contract.
currency_id Int64 Optional Currency ID. If 0, the stored currency is not changed; when changed with a contract, the currency must match the contract currency.
date Int64 Optional Return-to-partner document date as Unix time in seconds. If 0, the stored date is not changed.
description String Optional Additional description. Maximum length is 300 characters; null means no change.
exchange_rate Decimal Optional Exchange rate. If 0, the stored rate is not changed unless currency_id is changed; negative values are invalid.
id Int64 Required Return-to-partner document ID.
partner_id Int64 Optional Partner ID. If 0, the stored partner is not changed.
stock_id Int64 Optional Stock ID. If 0, the stored stock is not changed.
vat_calculation_type String Optional VAT calculation mode: No - do not accrue, Exclude - included in the amount, Include - added on top. Allowed values: No, Exclude, Include.

Request Example

{
  "id": 4401,
  "date": 1767229200,
  "partner_id": 301,
  "stock_id": 11,
  "currency_id": 1,
  "exchange_rate": 1,
  "vat_calculation_type": "Exclude",
  "attached_user_id": 5,
  "description": "Adjusted supplier return header"
}

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
  }
}