Skip to content

Stock Transfer โอนสินค้า

TypeValue
URL/SMLJavaRESTService/restapi/stocktransfer
MethodPOST
Content-TypeApplication/json

Request Header

namedescription
GUIDGUID สำหรับการเชื่อมต่อ (smlx เสมอ)
configFIleNameชื่อไฟล์เก็บ Server Config
databaseNameชื่อฐานข้อมูล

Example

{
    "GUID" : "smlx"
    "configFIleName" : "SMLConfigBRSMLST.xml"
    "databaseName" : "smlst2016"
}

Data Params

NameTypedescription
doc_no[String]เอกสารเลขที่
doc_format_code[String]รหัสเอกสาร
doc_date[String]เอกสารวันที่ Format=YYYY-MM-DD
doc_time[String]เวลา Format=hh:mm
wh_code_from[String]จากคลัง
shelf_code_from[String]จากที่เก็บ
wh_code_to[String]ถึงคลัง
shelf_code_to[String]ถึงที่เก็บ
user_code[String]รหัสพนักงาน
details[Array]รายละเอียดสินค้า ดู Item Detail Params

Item Detail Params

NameTypedescription
item_code[String]รหัสสินค้า
line_number[Number]หมายเลขบรรทัด
unit_code[String]หน่วยนับ
wh_code_from[String]จากคลังสินค้า
shelf_code_from[String]จากที่เก็บสินค้า
wh_code_to[String]ถึงคลังสินค้า
shelf_code_to[String]ถึงที่เก็บสินค้า
qty[Number]จำนวน
doc_ref[String]เลขที่เอกสารอ้างอิง (Optional)
doc_ref_date[String]วันที่เอกสารอ้างอิง Format=YYYY-MM-DD (Optional)

Sample Call

{
	"doc_no": "RQIM59120091",
	"doc_date": "2016-12-01",
	"doc_format_code": "RQIM",
	"doc_time": "09:00",
	"wh_code_from": "CMI01",
	"shelf_code_from": "CMI100",
	"wh_code_to": "CMI01",
	"shelf_code_to": "CMI420",
	"doc_type": "",
	"user_code": "1314",
	"details": [
		{
			"item_code": "1000030",
			"line_number": 0,
			"unit_code": "TR",
			"wh_code_from": "CMI01",
			"shelf_code_from": "CMI100",
			"wh_code_to": "CMI01",
			"shelf_code_to": "CMI420",
			"qty": 100
		},
		{
			"item_code": "1000018",
			"line_number": 1,
			"unit_code": "TR",
			"wh_code_from": "CMI01",
			"shelf_code_from": "CMI100",
			"wh_code_to": "CMI01",
			"shelf_code_to": "CMI420",
			"qty": 300
		},
		{
			"item_code": "1000029",
			"line_number": 2,
			"unit_code": "TR",
			"wh_code_from": "CMI01",
			"shelf_code_from": "CMI100",
			"wh_code_to": "CMI01",
			"shelf_code_to": "CMI420",
			"qty": 100
		}
	]
}

Response

Response Success
HTTP Status201
Response BodyJSON

Response Success JSON Message

{
    "status" :  "success", 
    "message" : "create success"
}
Response Error
HTTP Status400
Response BodyJSON

Response Success JSON Message

{
    "status" :  "error",
    "message" : "Message Error"
}