[POST] .../v1/docwholesale/edit
Edits partner shipment document. Use this method to update an existing shipment-to-partner document header before it is posted. The request body must contain id; optional fields update only provided values, contract_id, attached_user_id, seller_id and price_type_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, the tariff option must be enabled, stock access and closed-period rules are enforced and contract/currency combinations must remain valid; missing id, no changed fields, denied access, lock conflicts, posted or deleted documents, tariff, period, contract, currency, stock access, database or webhook/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 | Shipment-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 | Shipment-to-partner document ID. |
| partner_id | Int64 | Optional | Partner ID. If 0, the stored partner is not changed. |
| price_type_id | Int64 | Optional | Price type ID. Null means no change, 0 clears the price type and a positive value assigns that price type. |
| seller_id | Int64 | Optional | Seller user ID. Null means no change, 0 clears the seller and a positive value assigns that user. |
| 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": 5601,
"date": 1767229200,
"partner_id": 301,
"stock_id": 11,
"currency_id": 1,
"exchange_rate": 1,
"vat_calculation_type": "Exclude",
"attached_user_id": 5,
"seller_id": 6,
"price_type_id": 7,
"description": "Adjusted shipment 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
}
}