Gofive OpenAPI
empeoVenioeTaxGo
empeoVenioeTaxGo
  1. Customer
  • Introduction
  • Activity
    • Get a Activity
      GET
    • Activities Enquiry
      POST
  • Authentication API
    • Authorization
      POST
  • Customer
    • Create or Update customer
      POST
    • Get a Customer By CustomerCode
      GET
    • Customers Enquiry
      POST
    • Get a Customer By CustomerName
      GET
    • Create Customer Satisfaction
      POST
    • Add Customer Event
      POST
    • Get Customer Events by Customer Code
      GET
    • Edit Customer Event
      PUT
    • Delete Customer Event
      DELETE
    • Get Customer Event Types
      GET
  • Case
    • Add Case
      POST
    • Edit Case by CaseNo
      PUT
    • Get Case by CaseNo
      GET
    • Get Case Categories
      GET
  • Deal
    • Create Deal
      POST
    • Update Deal
      PUT
    • Deal Enquiry
      POST
    • Get Deal
      GET
    • Get Deal Board
      GET
    • Get Deal Stage
      GET
    • Get Deal Interest
      GET
    • Get DealLabel
      GET
    • Get Deal Missed Reason Categories
      GET
  • Employee
    • Employees Enquiry
    • Get a Employee
  • Expense
    • Create Expense
    • Update Expense
    • Expense Enquiry
    • Get a Expense
  • Product
    • Create Or Update Products
    • Get a Product Ticket
    • Get Products With Take & Status
    • Get a Product by ProductCode
    • Get Product Groups
    • Get Product Properties
    • Get Products By Filter
    • Verify Serial Number
    • /v3/Products/serials/status
    • Create or Update Codeguard Products
    • Update Product Stock
    • /v1/products/units
    • /v1/products/units Copy
  • Quotation
    • Create Update Quotation
    • Convert Quotation To SalesOrder
    • Quotation Enquiry
    • Get a Quotation By QuotationNo
    • Cancel Quotation
  • SalesOrder
    • Create Or Update SalesOrder
    • Get a SalesOrders By Id
    • Get a SalesOrder By SalesOrderNo
    • Get Sale Order Attachment
    • Reject SaleOrder
    • Approve Sale Order
    • Update SalesOrder Payment
    • Update SalesOrder Tracking Number
  • Webhooks
    • Webhook Payload
  • Task
    • CreateTask
  • Setting
    • Get HeaderTemplate
  1. Customer

Create or Update customer

POST
https://api.gofive.co.th/v3/customers
VenioCRM/Customer
เพิ่ม/แก้ไขข้อมูล Customer

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params
Content-Type
string 
required
Example:
application/json
Ocp-Apim-Subscription-Key
string 
required
รหัส subscription keyลูกค้า
Example:
<Your Subscription-Key>
Body Params application/json
customerCode
string  | null 
optional

รหัสลูกค้า

