Product API 
API ระบบสินค้าของทาง SMLSoft ประกอบไปด้วยหัวข้อดังนี้
- Get Product List - แสดงรายการสินค้า
 - Get Product Info - รายละเอียดสินค้า
 - Get Product Image - แสดงรูปภาพสินค้า
 - New Product - เพิ่มสินค้า
 - Update Product - ปรับปรุงสินค้า
 - Update Product Patch - แก้ไขข้อมูลสินค้า(บางส่วน)
 - Product Attribute
 
Get Product List 
เป็นการดึงข้อมูลสินค้าทีละหลาย ๆ รายการ สามารถกำหนดได้ว่าจะดึงกี่รายการ
EndPoint: GET /SMLJavaRESTService/v3/api/product
Request Header: Required SMLRequestHeader
Query Parameter:
| Name | Description | default | 
|---|---|---|
| page | หน้าที่ต้องการแสดงข้อมูล | 1 | 
| size | จำนวนรายการต่อ 1 หน้า | 20 | 
Example:
GET http://localhost:8086/SMLJavaRESTService/v3/api/product?page=1&size=20Response Success: Response Get Data List
Response Error: Response Error
Get Product Information 
เป็นการดึงข้อมูลสินค้ามาแสดงทีละ 1 รายการโดยจะต้องระบุรหัสสินค้า
EndPoint: GET /SMLJavaRESTService/v3/api/product/{code}
Request Header: Required SMLRequestHeader
Path Parameter:
| Name | Description | Example | 
|---|---|---|
| code | รหัสสินค้า | IC-0001 | 
Example:
GET http://localhost:8086/SMLJavaRESTService/v3/api/product/IC-001Response Success: Response Get Data
Response Error: Response Error
Get Product Image 
การดึงรูปภาพสินค้า จะต้องใช้ Image_guid ของรูปภาพสินค้า ในการนำมาแสดง หาก Image_guid ตรงกับในระบบ API จะ Response ออกมาเป็นรูปภาพ แต่หาก ไม่พบรูปภาพ จะตอบกลับด้วย HTTP Status 400 และแสดงข้อความว่า ไม่พบรูปภาพ
EndPoint: GET /SMLJavaRESTService/v3/api/product/image/{Image_GUID}
Path Parameter:
| Name | Description | Example | 
|---|---|---|
| Image_GUID | Image_GUID ของรูปภาพที่ต้องการดึงข้อมูล | 6a09bf45-e1aa-4017-9199-758b94cc829d | 
Query Parameter:
| Name | Description | Example | 
|---|---|---|
| p | รหัสผู้ใช้บริการ | DEBUG | 
| d | ชื่อฐานข้อมูล | debug | 
Example
GET http://localhost:8086/SMLJavaRESTService/v3/api/product/image/6a09bf45-e1aa-4017-9199-758b94cc829d?p=DEBUG&d=debugResponse Success: Response Product Image
Response Error: Response Error
New Product 
เป็นการสร้างสินค้าใหม่ เข้าไปในระบบ
EndPoint: POST /SMLJavaRESTService/v3/api/product
Request Header: Required SMLRequestHeader
Body: Product Informaion
Example:
POST /SMLJavaRESTService/v3/api/product
Content-Type: application/json
GUID: SMLX
provider: DEBUG
databaseName: debug
{
    "code": "IC0001",
    "name": "สินค้าทดสอบ", 
    "units": [
      {
        "unit_code": "กระป๋อง",
        "unit_name": "กระป๋อง",
        "stand_value": 1,
        "divide_value": 1
      },
      {
        "unit_code": "ลัง",
        "unit_name": "ลัง",
        "stand_value": 30,
        "divide_value": 1
      }
    ],
    "name_eng": "อาราบัส เอสเพรสโซ่",
    "name_eng_2": "อาราบัส เอสเพรสโซ่",
    "tax_type": 0,
    "item_type": 0,
    "unit_type": 1,
    "unit_cost": "กระป๋อง",
    "unit_standard": "กระป๋อง",
    "item_category": "PRODUCTG1",
    "category_name": "หมวด1",
    "group_main": "GM1",
    "group_main_name": "GMN1",
    "group_sub": "GM1S1",
    "purchase_point": 0,
    "price_formulas": [
      {
        "unit_code": "กระป๋อง",
        "sale_type": 0,
        "price_0": "10",
        "tax_type": 0,
        "price_currency": 0
      }
    ]
  }Response Success: Response Create/Update
