更新时间:2025-11-21 GMT+08:00
分享

创建BOM(ProductTrees)

接口地址

/b1s/v1/ProductTrees

接口API功能描述

创建BOM

调用方式

POST

请求体参数

参数名称

参数说明

上级参数

参数类型

是否必填

TreeCode

BOM编码

  

string

ProductDescription

产品描述

  

sring

ProductTreeLines

产品行

  

list<object>

ItemCode

物料编码

ProductTreeLines

string

...

根据实际业务需求,传入所需参数

  

...

...

请求体样例:

{
    "TreeCode": "test1234",
    "ProductTreeLines": [
        {
            "ItemCode": "LM4029MC"
        }
    ]
}

请求头参数

参数名称

参数说明

Cookie

登录时获取的sessionid,值格式为 “B1SESSION=获取的sessionid”

返回参数

参数名称

上级参数

参数描述

参数类型

参数说明

TreeCode

  

BOM编码

string

  

ProductDescription

  

产品描述

string

  

ProductTreeLines

  

产品行

list<string>

  

...

           

响应体样例:

{
    "odata.metadata": "https://api-service.sperp.myhuaweicloud.com/b1s/v1/$metadata#ProductTrees/@Element",
    "TreeCode": "test1234",
    "TreeType": "iProductionTree",
    "Quantity": 1.0,
    "DistributionRule": null,
    "Project": null,
    "DistributionRule2": null,
    "DistributionRule3": null,
    "DistributionRule4": null,
    "DistributionRule5": null,
    "PriceList": 1,
    "Warehouse": "01",
    "PlanAvgProdSize": 1.0,
    "HideBOMComponentsInPrintout": "tNO",
    "ProductDescription": "item1234",
    "U_CZType": null,
    "ProductTreeLines": [
        {
            "ItemCode": "LM4029MC",
            "Quantity": 1.0,
            "Warehouse": "01",
            "Price": 350.0,
            "Currency": "RMB",
            "IssueMethod": "im_Backflush",
            "InventoryUOM": null,
            "Comment": null,
            "ParentItem": "test1234",
            "PriceList": 1,
            "DistributionRule": null,
            "Project": null,
            "DistributionRule2": null,
            "DistributionRule3": null,
            "DistributionRule4": null,
            "DistributionRule5": null,
            "WipAccount": null,
            "ItemType": "pit_Item",
            "LineText": null,
            "AdditionalQuantity": 0.0,
            "StageID": null,
            "ChildNum": 0,
            "VisualOrder": 0,
            "ItemName": "内存条"
        }
    ],
    "ProductTreeStages": []
}

相关文档