Table of Contents

Bill Of Material

API to submit Bill of Material. Supported method is GET.

url: ~/job_material_bom

JSON structure

Document Header

List of material

JSON Schema

Other reference json schema:object_document

{
  "$id": "https://www.igarment.net/schema/json/v1-0/bill-of-materials",
  "title": "Bill of materials",
  "type": "object",
  "properties": {
      "job_order_ref": { "type": "string", "maxLength": 14 },                               //sales order no 订单编号
      "job_style_ref": { "type": "string", "maxLength": 15 },                               //sales style no 款式编号
      "material_items": {
          "type": "array",
          "items": {
              "type": "object",
              "properties": {
                  "item_no":        { "type": "integer", "exclusiveMinimum": 0 },           //item no, auto increase 项目编号
                  "material_class": { "type": "string", "maxLength": 2 },                   //material class code 物料种类
                  "material_code":  { "type": "string", "maxLength": 24 },                  //material code 物料代码
                  "part_name":      { "type": "string" },                                   //part name 部位
                  "usage_spec":     { "type": "string" },                                   //usage 用途
                  "unit":           { "type": "string", "maxLength": 3 },                   //unit of ucons 用量单位
                  "per_garment":    { "type": "integer" },                                  //ucons of one pcs garment = ucons / per_garment   用量/衣服数量
                  "allowance_percent": { "type": "number" },                                //allowance, if <> 0, ucons is not include allowance 损耗百分比
                  "remark":            { "type": "string" },
                  "userdefs":          { "$ref": "object-document.json#/$defs/userdefs" },  //user define fields 自定义字段
                  "system":            { "$ref": "object-document.json#/$defs/system" },
                  "material_color": {                                  //material color, if color_way is not empty, material_color = '' 物料颜色,如果color_way(配色方案)不为空,物料颜色为空
                      "type": "array",
                      "items": { "type": "string" }
                  },
                  "material_size": {                                   //material size, if size_variance is not empty, material_size = '' 物料规格,如果size_variance(配码)不为空,物料规格为空
                      "type": "array",
                      "items": { "type": "string" }
                  },
                  "u_cons":    { "type": "number" },                   //ucons of material. if size_variance.u_cons is blank,will use this ucons 物料用量。当有配码的时候,如果配码里用量为0,会用这里的ucons
                  //list of colorway
                  "color_way": {
                      "type": "array",
                      "items": {
                          "type": "object",
                          "properties": {
                              "garment_color":  { "type": "string" },  //garment color, should list all color of sales order style 衣服颜色,将会列出订单中的所有衣服颜色
                              "material_color": { "type": "string" }   //material color, if not use the material, set it = * 物料颜色,*表示对应的衣服颜色不使用此物料
                          }
                      }
                  },
                  //list of size variance
                  "size_variance": {
                      "type": "array",
                      "items": {
                          "type": "object",
                          "properties": {
                              "garment_size":  { "type": "string" },   //garment size, can not be blank. 衣服尺码
                              "garment_dim3":  { "type": "string" },   //garment dim3 衣服尺码第三维
                              "material_size": { "type": "string" },   //material size 物料尺码
                              "u_cons":        { "type": "number" }    //ucons of material 物料用量
                          }
                      }
                  },
                  "ship_no_list": {
                      "type": "array",
                      "items": { "type": "integer" }                   //to record which shipment will use the material. 用于记录哪些船期使用此物料
                  }
              },
              "required": [ "item_no",  "material_class", "material_code" ]
          }
      }
  },
  "required": [ "job_order_ref", "job_style_ref", "material_items" ]
}

Attributes can be used in Find method.

document attributes: order_no, style

system attributes: sys_owner, sys_create_date, sys_lm_user, sys_lm_date

Example

GET: ~/job_material_bom/RRR-0003/CHLOE-001

{
  "job_order_ref": "RRR-0003",
  "job_style_ref": "CHLOE-001",
  "material_items": [
      {
          "material_class": "25",
          "material_code": "IML-000244",
          "usage_spec": "",
          "unit": "PCS",
          "per_garment": 1,
          "allowance_percent": 2.0,
          "material_color": "",
          "material_size": "",
          "u_cons": 1.0,
          "remark": "带到采购",
          "system": {
              "owner": "RIA",
              "created_user": "RIA",
              "created_date": "2023-03-22T04:41:23",
              "last_modified_user": "RIA",
              "last_modified_date": "2023-03-22T04:41:23"
          },
          "item_no": 1,
          "material_info": {
              "material_class_name": "商标",
              "material_category": "Class A Accessories",
              "material_name": "箱贴",
              "description": "",
              "attributes": []
          },
          "color_way": [],
          "size_variance": [],
          "ship_no_list": []
      },
      {
          "material_class": "01",
          "material_code": "0012111",
          "usage_spec": "里布",
          "unit": "M",
          "per_garment": 1,
          "allowance_percent": 1.0,
          "material_color": "",
          "material_size": "",
          "u_cons": 1.0,
          "remark": "",
          "system": {
              "owner": "RIA",
              "created_user": "RIA",
              "created_date": "2023-03-22T04:41:23",
              "last_modified_user": "RRIA",
              "last_modified_date": "2025-05-20T14:02:19"
          },
          "item_no": 1,
          "material_info": {
              "material_class_name": "全棉布",
              "material_category": "Fabric",
              "material_name": "全棉布",
              "description": "100%棉\r\n",
              "attributes": [
                  {
                      "name": "布封",
                      "value": ""
                  },
                  {
                      "name": "克重",
                      "value": ""
                  },
                  {
                      "name": "成分",
                      "value": ""
                  },
                  {
                      "name": "英文描述",
                      "value": ""
                  }
              ]
          },
          "color_way": [
              {
                  "garment_color": "WHIT",
                  "material_color": "02:A102/022"
              },
              {
                  "garment_color": "BLU",
                  "material_color": "02:021"
              },
              {
                  "garment_color": "RE",
                  "material_color": "红色"
              }
          ],
          "size_variance": [
              {
                  "garment_size": "170",
                  "garment_dim3": "",
                  "material_size": "170",
                  "u_cons": 0.0
              },
              {
                  "garment_size": "165",
                  "garment_dim3": "",
                  "material_size": "165",
                  "u_cons": 0.0
              },
              {
                  "garment_size": "160",
                  "garment_dim3": "",
                  "material_size": "160",
                  "u_cons": 0.0
              }
          ],
          "ship_no_list": []
      },
      {
          "material_class": "02",
          "material_code": "7968",
          "usage_spec": "",
          "unit": "M",
          "per_garment": 1,
          "allowance_percent": 0.0,
          "material_color": "",
          "material_size": "57\"58",
          "u_cons": 1.0,
          "remark": "",
          "system": {
              "owner": "RIA",
              "created_user": "RIA",
              "created_date": "2023-03-22T04:41:23",
              "last_modified_user": "RRIA",
              "last_modified_date": "2025-05-20T14:02:19"
          },
          "item_no": 1,
          "material_info": {
              "material_class_name": "混纺交织类",
              "material_category": "Class A Accessories",
              "material_name": "全棉类面料",
              "description": "100%棉",
              "attributes": []
          },
          "color_way": [
              {
                  "garment_color": "WHIT",
                  "material_color": "02:A102/022"
              },
              {
                  "garment_color": "BLU",
                  "material_color": "02:021"
              },
              {
                  "garment_color": "RE",
                  "material_color": "红色"
              }
          ],
          "size_variance": [],
          "ship_no_list": []
      }
  ]
}