Edit

[POST] .../v1/doccommercialoffer/edit

Edits commercial offer document. Use this method to update a commercial offer document header before changing or sending its rows. The request requires the commercial offer edit permission and the commercial offer tariff option; id is required, the document must exist, must not be deleted and must satisfy the document lock contract for the current workflow. The method can change date, partner, currency, exchange rate, VAT calculation type, description and responsible user; setting attached_user_id to 0 clears the responsible user. Business errors such as missing body, invalid id, denied access, disabled tariff option, document not found, lock failure, unknown currency, invalid exchange rate, no editable fields, no affected row, database failures or action log failures are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
attached_user_id Int64 Optional Responsible user ID.
currency_id Int64 Optional Commercial offer document currency ID.
date Int64 Optional Commercial offer document date as Unix time in seconds.
description String Optional Additional description.
exchange_rate Decimal Optional Exchange rate.
id Int64 Required Commercial offer document ID.
partner_id Int64 Optional Partner ID.
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

{
  "attached_user_id": 1,
  "currency_id": 1,
  "date": 1,
  "description": "string",
  "exchange_rate": 1.0,
  "id": 1,
  "partner_id": 1,
  "vat_calculation_type": "No"
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "ids": [
      null
    ],
    "row_affected": 1
  }
}