Picture

Create Customer

Picture

Request Header

Name
Type
Required
Description
Authorization
String
Required
OAuth token obtained after the user has provided consent and the authorized partner calls the /authorization/Connect/Token endpoint to retrieve this token
Content-Type
String
Required
Content type of request payload
Value:
- application/json
Ocp-Apim-Subscription-Key
String
Required

Request Body

Name
Type
Required
Description
owners
String[]
Optional

contactName
String
Required
ช่ือผู้ติดต่อ
customerCode
String
Required
รหัสลูกค้า
customerName
String
Required
ชื่อลูกค้า
customerType
Integer
Required
ประเภทลูกค้า Lead=11100, Prospect=11200, Customer=11300
phone
String
Optional
เบอร์โทรศัพท์
mobile
String
Optional
เบอร์โทรศัพท์มือถือ
notes
String
Optional
รายละเอียดเพิ่มเติม
email
String
Optional
อีเมล
socialAccount
String
Optional
บัญชี Social
sourceOfLead
String
Optional

locations
List<Locations>
Optional
รายการที่ตั้ง
aliases
String[]
Optional
รายการนามแฝง
interestIds
Integer[]
Optional
รายการรหัสที่สนใจ
classificationId
Long
Optional
รหัสหมวดหมู่
groupId
Integer
Optional
รหัสกลุ่ม
creditLimit
String
Optional
วงเงิน
leadStatus
Integer
Optional
สถานะ Lead
customerStateId
Integer
Optional
รหัสสถานะของลูกค้า

Example Request

curl --location --request POST 'https://api.veniocrm.com/dev/v1/Customers' \

--header 'Ocp-Apim-Subscription-Key;' \

--header 'Authorization: Bearer ' \

--header 'Content-Type: application/json' \

--data-raw '{

"owners": [

"string"

],

"contactName": "string",

"customerCode": "string",

"customerName": "string",

"customerType": 0,

"phone": "string",

"mobile": "string",

"notes": "string",

"isActive": true,

"email": "string",

"socialAccount": "string",

"sourceOfLead": 0,

"locations": [{

"addressId": 0,

"branch": "string",

"locationName": "string",

"location": "string",

"address": "string",

"province": "string",

"zipCode": "string",

"placeId": "string",

"latitude": 0.0,

"longitude": 0.0

}],

"aliases": [

"string"

],

"interestIds": [

0

],

"classificationId": 0,

"groupId": 0,

"creditLimit": 0.0

}'

Download postman Collection

Response

Name
Type
Description
customerId
Long
รหัส Id ลูกค้า
companyId
Integer
รหัสบริษัท
customerCode
String
รหัสลูกค้า
customerName
String
รหัสลูกค้า
type
Integer
13001 = individual, 13002 = Business
customerType
Integer
ประเภทลูกค้า Prospect=11200, Customer=11300, Lead=11100
isActive
Boolean

createdByUserId
String
รหัสของผู้สร้าง
dateCreated
DateTime
เวลาที่สร้าง
modifiedByUserId
String
รหัสของผู้ที่แก้ไข
dateModified
DateTime
เวลาที่แก้ไข
leadStatus
Integer
สถานะของ Lead
email
String
ชื่อ Email
sourceOfLead
Integer

name
String
ชื่อลูกค้า
customerOwnersStr
String[]
pictureUrl
String
Url รูปภาพ
addresses
List<Address>
รายการที่อยู่
customerInterests
List<CustomerInterest>

Example Response

{

    "data": {

        "value": {

            "customerId": xxxxxx,

            "companyId": xxxx,

            "customerCode": "code-xxx",

            "customerName": "namexxxx",

            "type": 13002,

            "customerType": 11100,

            "isActive": true,

            "createdByUserId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",

            "dateCreated": "2021-09-15 14:48:21.5133456+07:00",

            "modifiedByUserId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",

            "dateModified": "2021-09-15 14:48:21.5133474+07:00",

            "leadStatus": 110064,

            "email": "test@gmail.com",

            "sourceOfLead": 110130,

            "name": "nametest",

            "customerOwnersStr": [],

            "pictureUrl": "Customer/xxxxxx/Thumbnail?v=xxxxxxxxxxx",

            "addresses": [],

            "customerInterests": []

        },

        "formatters": [],

        "statusCode": 200

    },

    "statusCode": 1000,

    "httpStatusCode": 200

}

Response Codes

HTTP Status Code
Description
200
สร้างข้อมูลลูกค้าสำเร็จ
400
ข้อมูลลูกค้าไม่ถูกต้อง
401
Unauthorized
403
Forbidden
© Copyright 2021 Gofive Co., Ltd. All right reserved.