API說明
API位置 |
/new_ezding/ads/update/{ad_group_id} |
需求描述 |
修改banner、announcement |
傳輸物件格式 |
json |
方法 |
PUT |
範例
curl -X PUT \
-H " X-Ftcsys-key: {KEY}" \
-H " X-Ftc-Authorization: {token}" \
-H " X-Accept-Language: {language}" \
-H " Content-Type: application/json" \
-d '{
"ad_type": 1,
"ad_category": 1,
"ad_channel": "5d5e5ed3184fedf201184fedf6eb0001",
"content_code": "web_new.home.banner",
"data_type": 1,
"page_code": "index",
"area_code": "mainBanner",
"movie_id": "c5516129d1e94c71841f09d3d18290e2",
"ad_title": "圖片標題",
"ad_content": "內容說明",
"video_embed": "內崁影片embed code",
"ad_image": [
{
"ad_size": 1,
"ad_image_url": "大尺寸banner圖片所在位置"
},
{
"ad_size": 2,
"ad_image_url": "中尺寸banner圖片所在位置"
},
{
"ad_size": 3,
"ad_image_url": "小尺寸banner圖片所在位置"
}
],
"ad_link": "圖片點擊網址",
"cinema_id": "1b47c492287211e69b8d6f151a450c6d",
"show_type": 1,
"open_window": 1,
"begin_time": 1490073255000,
"end_time": 1493615655000,
"sort": 1,
"status": 1
}
https://{endpoint}/new_ezding/ads/update/{ad_group_id}
回傳範例 - 修改成功
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
{
"result": "" ,
"code": 200,
"status": "success"
}
回傳錯誤 - 修改失敗
< HTTP/1.1 400 Bad Request
< Content-Type: application/json; charset=UTF-8
{
"code": 400,
"message": "修改失敗",
"status": "failure"
}
接收json參數
參數 |
名稱 |
範例 |
必填 |
備註 |
ad_group_id |
ad群組ID |
02159cf94005451089c5fe6da7fbd017 |
Y |
|
ad_type |
ad類型 |
1 |
Y |
0:全部、1:banner、2:公告 |
ad_category |
ad分類 |
1 |
Y |
1:channel站台、2:payment.channel:付款方式、3:cinema:影城、4:promotion:活動 |
ad_channel |
ad頻道 |
5d5e5ed3184fedf201184fedf6eb0001 |
Y |
ez訂網站頻道代碼:5d5e5ed3184fedf201184fedf6eb0001 |
content_code |
內容代碼 |
web_new.home.banner |
N |
|
data_type |
資料型態 |
1 |
N |
1:Image、2:Embed Video、3:Outsite Line、4:HTML Code |
page_code |
頁面代碼 |
index |
Y |
index:首頁代碼(其他頁面代碼視需求將陸續新增) |
area_code |
區塊代碼 |
mainBanner |
Y |
lmainBanner:首頁上方主視覺banner輪播區塊、eventBanner:首頁下方活動banner輪播區塊(其他區塊代碼視需求將陸續新增) |
movie_id |
電影ID |
c5516129d1e94c71841f09d3d18290e2 |
N |
|
ad_title |
圖片標題 |
限制級戰警主視覺 |
Y |
|
ad_content |
內容說明 |
信義威秀停電 |
N |
|
video_embed |
內崁影片emebed code |
<iframe width="560" height="315" src="https://www.youtube.com/embed/8KAlFBVlmEs" frameborder="0" allowfullscreen></iframe> |
N |
|
ad_size |
圖片尺寸 |
1 |
N |
1:大尺寸、2:中尺寸、3:小尺寸 |
ad_image_url |
圖片所在位置 |
https://www.ezding.com.tw/00002/1920_800.jpg |
N |
Url組成規則:{enpoint}/圖片所在來源路徑/圖檔名.副檔名 |
ad_link |
圖片點擊網址 |
http://www.ezding.com.tw |
N |
|
cinema_id |
影城ID |
1b47c492287211e69b8d6f151a450c6d |
N |
|
show_type |
輪播類型 |
0 |
N |
0:只秀一次、1:每次都秀 |
open_window |
是否開啟新視窗 |
0 |
N |
1:是、0:否 |
begin_time |
上架時間 |
1490073255000 |
Y |
|
end_time |
下架時間 |
1493615655000 |
Y |
|
sort |
排序 |
1 |
Y |
從小到大,預設9999 |
status |
狀態 |
1 |
Y |
1:上架、0:下架 |