Skip to content

Add Customer

เพิ่มข้อมูลลูกค้า

Title Add Customer

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

Header Request

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

Header Example

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

Data Params

Field NameTypeDescriptionRequired
codeStringรหัสลูกค้าT
prefixnameStringคำนำหน้าT
name_1Stringชื่อT
addressStringที่อยู่T
provinceStringจังหวัดT
tambonStringแขวง/ตำบลT
amperStringเขต/อำเภอT
zip_codeStringรหัสไปรษณีย์T
telephoneStringโทรศัทพ์T
remarkStringหมายเหตุT
arm_codeStringARM CodeT
sale_codeStringพนักงานขายT
area_codeStringเขตการขายT
discount_billStringส่วนลดT
account_codeStringรหัสผังบัญชีT
credit_dayNumberจำนวนวันเครดิตT
credit_moneyNumberวงเงินเครดิตT
branch_codeStringรหัสสาขาT
tax_idStringเลขประจำตัวผู้เสียภาษีT
latitudeNumberLatitudeT
longitudeNumberLongitudeT
pricelevelNumberระดับราคาT
mobile_phoneStringหมายเลขโทรศัทพ์T
contactStringผู้ติดต่อT
ar_typeStringประเภทลูกหนี้T
customer_storeStringCustomer StoreT
code_oldStringรหัสเก่าF
nfc_idStringNFC IDF

Response Success

HTTP Status : 201

Response JSON :

json
{
"status" :  "success",
"message" : "create success"
}

Response Error

HTTP Status : 400

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

Example

json
{ 
  "code" : "C0001", 
  "prefixname" : "",
  "name_1" : "ลูกค้าตัวอย่าง", 
  "address" : "123 คลองเตย",
  "province" : "10",  
  "tambon" : "103301",
  "amper" : "1033",  
  "zip_code" : "10200",
  "telephone" : "0880000000",
  "remark" : "",
  "arm_code" : "99",
  "sale_code" : "1024", 
  "area_code" : "2048",
  "discount_bill" : "3%",
  "account_code" : "102500",
  "credit_day" : 60,
  "credit_money" : 200000,
  "branch_code" : "0000",
  "tax_id" : "123456789012",
  "latitude" : 97.26545,
  "longitude" : 102.02561,
  "pricelevel" : 1,
  "mobile_phone" : "99999",
  "contact" : "contact2",
  "ar_type" : "15",
  "customer_store" : "16"
}