Skip to content

Product API

API ระบบสินค้าของทาง SMLSoft ประกอบไปด้วยหัวข้อดังนี้

Get Product List

เป็นการดึงข้อมูลสินค้าทีละหลาย ๆ รายการ สามารถกำหนดได้ว่าจะดึงกี่รายการ

EndPoint: GET /SMLJavaRESTService/v3/api/product

Request Header: Required SMLRequestHeader

Query Parameter:

NameDescriptiondefault
pageหน้าที่ต้องการแสดงข้อมูล1
sizeจำนวนรายการต่อ 1 หน้า20

Example:

GET http://localhost:8086/SMLJavaRESTService/v3/api/product?page=1&size=20

Response 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:

NameDescriptionExample
codeรหัสสินค้าIC-0001

Example:

GET http://localhost:8086/SMLJavaRESTService/v3/api/product/IC-001

Response 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:

NameDescriptionExample
Image_GUIDImage_GUID ของรูปภาพที่ต้องการดึงข้อมูล6a09bf45-e1aa-4017-9199-758b94cc829d

Query Parameter:

NameDescriptionExample
pรหัสผู้ใช้บริการDEBUG
dชื่อฐานข้อมูลdebug

Example

GET http://localhost:8086/SMLJavaRESTService/v3/api/product/image/6a09bf45-e1aa-4017-9199-758b94cc829d?p=DEBUG&d=debug

Response 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:

NameDescriptionExample
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:

NameDescriptionExample
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

NameTypeDescripton
successBooleanสถานะการทำรายการ
dataArray Objectรายการข้อมูลสินค้า
pagesObjectจำนวนผลลัพท์

Example:

