客戶標籤

搜尋

GET https://{API_DOMAIN}/api/v1/contact-tag
curl -X GET
    -H "Content-Type: application/json"
    '{"name": "vip"}'
    https://{API_HOST}/api/v1/contact-tag

Form Data

下表為可使用的過濾條件

Response

{
    "data": [
        {
            "id": 1,
            "name": "高消費",
            "description": null,
            "contacts_count": 1
        },
        {
            "id": 2,
            "name": "已婚",
            "description": null,
            "contacts_count": 5
        }
    ],
    "links": {
        "first": "http://dev.dev.firstline.cc/api/v1/contact-tag?page=1",
        "last": "http://dev.dev.firstline.cc/api/v1/contact-tag?page=2",
        "prev": null,
        "next": "http://dev.dev.firstline.cc/api/v1/contact-tag?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 2,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "http://dev.dev.firstline.cc/api/v1/contact-tag?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "http://dev.dev.firstline.cc/api/v1/contact-tag?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "http://dev.dev.firstline.cc/api/v1/contact-tag?page=2",
                "label": "Next »",
                "active": false
            }
        ],
        "path": "http://dev.dev.firstline.cc/api/v1/contact-tag",
        "per_page": 15,
        "to": 15,
        "total": 30
    }
}

取得單筆資料

GET https://{API_DOMAIN}/api/v1/contact-tag/{{ contact_tag }}
curl -X GET
    -H "Content-Type: application/json"
    https://{API_HOST}/api/v1/contact-tag/1

URL Parameters

Response

{
    "data": {
        "id": 1,
        //標籤名稱
        "name": "高消費",
        //標籤描述
        "description": null,
        //擁有此標籤客戶數
        "contacts_count": 1
    }
}

新增

POST https://{API_DOMAIN}/api/v1/contact-tag
    '{"name": "高級會員", "description": "年繳" }'
    https://{API_HOST}/api/v1/contact-tag

Form Data

回傳 json 格式

{
    "data": {
        "id": 1,
        "name": "高級會員",
        "description": "年繳會員",
        "contacts_count": 0
    }
}

更新

PUT https://{API_DOMAIN}/api/v1/contact-tag/{{ contact_tag }}
curl -X PUT
    -H "Content-Type: application/json"
    '{"name": "月費會員" }'
    https://{API_HOST}/api/v1/contact-tag/1

URL Parameters

Response

{
    "data": {
        "id": 1,
        "name": "高消費",
        "description": null,
        "contacts_count": 1
    }
}

Last updated