📧電子信箱
搜尋電子信箱
GET https://{API_DOMAIN}/api/v1/email-contact
curl -X GET
-H "Content-Type: application/json"
"https://{API_HOST}/api/v1/email-contact?contact_id=1"
Query Parameters
PARAMETER
REQUIRED
DEFAULT
TYPE
DESCRIPTION
page
false
1
Number
目前在第幾頁
per_page
false
15
Number
每頁呈現多少筆
contact_id
false
NULL
Number
客戶的id
name
false
NULL
String
定義的 Email 名稱
description
false
NULL
String
Email 備註
address
false
NULL
String
Email 位址
Response
{
"data": [
{
"id": 1,
"address": "[email protected]",
"contact_id": 1,
"draft": null,
"name": "Jaiden Champlin III",
"description": "Pariatur dolorem aut voluptatibus. Aut pariatur voluptatum ratione atque sit. Et inventore quo voluptates animi.",
"contact": {
"id": 1,
"membership_no": "8771639",
"identity_no": "418099",
"first_name": "Angelita",
"last_name": "D'Amore",
"gender": 0,
"birth_at": "1985-08-27 00:00:00",
"created_at": "2019-04-10 03:01:41",
"updated_at": "2019-04-10 03:01:41",
"profile_id": 1,
"sponsor_id": null,
"disturb_setting": null
}
},
{
"id": 5,
"address": "[email protected]",
"contact_id": 1,
"draft": null,
"name": "Mikayla Funk",
"description": "Possimus optio molestiae perspiciatis distinctio. Vel incidunt ut unde. Laudantium eaque distinctio officia eum error odit.",
"contact": {
"id": 1,
"membership_no": "8771639",
"identity_no": "418099",
"first_name": "Angelita",
"last_name": "D'Amore",
"gender": 0,
"birth_at": "1985-08-27 00:00:00",
"created_at": "2019-04-10 03:01:41",
"updated_at": "2019-04-10 03:01:41",
"profile_id": 1,
"sponsor_id": null,
"disturb_setting": null
}
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 15,
"to": 2,
"total": 2
}
}
取得指定電子信箱
https://{API_DOMAIN}/api/v1/email-contact/{email_contact}
curl -X GET
-H "Content-Type: application/json"
https://{API_HOST}/api/v1/email-contact/1
PROPERTY
TYPE
DESCRIPTION
URL Parameters
PARAMETER
REQUIRED
DEFAULT
TYPE
DESCRIPTION
Response
請參考電子信箱回應格式
{
"data": {
"id": 1,
"address": "[email protected]",
"contact_id": 1,
"draft": null,
"name": "Jaiden Champlin III",
"description": "Pariatur dolorem aut voluptatibus. Aut pariatur voluptatum ratione atque sit. Et inventore quo voluptates animi.",
"contact": {
"id": 1,
"membership_no": "8771639",
"identity_no": "418099",
"first_name": "Angelita",
"last_name": "D'Amore",
"gender": 0,
"birth_at": "1985-08-27 00:00:00",
"created_at": "2019-04-10 03:01:41",
"updated_at": "2019-04-10 03:01:41",
"profile_id": 1,
"sponsor_id": null,
"disturb_setting": null
}
}
}
新增電子信箱
指定客戶新增電子信箱
POST https://{API_DOMAIN}/api/v1/email-contact
curl -X POST
-H "Content-Type: application/json"
'{"contact_id":1,"address":"[email protected]","name":"Theresia Zieme"}'
https://{API_HOST}/api/v1/email-contact
Parameters
PARAMETER
REQUIRED
DEFAULT
TYPE
DESCRIPTION
contact_id
true
NULL
Number
客戶的id
address
true
NULL
String
電子信箱地址
name
false
NULL
String
電子信箱自定義名稱
description
false
NULL
String
電子信箱自定義描述
Response
請參考電子信箱回應格式
{
"data": {
"id": 3,
"address": "[email protected]",
"contact_id": 1,
"draft": null,
"name": "Theresia Zieme",
"description": null,
"contact": {
"id": 1,
"membership_no": "8771639",
"identity_no": "418099",
"first_name": "Angelita",
"last_name": "D'Amore",
"gender": 0,
"birth_at": "1985-08-27 00:00:00",
"created_at": "2019-04-10 03:01:41",
"updated_at": "2019-04-10 03:01:41",
"profile_id": 1,
"sponsor_id": null,
"disturb_setting": null
}
}
}
更新指定電子信箱
PUT https://{API_DOMAIN}/api/v1/email-contact/{email_contact}
curl -X PUT
-H "Content-Type: application/json"
'{"name":"Sharon"}'
https://{API_HOST}/api/v1/email-contact/1
Parameters
PARAMETER
REQUIRED
DEFAULT
TYPE
DESCRIPTION
address
true
NULL
String
電子信箱地址
name
false
NULL
String
電子信箱自定義名稱
description
false
NULL
String
電子信箱自定義描述
Response
請參考電子信箱回應格式
{
"data": {
"id": 3,
"address": "[email protected]",
"contact_id": 1,
"draft": null,
"name": "Sharon",
"description": null,
"contact": {
"id": 1,
"membership_no": "8771639",
"identity_no": "418099",
"first_name": "Angelita",
"last_name": "D'Amore",
"gender": 0,
"birth_at": "1985-08-27 00:00:00",
"created_at": "2019-04-10 03:01:41",
"updated_at": "2019-11-10 03:01:41",
"profile_id": 1,
"sponsor_id": null,
"disturb_setting": null
}
}
}
刪除電子信箱
Http status 為 204
https://{API_DOMAIN}/api/v1/email-contact/{email_contact}
curl -X DELETE
-H "Content-Type: application/json"
"https://{API_HOST}/api/v1/email-contact?contact_id=1"
URL Parameters
PARAMETER
REQUIRED
DEFAULT
TYPE
DESCRIPTION
email_contact
true
NULL
Number
電子信箱的id
{}
Last updated