[POST] .../v1/doctechmap/add
Creates a new document tech map. Use this method to create a technological map document for an assemblable or disassemblable item before adding component rows with TechMapOperation/Add. The request body must contain date, type, item_id and firm_id; autocalculate_part_cost is optional and controls whether operation cost shares are recalculated automatically by the database function. Production must be enabled, the selected item must exist and match the requested tech map type and the current request user must have tech map add permission. Missing body, disabled production, invalid required fields, item type conflicts, denied access, unavailable tariff, foreign-key failures, database failures or webhook 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 | Required | Document date as Unix time in seconds. |
| firm_id | Int64 | Required | Company ID. |
| item_id | Int64 | Required | Item ID. |
| type | String | Required | Tech map type: Assemblable - assembly, Disassemblable - disassembly. Allowed values: Default, Assemblable, Disassemblable. |
Request Example
{
"date": 1767225600,
"type": "Assemblable",
"item_id": 2001,
"firm_id": 1,
"autocalculate_part_cost": true
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Insert | Created record result. |
Response Example
{
"ok": true,
"result": {
"new_id": 7301
}
}