😀客戶

搜尋

透過 GET 請求取得 KB(Knowledge Base)清單,並可依據下列查詢參數進行過濾、排序與分頁。

GET https://{API_HOST}/api/v1/kb

根據下方的 Query Parameters 參數進行過濾篩選。

curl -X GET
    -H "Content-Type: application/json"
    https://{API_HOST}/api/v1/kb?xxxx

Query Parameters

名稱
類型
必填
說明
範例

page

integer

頁碼(從 1 開始)

page=2

search

string

按關鍵字過濾 KB 名稱/內容

search=security

is_public

integer

是否為公開的知識庫文章

is_public=1

Response

PROPERTY

TYPE

DESCRIPTION

data

Array of objects

知識庫文章陣列

meta

Object

頁籤資訊

取得

GET https://{API_DOMAIN}/api/v1/contact/{contact}

URL Parameters

PARAMETER

REQUIRED

DEFAULT

TYPE

DESCRIPTION

contact

True

NULL

Number

客戶的 ID

curl -X get
    -H "Content-Type: application/json"
    https://{API_HOST}/api/v1/contact/1

Response

請參考客戶回應格式。

PROPERTY

TYPE

DESCRIPTION

data

Object


{
    "data": {
        "id": 1,
        "name": "Angelita D'Amore",
        "first_name": "Angelita",
        "last_name": "D'Amore",
        "membership_no": "8771639",
        "identity_no": "418099",
        "gender": 0,
        "birth_at": "1985-08-27",
        "profile_id": 1,
        "profile": {
            "id": 1,
            "phones": []
        },
        "email_contacts": [],
        "cz_cols": [
            {
                "id": 1,
                "value": "19999",
                "category_id": 1
            },
            {
                "id": 4,
                "value": "51",
                "category_id": 1
            },
            {
                "id": 5,
                "value": null,
                "category_id": 1
            }
        ]
    }
}

新增

POST https://{API_HOST}/api/v1/contact

根據下方的 Query Parameters 表單的參數進行建立。

curl -X POST
    -H "Content-Type: application/json"
    '{"first_name":"abc","last_name":"cde"}'
    https://{API_HOST}/api/v1/contact?xxxx

Query Parameters

PARAMETER

REQUIRED

DEFAULT

TYPE

DESCRIPTION

membership_no

false

NULL

String

會員編號

identity_no

false

NULL

String

身分證

gender

false

NULL

Number

性別 0: 女 1: 男

first_name

true

NULL

String

last_name

false

NULL

String

birth_at

false

NULL

Date

出生日期

cz_cols

false

NULL

Array

自訂欄位,參數型態參考下方 CzCol 表格說明

company_ids

false

NULL

Array

公司系統編號

Response

請參考客戶回應格式


{
    "data": {
        "id": 2,
        "name": "abc cde",
        "first_name": "abc",
        "last_name": "cde",
        "membership_no": null,
        "identity_no": null,
        "gender": null,
        "birth_at": null,
        "profile_id": 1,
        "profile": {
            "id": 1,
            "phones": []
        },
        "cz_cols": [
            {
                id: 4,
                value: "123456"
            },
            {
                id: 7,
                value: "apple"
            }
        ],
    }
}

更新

PUT https://{API_HOST}/api/v1/contact/{id}

URL Parameters

PARAMETER

DESCRIPTION

id

客戶的 ID

curl -X PUT
    -H "Content-Type: application/json"
    '{"first_name":"First","last_name":"Line"}'
    https://{API_HOST}/api/v1/contact/2

Query Parameters

PARAMETER

REQUIRED

DEFAULT

TYPE

DESCRIPTION

membership_no

false

NULL

String

會員編號

identity_no

false

NULL

String

身分證

gender

false

NULL

Number

性別 0: 女 1: 男

first_name

false

NULL

String

last_name

false

NULL

String

birth_at

false

NULL

Date

出生日期

cz_cols

false

NULL

Array

自訂欄位,參數型態參考下方 CzCol 表格說明

tag_ids

false

NULL

Array

客戶標籤,傳入客戶標籤 ID

company_ids

false

NULL

Array

公司系統編號

Response

請參考客戶回應格式


{
    "data": {
        "id": 2,
        "name": "First Line",
        "first_name": "First",
        "last_name": "Line",
        "membership_no": null,
        "identity_no": null,
        "gender": null,
        "birth_at": null,
        "profile_id": 1,
        "profile": {
            "id": 1,
            "phones": []
        },
        "cz_cols": [
            {
                id: 4,
                value: "123456"
            },
            {
                id: 7,
                value: "apple"
            },
            {
                id: 18,
                value:  ["A", "B", "C"]
            }
        ],
        "tag_id": [4, 6]
    }
}

刪除

DELETE https://{API_HOST}/api/v1/contact/{id}

URL Parameters

PARAMETER

DESCRIPTION

id

客戶的系統編號
 #ID

curl -X DELETE
    -H "Content-Type: application/json"
    https://{API_HOST}/api/v1/contact/2

Last updated