Response Error: Response Error
Update Product 
แก้ไขรายละเอียดสินค้า
EndPoint: PUT /SMLJavaRESTService/v3/api/product/{code}
Request Header: Required SMLRequestHeader
Path Parameter:
| Name | Description | Example | 
|---|---|---|
| code | รหัสสินค้า | 1-A-02 | 
Body: Product Informaion
Example:
PUT /SMLJavaRESTService/v3/api/product/1-A-02
Content-Type: application/json
GUID: SMLX
provider: DEBUG
databaseName: debug
{
    "code": "1-A-02",
    "name": "อาราบัส เอสเพรสโซ่",
    "units": [
      {
        "ic_code": "1-A-02",
        "unit_code": "กระป๋อง",
        "unit_name": "กระป๋อง",
        "stand_value": 1,
        "divide_value": 1,
        "ratio": 1
      },
      {
        "ic_code": "1-A-02",
        "unit_code": "ลัง",
        "unit_name": "ลัง",
        "stand_value": 30,
        "divide_value": 1,
        "ratio" : 30
      }
    ],
    "unit_cost" : "PCS",
    "unit_standard" : "PCS"
  }Response Success: Response Create/Update
Response Error: Response Error
Update Product Patch 
แก้ไขรายละเอียดสินค้า บางส่วน โดยจะแก้ไข เฉพาะตามข้อมูลที่ส่งมา
EndPoint: PATCH /SMLJavaRESTService/v3/api/product/{code}
Request Header:
Required SMLRequestHeader
Path Parameter:
| Name | Description | Example | 
|---|---|---|
| code | รหัสสินค้า | 1-A-02 | 
Body: Product Informaion
Example:
PATCH /SMLJavaRESTService/v3/api/product/3-T-02
Content-Type: application/json
GUID: SMLX
provider: DEBUG
databaseName: debug
{
  "units": [
     {
      "unit_code": "โหล",
      "stand_value": 48,
      "divide_value": 1,
      "ratio" : 48
    }
  ]
}Response Success: Response Create/Update
Response Error: Response Error
Response 
Response Get Data List: 
HTTP Status : 200
| Name | Type | Descripton | 
|---|---|---|
| success | Boolean | สถานะการทำรายการ | 
| data | Array Object | รายการข้อมูลสินค้า | 
| pages | Object | จำนวนผลลัพท์ | 
Example:
{
  "success": true,
  "data": [
    {
      "code": "1-A-02",
      "name": "อาราบัส เอสเพรสโซ่",
      "barcodes": [
        {
          "barcode": "8852407672319",
          "price": 0,
          "ic_code": "1-A-02",
          "unit_code": "กระป๋อง",
          "price_member": 0
        },
        {
          "barcode": "8854330124743",
          "price": 0,
          "ic_code": "1-A-02",
          "unit_code": "ลัง",
          "price_member": 0
        }
      ],
      "units": [
        {
          "ic_code": "1-A-02",
          "unit_code": "กระป๋อง",
          "unit_name": "กระป๋อง",
          "stand_value": 1,
          "divide_value": 1
        },
        {
          "ic_code": "1-A-02",
          "unit_code": "ลัง",
          "unit_name": "ลัง",
          "stand_value": 30,
          "divide_value": 1
        }
      ],
      "images": [
        {
          "imageGuid": "6a09bf45-e1aa-4017-9199-758b94cc829d",
          "imageId": "1-A-02",
          "imageSort": 0,
          "uri": "http://localhost:8086/SMLJavaRESTService/v3/api/product/image/6a09bf45-e1aa-4017-9199-758b94cc829d?p=DEBUG&d=debug"
        }
      ],
      "name_eng": "อาราบัส เอสเพรสโซ่",
      "name_eng_2": "อาราบัส เอสเพรสโซ่",
      "tax_type": 0,
      "item_type": 0,
      "unit_type": 1,
      "unit_cost": "กระป๋อง",
      "unit_standard": "กระป๋อง",
      "item_brand": "B1",
      "brand_name": "BN1",
      "item_category": "PRODUCTG1",
      "category_name": "หมวด1",
      "group_main": "GM1",
      "group_main_name": "GMN1",
      "group_sub": "GM1S1",
      "have_point": false,
      "start_purchase_wh": "BT",
      "start_purchase_shelf": "BT",
      "start_purchase_unit": "ลัง",
      "start_sale_unit": "กระป๋อง",
      "purchase_point": 0,
      "minimum_qty": 0,
      "maximum_qty": 0,
      "ignore_stock_balance": false,
      "ignore_sale_over_backorder": false,
      "check_price_low_cost": false,
      "is_out_of_production": false,
      "is_disable_change_price": false,
      "is_disable_change_discount": false,
      "is_hold_purchase": false,
      "is_hold_sale": false,
      "is_premium": false,
      "price_formulas": [
        {
          "ic_code": "1-A-02",
          "unit_code": "กระป๋อง",
          "sale_type": 0,
          "price_0": "10",
          "tax_type": 0,
          "price_currency": 0,
          "currency_code": ""
        }
      ]
    },
    {
      "code": "1-B-01",
      "name": "เบอร์ดี้ เอสเพรสโซ เขียว 180 มล.",
      "units": [
        {
          "ic_code": "1-B-01",
          "unit_code": "กระป๋อง",
          "unit_name": "กระป๋อง",
          "stand_value": 1,
          "divide_value": 1
        },
        {
          "ic_code": "1-B-01",
          "unit_code": "ลัง",
          "unit_name": "ลัง",
          "stand_value": 30,
          "divide_value": 1
        }
      ],
      "name_eng": "เบอร์ดี้ เอสเพรสโซ เขียว 180 มล.",
      "name_eng_2": "เบอร์ดี้ เอสเพรสโซ เขียว 180 มล.",
      "tax_type": 0,
      "item_type": 0,
      "unit_type": 1,
      "unit_cost": "กระป๋อง",
      "unit_standard": "กระป๋อง",
      "item_brand": "",
      "item_design": "",
      "item_grade": "",
      "item_model": "",
      "item_category": "",
      "group_main": "",
      "item_class": "",
      "group_sub": "",
      "group_sub_2": "",
      "description": "",
      "commission_rate": "",
      "serial_no_format": "",
      "have_point": false,
      "start_purchase_wh": "",
      "start_purchase_shelf": "",
      "start_purchase_unit": "",
      "start_sale_wh": "",
      "start_sale_shelf": "",
      "start_sale_unit": "",
      "before_sale_unit": "",
      "ic_out_wh": "",
      "ic_out_shelf": "",
      "start_unit_code": "",
      "user_group_for_purchase": "",
      "user_group_for_manage": "",
      "user_group_for_sale": "",
      "user_group_for_warehouse": "",
      "purchase_point": 0,
      "discount": "",
      "minimum_qty": 0,
      "maximum_qty": 0,
      "ignore_stock_balance": false,
      "ignore_sale_over_backorder": false,
      "check_price_low_cost": false,
      "is_out_of_production": false,
      "is_disable_change_price": false,
      "is_disable_change_discount": false,
      "is_hold_purchase": false,
      "is_hold_sale": false,
      "is_premium": false,
      "price_formulas": [
        {
          "ic_code": "1-B-01",
          "unit_code": "กระป๋อง",
          "sale_type": 0,
          "price_0": "13",
          "price_1": "14",
          "price_2": "15",
          "tax_type": 0,
          "price_currency": 0,
          "currency_code": ""
        }
      ]
    }
  ],
  "pages": {
    "size": 2,
    "page": 1,
    "total_record": 197,
    "max_page": 99
  }
}Response Get Data Success: 
HTTP Status : 200
| Field Name | Description | Example | 
|---|---|---|
| success | true | |
| data | Inventory Data Object | 
Example
{
  "success": true,
  "data": {
    "code": "1-A-02",
    "name": "อาราบัส เอสเพรสโซ่",
    "barcodes": [
      {
        "barcode": "8852407672319",
        "price": 0,
        "ic_code": "1-A-02",
        "unit_code": "กระป๋อง",
        "price_member": 0
      },
      {
        "barcode": "8854330124743",
        "price": 0,
        "ic_code": "1-A-02",
        "unit_code": "ลัง",
        "price_member": 0
      }
    ],
    "units": [
      {
        "ic_code": "1-A-02",
        "unit_code": "กระป๋อง",
        "unit_name": "กระป๋อง",
        "stand_value": 1,
        "divide_value": 1
      },
      {
        "ic_code": "1-A-02",
        "unit_code": "ลัง",
        "unit_name": "ลัง",
        "stand_value": 30,
        "divide_value": 1
      }
    ],
    "images": [
      {
        "imageGuid": "6a09bf45-e1aa-4017-9199-758b94cc829d",
        "imageId": "1-A-02",
        "imageSort": 0,
        "uri": "http://localhost:8086/SMLJavaRESTService/v3/api/product/image/6a09bf45-e1aa-4017-9199-758b94cc829d?p=DEBUG&d=debug"
      }
    ],
    "name_2": null,
    "name_eng": "อาราบัส เอสเพรสโซ่",
    "name_eng_2": "อาราบัส เอสเพรสโซ่",
    "tax_type": 0,
    "item_type": 0,
    "unit_type": 1,
    "unit_cost": "กระป๋อง",
    "unit_standard": "กระป๋อง",
    "supplier_code": null,
    "item_brand": "B1",
    "brand_name": "BN1",
    "item_pattern": null,
    "pattern_name": null,
    "item_design": null,
    "design_name": null,
    "item_grade": null,
    "grade_name": null,
    "item_model": null,
    "model_name": null,
    "item_category": "PRODUCTG1",
    "category_name": "หมวด1",
    "group_main": "GM1",
    "group_main_name": "GMN1",
    "item_class": null,
    "class_name": null,
    "group_sub": "GM1S1",
    "group_sub_name": null,
    "group_sub_2": null,
    "description": null,
    "commission_rate": null,
    "serial_no_format": null,
    "have_point": false,
    "start_purchase_wh": "BT",
    "start_purchase_shelf": "BT",
    "start_purchase_unit": "ลัง",
    "start_sale_wh": null,
    "start_sale_shelf": null,
    "start_sale_unit": "กระป๋อง",
    "before_sale_unit": null,
    "ic_out_wh": null,
    "ic_out_shelf": null,
    "start_unit_code": null,
    "user_group_for_purchase": null,
    "user_group_for_manage": null,
    "user_group_for_sale": null,
    "user_group_for_warehouse": null,
    "purchase_point": 0,
    "discount": null,
    "minimum_qty": 0,
    "maximum_qty": 0,
    "ignore_stock_balance": false,
    "ignore_sale_over_backorder": false,
    "check_price_low_cost": false,
    "is_out_of_production": false,
    "is_disable_change_price": false,
    "is_disable_change_discount": false,
    "is_hold_purchase": false,
    "is_hold_sale": false,
    "is_premium": false,
    "price_formulas": [
      {
        "ic_code": "1-A-02",
        "unit_code": "กระป๋อง",
        "sale_type": 0,
        "price_0": "10",
        "price_1": null,
        "price_2": null,
        "price_3": null,
        "price_4": null,
        "price_5": null,
        "price_6": null,
        "price_7": null,
        "price_8": null,
        "price_9": null,
        "tax_type": 0,
        "price_currency": 0,
        "currency_code": ""
      }
    ]
  }
}Response Get Image: 
HTTP Status : 200 Content Type: image/png Body: RAW Image
Response Create/Update Success: 
HTTP Status : 200
| Field Name | Description | Example | 
|---|---|---|
| success | is Success | true | 
| data | product code | string | 
Example
{
    "success": true,
    "data": {
        "code": "3-T-02"
    }
}Response Error: 
HTTP Status : 400 or 500
| Field Name | Description | Example | 
|---|---|---|
| error | is Error | true | 
| code | Error Code | string | 
| message | Error Message | string | 
Example:
{
  "error": true,
  "code": "99",
  "message": "Error Message"
}Product Attribute 
Pageable 
| Field Name | Type | Description | Example | 
|---|---|---|---|
| page | Integer | หน้า | 1 | 
| size | Integer | จำนวนรายการต่อหน้า | 2 | 
| total_record | Integer | จำนวนรายการทั้งหมด | 197 | 
| max_page | Integer | จำนวนหน้าทั้งหมด | 99 | 
Product Information: 
| Field Name | Type | Descripton | Example | 
|---|---|---|---|
| code | String | รหัสสินค้า | 1-A-02 | 
| name | String | ชื่อสินค้า | อาราบัส เอสเพรสโซ่ | 
| name_2 | String | ชื่อสินค้า 2 | null | 
| name_eng | String | ชื่ออังกฤษ | อาราบัส เอสเพรสโซ่ | 
| name_eng_2 | String | ชื่ออังกฤษ 2 | อาราบัส เอสเพรสโซ่ | 
| tax_type | Integer | ประเภทภาษี  (0=ภาษีมูลค่าเพิ่ม, 1=ยกเว้นภาษี)  | 0 | 
| item_type | Integer | ประเภทสินค้า  (0=สินค้าทั่วไป, 1=สินค้าบริการ, 2=สินค้าให้เช่า, 3=สินค้าชุด)  | 0 | 
| unit_type | Integer | ประเภทหน่วยนับ  (0=หน่วยนับเดียว, 1=หลายหน่วยนับ)  | 1 | 
| unit_cost | String | หน่วยต้นทุน | กระป๋อง | 
| unit_standard | String | หน่วยยอดคงเหลือ | กระป๋อง | 
| supplier_code | String | ผู้จำหน่ายหลัก | null | 
| item_brand | String | ยี่ห้อสินค้า | B1 | 
| brand_name | String | ชื่อยี่ห้อสินค้า | BN1 | 
| item_pattern | String | รูปแบบสินค้า | null | 
| pattern_name | String | ชื่อรูปแบบสินค้า | null | 
| item_design | String | รูปทรงสินค้า | null | 
| design_name | String | ชื่อรูปทรงสินค้า | null | 
| item_grade | String | เกรดสินค้า | null | 
| grade_name | String | ชื่อเกรดสินค้า | null | 
| item_model | String | รุ่นสินค้า | null | 
| model_name | String | ชื่อรุ่นสินค้า | null | 
| item_category | String | หมวดสินค้า | PRODUCTG1 | 
| category_name | String | ชื่อหมวดสินค้า | หมวด1 | 
| group_main | String | กลุุ่มสินค้าหลัก | GM1 | 
| group_main_name | String | ชื่อกลุุ่มสินค้าหลัก | GMN1 | 
| item_class | String | ระดับสินค้า | null | 
| class_name | String | ชื่อระดับสินค้า | null | 
| group_sub | String | กลุ่มสินค้าย่อย | GM1S1 | 
| group_sub_name | String | ชื่อกลุ่มสินค้าย่อย | null | 
| group_sub_2 | String | กลุ่มสินค้าย่อย 2 | null | 
| description | String | รายละเอียด | null | 
| commission_rate | String | อัตราค่าคอมมิสชั่น | null | 
| serial_no_format | String | รูปแบบ Serial Number | null | 
| have_point | Integer | 0=ไม่สะสมแต้ม, 1=สะสมแต้ม | false | 
| start_purchase_wh | String | คลังเริ่มต้นซื้อ | BT | 
| start_purchase_shelf | String | ที่เกบเริ่มต้นซื้อ | BT | 
| start_purchase_unit | String | หน่วยเริ่มต้นซื้อ | ลัง | 
| start_sale_wh | String | คลังเริ่มต้นขาย | null | 
| start_sale_shelf | String | ที่เก็บเริ่มต้นขาย | null | 
| start_sale_unit | String | หน่วยเริ่มต้นขาย | กระป๋อง | 
| before_sale_unit | String | หน่วยช่วยขาย | null | 
| ic_out_wh | String | คลังชำรุดสินค้า | null | 
| ic_out_shelf | String | ที่เก็บชำรุดสินค้า | null | 
| start_unit_code | String | หน่วยเริ่มต้นสินค้า | null | 
| user_group_for_purchase | String | กลุ่มผุ้รับผิดชอบการซื้อ | null | 
| user_group_for_manage | String | กลุ่มผุ้รับผิดชอบการจัดการ | null | 
| user_group_for_sale | String | กลุ่มผุ้รับผิดชอบการขาย | null | 
| user_group_for_warehouse | String | กลุ่มผุ้รับผิดชอบคลังสินค้า | null | 
| purchase_point | number | จุดสั่งซื้อ | 0 | 
| discount | String | ส่วนลดต่อรายการ | null | 
| minimum_qty | number | จุดต่ำสุด | 0 | 
| maximum_qty | number | จุดสูงสุด | 0 | 
| ignore_stock_balance | Boolean | อนุญาติใหัยอดคงเหลือติดลบ | false | 
| ignore_sale_over_backorder | Boolean | อนุญาติให้ขายสินค้าค้างส่ง | false | 
| check_price_low_cost | Boolean | ห้ามขายต่ำกว่าทุน | false | 
| is_out_of_production | Boolean | สินค้าเลิกผลิตแล้ว | false | 
| is_disable_change_price | Boolean | ห้ามแก้ไขราคาขาย | false | 
| is_disable_change_discount | Boolean | ห้ามแก้ไขส่วนลด | false | 
| is_hold_purchase | Boolean | สินค้าหยุดซื้อ | false | 
| is_hold_sale | Boolean | สินค้าหยุดขาย | false | 
| is_premium | Boolean | สินค้าสมนาคุณ | false | 
| barcodes | ArrayObject | รายละเอียดบาร์โค๊ด | Array of Barcode Object | 
| units | ArrayObject | รายละเอียดหน่วยนับ | Array of Unit Object | 
| images | ArrayObject | รายละเอียดรูปภาพ | Array of Image Object | 
| price_formulas | ArrayObject | รายละเอียดราคาตามสูตร | Array Of PriceFormula Object | 
| set_details | ArrayObject | รายละเอียดสินค้าชุด | Array Of Product Set Detail | 
Product Barcode 
| Name | Type | Description | Example | 
|---|---|---|---|
| ic_code | String | รหัสสินค้า | 1-A-02 | 
| barcode | String | บาร์โค๊ด | 8852407672319 | 
| unit_code | String | หน่วยนับ | กระป๋อง | 
| price | number | ราคา | 0 | 
| price_member | number | ราคาสมาชิก | 0 | 
Product Units 
| Name | Type | Description | Required | 
|---|---|---|---|
| unit_code | String | รหัสหน่วยนับ | T | 
| unit_name | String | ชื่อหน่วยนับ | T | 
| stand_value | number | อัตราส่วนตัวตั้ง | T | 
| divide_value | number | อัตราส่วนตัวหาร | T | 
| ratio | number | อัตราส่วน | |
| row_order | number | ลำดับ | 
Product Images 
| Name | Type | Description | Example | 
|---|---|---|---|
| imageGuid | String | Image_guid ของรูปภาพ | 6a09bf45-e1aa-4017-9199-758b94cc829d | 
| imageId | String | รหัสอ้างอิงรูปภาพ | 1-A-02 | 
| imageSort | Integer | การเรียงลำดับ | 0 | 
| uri | String(url) | ตำแหน่งการเรียกไฟล์ภาพ | http:// | 
Product PriceFormula 
| Field Name | Type | Description | Example | 
|---|---|---|---|
| ic_code | String | รหัสสินค้า | 1-A-02 | 
| unit_code | String | หน่วยนับ | กระป๋อง | 
| sale_type | Integer | ประเภทการขาย  (0=ไม่เลือก,1=ขายสด,2=ขายเชื่อ)  | 0 | 
| price_0 | String | ราคากลาง | 10 | 
| price_1 | String | ราคา 1 | null | 
| price_2 | String | ราคา 2 | null | 
| price_3 | String | ราคา 3 | null | 
| price_4 | String | ราคา 4 | null | 
| price_5 | String | ราคา 5 | null | 
| price_6 | String | ราคา 6 | null | 
| price_7 | String | ราคา 7 | null | 
| price_8 | String | ราคา 8 | null | 
| price_9 | String | ราคา 8 | null | 
| tax_type | Integer | ประเภทภาษี  (0=ไม่เลือก, 1=แยกนอก, 2=รวมใน, 3=ภาษีศูนย์)  | 0 | 
| price_currency | Integer | 0=ไม่เป็นราคาสกุลเงิน,1=เป็นราคาตามสกุลเงิน | 0 | 
| currency_code | String | รหัสสกุลเงิน | USD | 
Product Set Detail 
| Field Name | Type | Description | Example | 
|---|---|---|---|
| ic_code | String | รหัสสินค้า | 1-A-02 | 
| barcode | String | บาร์โค๊ด | 1-A-02 | 
| unit_code | String | หน่วยนับ | กระป๋อง | 
| line_number | Integer | ลำดับ | 1 | 
| qty | number | จำนวน | 1 | 
| price | number | ราคา | 500 | 
| sum_amount | number | รวม | 500 | 
| price_ratio | number | อัตราส่วนราคารวม(ร้อยละ) | 0.2 | 
ตัวอย่าง สินค้าชุด
{
    "success": true,
    "data": {
        "code": "LB-00000",
        "name": "หลอดไฟ",
        "barcodes": [
            {
                "barcode": "4909414083851",
                "price": 0,
                "ic_code": "LB-00000",
                "unit_code": "ตัว",
                "price_member": 0
            }
        ],
        "units": [
            {
                "row_order": 0,
                "ratio": null,
                "line_number": 0,
                "ic_code": "LB-00000",
                "unit_code": "ตัว",
                "unit_name": "ตัว",
                "stand_value": 1.00,
                "divide_value": 1.00
            }
        ],
        "images": null,
        "productReplacements": [],
        "productColorUses": [],
        "productBundles": [],
        "productSizeUses": [],
        "name_2": null,
        "name_eng": "หลอดไฟ",
        "name_eng_2": "หลอดไฟ",
        "tax_type": 0,
        "item_type": 3,
        "unit_type": 0,
        "unit_cost": "ตัว",
        "unit_standard": "ตัว",
        "supplier_code": null,
        "item_brand": null,
        "brand_name": null,
        "item_pattern": null,
        "pattern_name": null,
        "item_design": null,
        "design_name": null,
        "item_grade": null,
        "grade_name": null,
        "item_model": null,
        "model_name": null,
        "item_category": null,
        "category_name": null,
        "group_main": null,
        "group_main_name": null,
        "item_class": null,
        "class_name": null,
        "group_sub": null,
        "group_sub_name": null,
        "group_sub_2": null,
        "description": null,
        "commission_rate": null,
        "serial_no_format": null,
        "have_point": false,
        "start_purchase_wh": "CENTER",
        "start_purchase_shelf": "CENTER",
        "start_purchase_unit": null,
        "start_sale_wh": "CENTER",
        "start_sale_shelf": "CENTER",
        "start_sale_unit": null,
        "before_sale_unit": null,
        "ic_out_wh": null,
        "ic_out_shelf": null,
        "start_unit_code": null,
        "user_group_for_purchase": null,
        "user_group_for_manage": null,
        "user_group_for_sale": null,
        "user_group_for_warehouse": null,
        "purchase_point": 0,
        "discount": null,
        "minimum_qty": 50,
        "maximum_qty": 0,
        "ignore_stock_balance": false,
        "ignore_sale_over_backorder": false,
        "check_price_low_cost": false,
        "is_out_of_production": false,
        "is_disable_change_price": false,
        "is_disable_change_discount": false,
        "is_hold_purchase": false,
        "is_hold_sale": false,
        "is_premium": false,
        "ic_serial_no": false,
        "price_formulas": [
            {
                "ic_code": "LB-00000",
                "unit_code": "ตัว",
                "sale_type": 0,
                "price_0": "1000",
                "price_1": "500",
                "price_2": "800",
                "price_3": null,
                "price_4": null,
                "price_5": null,
                "price_6": null,
                "price_7": null,
                "price_8": null,
                "price_9": null,
                "tax_type": 0,
                "price_currency": 0,
                "currency_code": ""
            }
        ],
        "set_details": [
            {
                "ic_code": "LB-00001",
                "barcode": null,
                "unit_code": "หลอด",
                "line_number": 1,
                "qty": 1.00000000000000,
                "price": 50.00,
                "sum_amount": 50.00,
                "price_ratio": 0.14
            },
            {
                "ic_code": "LB-00002",
                "barcode": null,
                "unit_code": "หลอด",
                "line_number": 2,
                "qty": 2.00000000000000,
                "price": 50.00,
                "sum_amount": 100.00,
                "price_ratio": 0.14
            },
            {
                "ic_code": "LB-00003",
                "barcode": null,
                "unit_code": "หลอด",
                "line_number": 3,
                "qty": 3.00000000000000,
                "price": 50.00,
                "sum_amount": 150.00,
                "price_ratio": 0.14
            },
            {
                "ic_code": "LB-00004",
                "barcode": null,
                "unit_code": "หลอด",
                "line_number": 4,
                "qty": 1.00000000000000,
                "price": 50.00,
                "sum_amount": 50.00,
                "price_ratio": 0.16
            }
        ]
    }
}