json
{
  "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 NameDescriptionExample
successtrue
dataInventory Data Object

Example

json
{
  "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 NameDescriptionExample
successis Successtrue
dataproduct codestring

Example

json
{
    "success": true,
    "data": {
        "code": "3-T-02"
    }
}

Response Error:

HTTP Status : 400 or 500

Field NameDescriptionExample
erroris Errortrue
codeError Codestring
messageError Messagestring

Example:

json
{
  "error": true,
  "code": "99",
  "message": "Error Message"
}

Product Attribute

Pageable

Field NameTypeDescriptionExample
pageIntegerหน้า1
sizeIntegerจำนวนรายการต่อหน้า2
total_recordIntegerจำนวนรายการทั้งหมด197
max_pageIntegerจำนวนหน้าทั้งหมด99

Product Information:

Field NameTypeDescriptonExample
codeStringรหัสสินค้า1-A-02
nameStringชื่อสินค้าอาราบัส เอสเพรสโซ่
name_2Stringชื่อสินค้า 2null
name_engStringชื่ออังกฤษอาราบัส เอสเพรสโซ่
name_eng_2Stringชื่ออังกฤษ 2อาราบัส เอสเพรสโซ่
tax_typeIntegerประเภทภาษี
(0=ภาษีมูลค่าเพิ่ม, 1=ยกเว้นภาษี)
0
item_typeIntegerประเภทสินค้า
(0=สินค้าทั่วไป, 1=สินค้าบริการ, 2=สินค้าให้เช่า, 3=สินค้าชุด)
0
unit_typeIntegerประเภทหน่วยนับ
(0=หน่วยนับเดียว, 1=หลายหน่วยนับ)
1
unit_costStringหน่วยต้นทุนกระป๋อง
unit_standardStringหน่วยยอดคงเหลือกระป๋อง
supplier_codeStringผู้จำหน่ายหลักnull
item_brandStringยี่ห้อสินค้าB1
brand_nameStringชื่อยี่ห้อสินค้าBN1
item_patternStringรูปแบบสินค้าnull
pattern_nameStringชื่อรูปแบบสินค้าnull
item_designStringรูปทรงสินค้าnull
design_nameStringชื่อรูปทรงสินค้าnull
item_gradeStringเกรดสินค้าnull
grade_nameStringชื่อเกรดสินค้าnull
item_modelStringรุ่นสินค้าnull
model_nameStringชื่อรุ่นสินค้าnull
item_categoryStringหมวดสินค้าPRODUCTG1
category_nameStringชื่อหมวดสินค้าหมวด1
group_mainStringกลุุ่มสินค้าหลักGM1
group_main_nameStringชื่อกลุุ่มสินค้าหลักGMN1
item_classStringระดับสินค้าnull
class_nameStringชื่อระดับสินค้าnull
group_subStringกลุ่มสินค้าย่อยGM1S1
group_sub_nameStringชื่อกลุ่มสินค้าย่อยnull
group_sub_2Stringกลุ่มสินค้าย่อย 2null
descriptionStringรายละเอียดnull
commission_rateStringอัตราค่าคอมมิสชั่นnull
serial_no_formatStringรูปแบบ Serial Numbernull
have_pointInteger0=ไม่สะสมแต้ม, 1=สะสมแต้มfalse
start_purchase_whStringคลังเริ่มต้นซื้อBT
start_purchase_shelfStringที่เกบเริ่มต้นซื้อBT
start_purchase_unitStringหน่วยเริ่มต้นซื้อลัง
start_sale_whStringคลังเริ่มต้นขายnull
start_sale_shelfStringที่เก็บเริ่มต้นขายnull
start_sale_unitStringหน่วยเริ่มต้นขายกระป๋อง
before_sale_unitStringหน่วยช่วยขายnull
ic_out_whStringคลังชำรุดสินค้าnull
ic_out_shelfStringที่เก็บชำรุดสินค้าnull
start_unit_codeStringหน่วยเริ่มต้นสินค้าnull
user_group_for_purchaseStringกลุ่มผุ้รับผิดชอบการซื้อnull
user_group_for_manageStringกลุ่มผุ้รับผิดชอบการจัดการnull
user_group_for_saleStringกลุ่มผุ้รับผิดชอบการขายnull
user_group_for_warehouseStringกลุ่มผุ้รับผิดชอบคลังสินค้าnull
purchase_pointnumberจุดสั่งซื้อ0
discountStringส่วนลดต่อรายการnull
minimum_qtynumberจุดต่ำสุด0
maximum_qtynumberจุดสูงสุด0
ignore_stock_balanceBooleanอนุญาติใหัยอดคงเหลือติดลบfalse
ignore_sale_over_backorderBooleanอนุญาติให้ขายสินค้าค้างส่งfalse
check_price_low_costBooleanห้ามขายต่ำกว่าทุนfalse
is_out_of_productionBooleanสินค้าเลิกผลิตแล้วfalse
is_disable_change_priceBooleanห้ามแก้ไขราคาขายfalse
is_disable_change_discountBooleanห้ามแก้ไขส่วนลดfalse
is_hold_purchaseBooleanสินค้าหยุดซื้อfalse
is_hold_saleBooleanสินค้าหยุดขายfalse
is_premiumBooleanสินค้าสมนาคุณfalse
barcodesArrayObjectรายละเอียดบาร์โค๊ดArray of Barcode Object
unitsArrayObjectรายละเอียดหน่วยนับArray of Unit Object
imagesArrayObjectรายละเอียดรูปภาพArray of Image Object
price_formulasArrayObjectรายละเอียดราคาตามสูตรArray Of PriceFormula Object
set_detailsArrayObjectรายละเอียดสินค้าชุดArray Of Product Set Detail

Product Barcode

NameTypeDescriptionExample
ic_codeStringรหัสสินค้า1-A-02
barcodeStringบาร์โค๊ด8852407672319
unit_codeStringหน่วยนับกระป๋อง
pricenumberราคา0
price_membernumberราคาสมาชิก0

Product Units

NameTypeDescriptionRequired
unit_codeStringรหัสหน่วยนับT
unit_nameStringชื่อหน่วยนับT
stand_valuenumberอัตราส่วนตัวตั้งT
divide_valuenumberอัตราส่วนตัวหารT
rationumberอัตราส่วน
row_ordernumberลำดับ

Product Images

NameTypeDescriptionExample
imageGuidStringImage_guid ของรูปภาพ6a09bf45-e1aa-4017-9199-758b94cc829d
imageIdStringรหัสอ้างอิงรูปภาพ1-A-02
imageSortIntegerการเรียงลำดับ0
uriString(url)ตำแหน่งการเรียกไฟล์ภาพhttp://

Product PriceFormula

Field NameTypeDescriptionExample
ic_codeStringรหัสสินค้า1-A-02
unit_codeStringหน่วยนับกระป๋อง
sale_typeIntegerประเภทการขาย
(0=ไม่เลือก,1=ขายสด,2=ขายเชื่อ)
0
price_0Stringราคากลาง10
price_1Stringราคา 1null
price_2Stringราคา 2null
price_3Stringราคา 3null
price_4Stringราคา 4null
price_5Stringราคา 5null
price_6Stringราคา 6null
price_7Stringราคา 7null
price_8Stringราคา 8null
price_9Stringราคา 8null
tax_typeIntegerประเภทภาษี
(0=ไม่เลือก, 1=แยกนอก, 2=รวมใน, 3=ภาษีศูนย์)
0
price_currencyInteger0=ไม่เป็นราคาสกุลเงิน,1=เป็นราคาตามสกุลเงิน0
currency_codeStringรหัสสกุลเงินUSD

Product Set Detail

Field NameTypeDescriptionExample
ic_codeStringรหัสสินค้า1-A-02
barcodeStringบาร์โค๊ด1-A-02
unit_codeStringหน่วยนับกระป๋อง
line_numberIntegerลำดับ1
qtynumberจำนวน1
pricenumberราคา500
sum_amountnumberรวม500
price_rationumberอัตราส่วนราคารวม(ร้อยละ)0.2

ตัวอย่าง สินค้าชุด

json
{
    "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
            }
        ]
    }
}