Edit

[POST] .../v1/doctechmap/edit

Edits document tech map. Use this method to update technological map header fields before posting, for example date, item_id or autocalculate_part_cost. The request body must contain id; optional fields update only when their change marker is present: date 0 means no change, item_id 0 means no change and autocalculate_part_cost null means no change. Production must be enabled, the document must be locked by the current user, unposted and not deleted and the target item must still match the document's tech map type. The current request user must have tech map edit permission; missing body, invalid id, disabled production, missing update fields, item validation failures, denied access, lock conflicts, posted documents or storage failures are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
autocalculate_part_cost Boolean Optional Automatic operation cost share calculation state: true - percentages in operations are calculated automatically, false - percentages are not calculated automatically.
date Int64 Optional Document date as Unix time in seconds. If 0, the stored date is not changed.
id Int64 Required Tech map document ID.
item_id Int64 Optional Item ID. If 0, the stored item is not changed.

Request Example

{
  "id": 7301,
  "date": 1767229200,
  "item_id": 2001,
  "autocalculate_part_cost": false
}

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