ถ้าไม่ใส่(null)จะเป็น การสร้างลูกค้าใหม่
กรณีที่ใส่มาจะเป็นการอัพเดตข้อมูลลูกค้า idเดิม
customerName
string 
required
ชื่อลูกค้า Required [ชื่อลูกค้าห้ามซ้ำกัน]
customerState
integer 
required
สถานะของลูกค้า Required : 1 = Lead , 2 = Prospect , 3 = Customer
customerStatus
integer  | null 
optional
สถานะการใช้งาน 0 = active , 1 = ended (Required Note) , 2 = closed (Required Note)
customerType
integer  | null 
optional
ประเภท 1 = Business , 2 = individual
customerPicture
string  | null 
optional
รูปของลูกค้า โดยรับเป็น URL
customer2ndName
string  | null 
optional
ชื่อรองลูกค้า เช่น ชื่อลูกค้าภาษาอื่นๆ
customerAliases
array[string] | null 
optional
รายการนามแฝง
customerTaxNo
string  | null 
optional
เลขประจำตัวผู้เสียภาษี
branchCode
string  | null 
optional
รหัสสาขา
customerPhone
string  | null 
optional
เบอร์โทรศัพท์ลูกค้า
customerMobile
string  | null 
optional
เบอร์มือถือลูกค้า
customerEmail
string 
optional
อีเมลลูกค้า
customerPosition
string  | null 
optional
ตำแหน่งลูกค้า
customerGender
integer  | null 
optional
เพศลูกค้า [1 = Male , 2 = Female]
customerMaritalStatus
integer  | null 
optional
สถานภาพสมรส [1 = Single , 2 = Engaged , 3 = Married , 4 = Separated , 5 = Disvorced , 6 = Widowed]
customerBirthdate
string  | null 
optional
วันเกิดลูกค้า โดยมี Format : YYYY-MM-DD
customerIncome
string  | null 
optional
รายได้ ** ช่วงรายได้*ทำการสร้างให้ใหม่เมื่อข้อมูลไม่ตรงกัน
creditLimit
string  | null 
optional
งบลูกค้า
*ไม่มีใช้ใน venio
addresses
array [object {5}]  | null 
optional
รายการที่อยู่
locationAddress
string 
required
ที่อยู่
locationName
string 
required
ชื่อสถานที่
locationType
integer 
required
ประเภทสถานที่ [1 = billing address , 2 = shipping address]
latitude
number  | null 
optional
ละติจูด
longitude
number  | null 
optional
ลองจิจูด
sourceName
string  | null 
optional
แหล่งที่มาลูกค้า
customerGroupName
string  | null 
optional
กลุ่มลูกค้า [*ทำการสร้างให้ใหม่เมื่อข้อมูลไม่ตรงกัน]
leadStatus
integer  | null 
optional
สถานะผู้สนใจ 1 = New , 2 = Followup , 3 = Unqualified , 4 = Interested [*ถ้าไม่มีการส่งข้อมูลมา Lead = 1 ,Prospect = 2, Customer = 3]
unqulifiedReasonName
string  | null 
optional
หัวข้อเหตุผลที่พลาด [*ระบบจะ Required เมื่อ leadStatus = 3 & customerState = 1 [Unqualified] เท่านั้น]
unqulifiedReasonNote
string  | null 
optional
เหตุผล [*ระบบจะ Required เมื่อ leadStatus = 3 & customerState = 1 [Unqualified] เท่านั้น]
interestsName
array[string] | null 
optional
ความสนใจ [*ทำการสร้างให้ใหม่เมื่อข้อมูลไม่ตรงกัน]
customerTags
array[string] | null 
optional
แท็กลูกค้า
classificationName
string  | null 
optional
คลาสลูกค้า โดยใส่ค่าได้ มากที่สุด 3 ตัวอักษร
customFields
array [object {2}]  | null 
optional
ฟิลด์ข้อมูลลูกค้าที่กำหนดเอง
customFieldName
string 
required
ชื่อหัวข้อฟิลด์
customFieldValue
array[string]
required
ข้อมูลของฟิลด์
contacts
array [object {10}] 
optional
รายการผู้ติดต่อ
*ถ้ามีข้อมูล
customerType = business
contactName
string 
required
ผู้ติดต่อ
contactStatus
boolean  | null 
optional
true = active , false = inactive
contactPicture
string  | null 
optional
รูปของผู้ติดต่อ ใช้เป็น URL ของรูป
contactPhone
string  | null 
optional
เบอร์โทรศัพ ของผู้ติดต่อ
contactMobile
string  | null 
optional
เบอร์โทรศัพมือถือ ของผู้ติดต่อ
contactEmail
string  | null 
optional
Email ของผู้ติดต่อ
contactPosition
string  | null 
optional
ตำแหน่ง ของผู้ติดต่อ
contactBirthdate
string  | null 
optional
วันเกิด ของผู้ติดต่อ โดยมี Format : "YYYY-MM-DD"
contactNote
string  | null 
optional
รายละเอียดเพิ่มเติม
contactSocialAccount
object  | null 
optional
Social Account ของผู้ติดต่อ
customerSocialAccount
object  | null 
optional
Social Account ของลูกค้า
facebook
string 
optional
Facebook ลูกค้า
line
string 
optional
Line ลูกค้า
whatsapp
string 
optional
whatsApp ลูกค้า
skype
string 
optional
skype ลูกค้า
instagram
string 
optional
Instagram ลูกค้า
linkedin
string 
optional
LinkedIn ลูกค้า
telegram
string 
optional
Telegram
wechat
string 
optional
wechat ลูกค้า
customerNote
string  | null 
optional
เมื่อ CustomerStatus เป็น Ended , Closed
owners
array[string]
optional
รหัสพนักงาน
primaryOwner
string 
optional
รหัสพนักงานที่จะตั้งเป็นผู้รับผิดชอบหลัก
Example
{
  "customerCode": "string", // รหัสลูกค้า [ถ้าไม่ใส่จะเป็น การสร้างลูกค้าใหม่]
  "customerName": "string", // ชื่อลูกค้า Required [ชื่อลูกค้าห้ามซ้ำกัน]
  "customerState": 0, // <integer> สถานะของลูกค้า Required : 1 = Lead , 2 = Prospect , 3 = Customer 
  "customerStatus": 0, // <integer> สถานะการใช้งาน 0 = active , 1 = ended (Required Note) , 2 = closed (Required Note)
  "customerType": 0, //<integer> ประเภท 1 = Business , 2 = individual
  "customerPicture": "string", // รูปของลูกค้า โดยรับเป็น URL
  "customer2ndName": "string", // ชื่อรองลูกค้า เช่น ชื่อลูกค้าภาษาอื่นๆ
  "customerAliases": [
    "string",
    "string"
  ], // รายการนามแฝง
  "customerTaxNo": "string", // เลขประจำตัวผู้เสียภาษี
  "creditLimit":"string",
  "branchCode": "string", // รหัสสาขา
  "customerPhone": "string", // เบอร์โทรศัพท์ลูกค้า
  "customerMobile": "string", // เบอร์มือถือลูกค้า
  "customerEmail": "string", // อีเมลลูกค้า
  "customerPosition": "string", // ตำแหน่งลุกค้า
  "customerGender": 0, //<integer> เพศลูกค้า [1 = Male , 2 = Female]
  "customerMaritalStatus": 0, // <integer> สถานภาพสมรส [1 = Single , 2 = Engaged , 3 = Married , 4 = Separated , 5 = Disvorced , 6 = Widowed]
  "customerBirthdate": "2022-12-30", // วันเกิดลูกค้า โดยมี Format : YYYY-MM-DD
  "customerIncome": "string",
  "addresses": [
    {
      "locationAddress": "string", // Required ที่อยู่
      "locationName": "string", // Required ชื่อสถานที่
      "locationType": 0, //<integer> Required ประเภทสถานที่ [1 = billing address , 2 = shipping address]
      "latitude": 0.0, // ละติจูด
      "longitude": 0.0 // ลองจิจูด
    }
  ],
  "sourceName": "string", // แหล่งที่มาลูกค้า
  "customerGroupName": "string", // กลุ่มลูกค้า [*ทำการสร้างให้ใหม่เมื่อข้อมูลไม่ตรงกัน]
  "leadStatus": 0, // สถานะลูกค้า 1 = New , 2 = Followup , 3 = Unqualified , 4 = Interested [*ถ้าไม่มีการส่งข้อมูลมา Lead = 1 ,Prospect =  4 , Customer = 4]
  "unqulifiedReasonName": "string", // หัวข้อเหตุผลที่พลาด [*ระบบจะ Required เมื่อ leadStatus = 3 & customerState = 1 [Unqualified] เท่านั้น]
  "unqulifiedReasonNote": "string", // เหตุผล [*ระบบจะ Required เมื่อ leadStatus = 3 & customerState = 1 [Unqualified] เท่านั้น]
  "interestsName": [
    "string",
    "string"
  ], // ความสนใจ [*ทำการสร้างให้ใหม่เมื่อข้อมูลไม่ตรงกัน]
  "customerTags": [
    "string"
  ],
  "classificationName": "string", // คราสลูกค้า โดยใส่ค่าได้ มากที่สุด 3 ตัวอักษร
  "customFields": [
    {
      "customFieldName": "string", // ชื่อหัวข้อฟิลด์ Required 
      "customFieldValue": [
        "string"
      ] // ข้อมูลของฟิลด์ Required
    }
  ],
  "contacts": {
    "contactName": "string", // ผู้ติดต่อ Required
    "contactStatus": true, // true = active , false = inactive
    "contactPicture": "string", // รูปของผู้ติดต่อ ใช้เป็น URL ของรูป
    "contactPhone": "string", // เบอร์โทรศัพ ของผู้ติดต่อ
    "contactMobile": "string", // เบอร์โทรศัพมือถือ ของผู้ติดต่อ
    "contactEmail": "string", // Email ของผู้ติดต่อ
    "contactPosition": "string", // ตำแหน่ง ของผู้ติดต่อ
    "contactBirthdate": "2000-00-04", // วันเกิด ของผู้ติดต่อ โดยมี Format : "YYYY-MM-DD"
    "contactNote": "string"
  },
  "customerSocialAccount": {
    "facebook": "string",
    "line": "string",
    "whatsapp": "string",
    "skype": "string",
    "instagram": "string",
    "linkedin":"string",
    "telegram":"string",
    "wechat": "string"
  }, // Social Account ของลูกค้า 
  "customerNote": "string", // Required เมื่อ CustomerStatus เป็น Ended , Closed
  "owners": [
    "string"
  ] // รหัสพนังงาน
  "primaryOwner": "string"//รหัสพนักงานที่จะตั้งเป็นผู้รับผิดชอบหลัก
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.gofive.co.th/v3/customers' \
--header 'Ocp-Apim-Subscription-Key: <Your Subscription-Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "customerCode": "string", // รหัสลูกค้า [ถ้าไม่ใส่จะเป็น การสร้างลูกค้าใหม่]
  "customerName": "string", // ชื่อลูกค้า Required [ชื่อลูกค้าห้ามซ้ำกัน]
  "customerState": 0, // <integer> สถานะของลูกค้า Required : 1 = Lead , 2 = Prospect , 3 = Customer 
  "customerStatus": 0, // <integer> สถานะการใช้งาน 0 = active , 1 = ended (Required Note) , 2 = closed (Required Note)
  "customerType": 0, //<integer> ประเภท 1 = Business , 2 = individual
  "customerPicture": "string", // รูปของลูกค้า โดยรับเป็น URL
  "customer2ndName": "string", // ชื่อรองลูกค้า เช่น ชื่อลูกค้าภาษาอื่นๆ
  "customerAliases": [
    "string",
    "string"
  ], // รายการนามแฝง
  "customerTaxNo": "string", // เลขประจำตัวผู้เสียภาษี
  "creditLimit":"string",
  "branchCode": "string", // รหัสสาขา
  "customerPhone": "string", // เบอร์โทรศัพท์ลูกค้า
  "customerMobile": "string", // เบอร์มือถือลูกค้า
  "customerEmail": "string", // อีเมลลูกค้า
  "customerPosition": "string", // ตำแหน่งลุกค้า
  "customerGender": 0, //<integer> เพศลูกค้า [1 = Male , 2 = Female]
  "customerMaritalStatus": 0, // <integer> สถานภาพสมรส [1 = Single , 2 = Engaged , 3 = Married , 4 = Separated , 5 = Disvorced , 6 = Widowed]
  "customerBirthdate": "2022-12-30", // วันเกิดลูกค้า โดยมี Format : YYYY-MM-DD
  "customerIncome": "string",
  "addresses": [
    {
      "locationAddress": "string", // Required ที่อยู่
      "locationName": "string", // Required ชื่อสถานที่
      "locationType": 0, //<integer> Required ประเภทสถานที่ [1 = billing address , 2 = shipping address]
      "latitude": 0.0, // ละติจูด
      "longitude": 0.0 // ลองจิจูด
    }
  ],
  "sourceName": "string", // แหล่งที่มาลูกค้า
  "customerGroupName": "string", // กลุ่มลูกค้า [*ทำการสร้างให้ใหม่เมื่อข้อมูลไม่ตรงกัน]
  "leadStatus": 0, // สถานะลูกค้า 1 = New , 2 = Followup , 3 = Unqualified , 4 = Interested [*ถ้าไม่มีการส่งข้อมูลมา Lead = 1 ,Prospect =  4 , Customer = 4]
  "unqulifiedReasonName": "string", // หัวข้อเหตุผลที่พลาด [*ระบบจะ Required เมื่อ leadStatus = 3 & customerState = 1 [Unqualified] เท่านั้น]
  "unqulifiedReasonNote": "string", // เหตุผล [*ระบบจะ Required เมื่อ leadStatus = 3 & customerState = 1 [Unqualified] เท่านั้น]
  "interestsName": [
    "string",
    "string"
  ], // ความสนใจ [*ทำการสร้างให้ใหม่เมื่อข้อมูลไม่ตรงกัน]
  "customerTags": [
    "string"
  ],
  "classificationName": "string", // คราสลูกค้า โดยใส่ค่าได้ มากที่สุด 3 ตัวอักษร
  "customFields": [
    {
      "customFieldName": "string", // ชื่อหัวข้อฟิลด์ Required 
      "customFieldValue": [
        "string"
      ] // ข้อมูลของฟิลด์ Required
    }
  ],
  "contacts": {
    "contactName": "string", // ผู้ติดต่อ Required
    "contactStatus": true, // true = active , false = inactive
    "contactPicture": "string", // รูปของผู้ติดต่อ ใช้เป็น URL ของรูป
    "contactPhone": "string", // เบอร์โทรศัพ ของผู้ติดต่อ
    "contactMobile": "string", // เบอร์โทรศัพมือถือ ของผู้ติดต่อ
    "contactEmail": "string", // Email ของผู้ติดต่อ
    "contactPosition": "string", // ตำแหน่ง ของผู้ติดต่อ
    "contactBirthdate": "2000-00-04", // วันเกิด ของผู้ติดต่อ โดยมี Format : "YYYY-MM-DD"
    "contactNote": "string"
  },
  "customerSocialAccount": {
    "facebook": "string",
    "line": "string",
    "whatsapp": "string",
    "skype": "string",
    "instagram": "string",
    "linkedin":"string",
    "telegram":"string",
    "wechat": "string"
  }, // Social Account ของลูกค้า 
  "customerNote": "string", // Required เมื่อ CustomerStatus เป็น Ended , Closed
  "owners": [
    "string"
  ] // รหัสพนังงาน
  "primaryOwner": "string"//รหัสพนักงานที่จะตั้งเป็นผู้รับผิดชอบหลัก
}'

