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
{
"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/{id}
curl -X GET
-H "Content-Type: application/json"
https://{API_HOST}/api/v1/contact-tag/1
{
"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
{
"data": {
"id": 1,
"name": "高級會員",
"description": "年繳會員",
"contacts_count": 0
}
}
PUT https://{API_DOMAIN}/api/v1/contact-tag/{id}
curl -X PUT
-H "Content-Type: application/json"
'{"name": "月費會員" }'
https://{API_HOST}/api/v1/contact-tag/1
{
"data": {
"id": 1,
"name": "高消費",
"description": null,
"contacts_count": 1
}
}
DELETE https://{API_HOST}/api/v1/contact-tag/{id}
curl -X DELETE
-H "Content-Type: application/json"
https://{API_HOST}/api/v1/contact-tag/22