[POST] .../v1/techmapoperation/add
Creates tech map operation. Use this method to add one or more component item rows to a technological map document before the document is posted. The request body is an object containing document_id and a data array; every data item must contain item_id and positive quantity, data must contain 1 through 250 rows and part_cost is validated as 0 through 100 when the parent tech map does not autocalculate cost shares. Production must be enabled, the parent document must exist and be locked by the current user, operation items must be simple non-deleted items and assemblable, disassemblable, compound or child-item products are rejected. The response returns row_affected and ids for created rows and the current request user must have tech map operation add permission; missing body, invalid document or data fields, disabled production, denied access, item validation failures, lock conflicts, posted documents and storage failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| data | Array of TechMapOperationAddData | Required | Operations to create. |
| document_id | Int64 | Required | Tech map document ID. |
Request Example
{
"document_id": 7301,
"data": [
{
"item_id": 1001,
"quantity": 2,
"part_cost": 40
},
{
"item_id": 1002,
"quantity": 1,
"part_cost": 60
}
]
}
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,
"ids": [
8301
]
}
}