Responses

🟢201Create Type individual Success
application/json
Body
status
object 
required
code
string 
required

สถานะของ Business Code ถ้า
Success = 1000
Error 1 ตัว = 4001
Error มากกว่า 1 ตัว = 4002    
หรือเป็น Subcode ที่ต้องการจะแสดงเพื่อสื่อความหมายของ Error โดย subcode จะเป็นตัวเดียวกับ business error code หรือไม่ก็ได้ เพื่อความสะดวกในการแสดงผล

description
string 
required
คำอธิบายข้อความที่จะแสดง
data
object 
required
customerId
string 
required
รหัส id ลูกค้า
customerName
string 
required
ชื่อลูกค้า Required [ชื่อลูกค้าห้ามซ้ำกัน]
customerCode
string  | null 
optional
รหัสลูกค้า [ถ้าไม่ใส่จะเป็น การสร้างลูกค้าใหม่]
customerState
integer 
required
สถานะของลูกค้า Required : 1 = Lead , 2 = Prospect , 3 = Customer
customerType
integer 
required
ประเภท 1 = Business , 2 = individual
customerStatus
integer 
required
สถานะการใช้งาน 0 = active , 1 = ended (Required Note) , 2 = closed (Required Note)
customer2ndName
string  | null 
optional
ชื่อรองลูกค้า เช่น ชื่อลูกค้าภาษาอื่นๆ
customerPicture
string  | null 
optional
รูปของลูกค้า โดยรับเป็น URL
customerAliases
array[string]
required
รายการนามแฝง
customerTaxNo
string  | null 
optional
เลขประจำตัวผู้เสียภาษี
branchCode
string  | null 
optional
รหัสสาขา
customerPhone
string  | null 
optional
เบอร์โทรศัพท์ลูกค้า
customerMobile
string  | null 
optional
เบอร์มือถือลูกค้า
customerMaritalStatus
integer  | null 
optional
สถานภาพสมรส [1 = Single , 2 = Engaged , 3 = Married , 4 = Separated , 5 = Disvorced , 6 = Widowed]
customerGender
integer  | null 
optional
เพศลูกค้า [1 = Male , 2 = Female]
customerPosition
string  | null 
optional
ตำแหน่งลูกค้า
customerEmail
string  | null 
optional
อีเมลลูกค้า
customerTags
array[string]
required
แท็กลูกค้า
customerGroupName
string 
required
กลุ่มลูกค้า [*ทำการสร้างให้ใหม่เมื่อข้อมูลไม่ตรงกัน]
customerSocialAccount
object 
required
Social Account ของลูกค้า
addresses
array [object {5}] 
required
ที่อยู่
sourceName
string  | null 
optional
แหล่งที่มาลูกค้า
classificationName
string 
required
คลาสลูกค้า โดยใส่ค่าได้ มากที่สุด 3 ตัวอักษร
customFields
array [object {2}] 
required
ฟิลด์ข้อมูลลูกค้าที่กำหนดเอง
owners
array[string]
required
รหัสพนังงาน
customerBirthdate
string  | null 
optional
วันเกิดลูกค้า โดยมี Format : YYYY-MM-DD
customerIncome
string  | null 
optional
รายได้ ** ช่วงรายได้*ทำการสร้างให้ใหม่เมื่อข้อมูลไม่ตรงกัน
creditLimit
string  | null 
optional
งบลูกค้า
*ไม่มีใช้ใน venio
unqulifiedReasonName
string  | null 
optional
หัวข้อเหตุผลที่พลาด [*ระบบจะ Required เมื่อ leadStatus = 3 & customerState = 1 [Unqualified] เท่านั้น]
unqulifiedReasonNote
string  | null 
optional
เหตุผล [*ระบบจะ Required เมื่อ leadStatus = 3 & customerState = 1 [Unqualified] เท่านั้น]
interestsName
array[string]
required
ความสนใจ [*ทำการสร้างให้ใหม่เมื่อข้อมูลไม่ตรงกัน]
customerNote
string 
optional
เมื่อ CustomerStatus เป็น Ended , Closed
leadStatus
integer 
required
สถานะผู้สนใจ 1 = New , 2 = Followup , 3 = Unqualified , 4 = Interested [*ถ้าไม่มีการส่งข้อมูลมา Lead = 1 ,Prospect = 2, Customer = 3]
Example
{
  "status": {
    "code": "1000",
    "description": "Success"
  },
  "data": {
    "customerId": "1",
    "customerName": "string",
    "customerCode": "string",
    "customerState": 3,
    "customerPicture": "string",
    "customer2ndName": "string",
    "customerAliases": [
      "string",
      "string"
    ],
    "branchCode": "",
    "customerPhone": "string",
    "customerMobile": "string",
    "customerEmail": "string",
    "customerSocialAccount": {
      "facebook": "string"
    },
    "customerPosition": "sales",
    "customerGender": 1,
    "customerMaritalStatus": 2,
    "customerBirthdate": "2000-12-30T00:00:00+0700",
    "addresses": [
      {
        "locationName": "string",
        "locationAddress": "string",
        "locationType": 2,
        "latitude": 0,
        "longitude": 0
      }
    ],
    "interestsName": [
      "string"
    ],
    "classificationName": "string",
    "customFields": [
      {
        "customFieldName": "string",
        "customFieldValue": [
          "string"
        ]
      }
    ],
    "customerType": 2,
    "customerNote": "string",
    "owners": [
      "string"
    ],
    "customerStatus": 0,
    "leadStatus": 1,
    "customerIncome": "string"
  }
}
🟢201Create Type Business Success
🟢200Update Success
🟠401Unauthorized
🟠403Forbidden
🟠400Bad Request
🔴500(E9905)
🟠401User authentication required V2.
Previous
Authorization
Next
Get a Customer By CustomerCode
Built with