Gofive OpenAPI
empeoVenioeTaxGo
empeoVenioeTaxGo
  1. Customer
  • Introduction
  • Activity
    • Activities Enquiry
      POST
    • Get a Activity By Id
      GET
    • Get a Activity By No
      GET
    • Get Key Activities
      GET
    • Create or Update Activity
      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
    • Get file categories
      GET
    • Attach files category
      POST
  • Case
    • Add Case
      POST
    • Edit Case by CaseNo
      PUT
    • Get Case by CaseNo
      GET
    • Get Case Categories
      GET
  • Contract
    • Get Contract By No
      GET
    • Get Contract Types
      GET
    • Get Contract Templates
      GET
    • Create or Update Contract
      POST
    • Create or Update Contract Service Agreement
      POST
    • Send Contract Document
      POST
  • Deal
    • Create Deal
    • Update Deal
    • Deal Enquiry
    • Get Deal
    • Get Deal Board
    • Get Deal Stage
    • Get Deal Interest
    • Get DealLabel
    • Get Deal Missed Reason Categories
  • 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
  • Chat
    • Post Send message
  • Storage
    • Upload files attachments
    • Get file attachments
    • Delete file attachments
  1. Customer

Create or Update customer

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

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/json

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 Code 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

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.
Modified at 2025-03-27 09:35:39
Previous
Authorization
Next
Get a Customer By CustomerCode
Built with