☎️電話號碼
搜尋電話號碼
GET https://{API_DOMAIN}/api/v1/phone-numbercurl -X GET
    -H "Content-Type: application/json"
    '{"type": 0, "number": "0928846763"}'
    https://{API_HOST}/api/v1/phone-numberForm Data
下表為可使用的過濾條件
PARAMETER
REQUIRED
DEFAULT
TYPE
DESCRIPTION
contact_id
false
NULL
Number
客戶的 id (可透過 搜尋客戶 取得客戶的 id)
type
false
NULL
Number
0: 住家, 1: 公司, 2: 手機, 3: 傳真, 4: 其他
number
false
NULL
String
電話號碼
extension
false
NULL
String
分機號碼
description
false
NULL
String
備註
Response
{
    "data": [
        {
            "id": 245621,
            "type": 0,
            "extension": null,
            "number": "0928846763",
            "description": null,
            "profile_id": 1935008,
            "phone_contact": {
                "id": 480,
                "contact_id": 1935038,
                "phone_number_id": 245621,
                "is_visible": true
            }
        }
    ],
    "links": {
        "first": "https://firstline.localhost/api/phone-number?number=0928846763&contact_id=1935038&page=1",
        "last": "https://firstline.localhost/api/phone-number?number=0928846763&contact_id=1935038&page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://firstline.localhost/api/phone-number",
        "per_page": 15,
        "to": 2,
        "total": 2
    }
}取得電話號碼
https://{API_DOMAIN}/api/v1/phone-number/{phone_number}curl -X GET
    -H "Content-Type: application/json"
    https://{API_HOST}/api/v1/245621URL Parameters
PARAMETER
REQUIRED
DEFAULT
TYPE
DESCRIPTION
Response
請參考電話號碼的回應格式
PROPERTY
TYPE
DESCRIPTION
{
    "data": {
        "id": 245621,
        "type": 0,
        "extension": null,
        "number": "0928846763",
        "description": null,
        "profile_id": 1935008,
        "phone_contact": {
            "id": 480,
            "contact_id": 1935038,
            "phone_number_id": 245621,
            "is_visible": true
        }
    }
}新增電話號碼
POST https://{API_DOMAIN}/api/v1/phone-numbercurl -X POST
    -H "Content-Type: application/json"
    '{"type": 0, "number": "23255780374507", "extension": "54 311", "description": "Up-sized mobile focusgroup"}'
    https://{API_HOST}/api/v1/phone-numberForm Data
PARAMETER
REQUIRED
DEFAULT
TYPE
DESCRIPTION
contact_id
true
NULL
Number
客戶的 id (可透過 搜尋客戶 取得客戶的 id)
type
true
NULL
Number
0: 住家, 1: 公司, 2: 手機, 3: 傳真, 4: 其他
number
true
NULL
String
電話號碼
extension
false
NULL
String
分機號碼
description
false
NULL
String
備註
回傳 json 格式
{
    "data": {
        "id": 1,
        "type": 0,
        "extension": "54 311",
        "number": "23255780374507",
        "description": "Up-sized mobile focusgroup",
        "profile_id": 1
    }
}更新電話號碼
PUT https://{API_DOMAIN}/api/v1/phone-number/{phone_number}curl -X PUT
    -H "Content-Type: application/json"
    '{"type": 2, "number": "0939888999", "extension": ""}'
    https://{API_HOST}/api/v1/phone-number/1URL Parameters
PARAMETER
REQUIRED
DEFAULT
TYPE
DESCRIPTION
phone_number
true
NULL
Number
電話號碼的id
Form Data
PARAMETER
REQUIRED
DEFAULT
TYPE
DESCRIPTION
contact_id
true
NULL
Number
客戶的 id
type
false
NULL
Number
0: 住家, 1: 公司, 2: 手機, 3: 傳真, 4: 其他
number
false
NULL
String
電話號碼
extension
false
NULL
String
分機號碼
description
false
NULL
String
備註
Response
請參考電話號碼的回應格式
{
    "data": {
        "id": 1,
        "type": 2,
        "extension": "",
        "number": "0939888999",
        "description": "Up-sized mobile focusgroup",
        "profile_id": 1
    }
}刪除電話號碼
Http status 為 204
DELETE https://{API_DOMAIN}/api/v1/phone-number/{phone_number}curl -X DELETE
    -H "Content-Type: application/json"
    https://{API_HOST}/api/v1/phone-number/1URL Parameters
PARAMETER
REQUIRED
DEFAULT
TYPE
DESCRIPTION
phone_number
true
NULL
Number
電話號碼的id
回傳 json 格式
{}Last updated