閱讀394 返回首頁    go iPhone_iPad_Mac_apple


活動投放API__快速開始_移動定向營銷_規則引擎-阿裏雲

這已經是運用定向營銷服務的最後一個環節。

當您完成了創建APP、SDK數據采集、創建人群、創建活動這4個步驟,最後隻需要在您的移動APP(服務端)調用“活動投放API“,當用戶訪問移動APP時即可實時投放個性化內容。

我們以一個簡單的移動APP為例,首頁首屏的位置有一個營銷位(坑位)會投放1張活動圖片,營銷位CODE為“1”。

API說明

host:shujuapi.aliyun.com

dplus_org_code:用戶數加申請到的“組織名稱” ,可以在API列表看到.

注意:使用API時, 需要增加 header:x-dataplus-timeout=60000* 請參見數加鑒權規範

  • 接口說明:獲取在線投放內容
  • API用戶授權類型:數加API鑒權 *
  • 地址:${host}/${dplus_org_code}/ot-man/activity_match
  • method: post
  • 請求參數:
參數 類型 是否必填 實例 默認值 描述
marketing_id int 1 null 營銷位CODE
user_id string “user_a” null 用戶ID
top_num int 1 null 最優的TOP N個投放內容

輸入樣例(不包括數加身份驗證headers,下同):

  1. curl -X POST ${身份驗證headers} -d '{"user_id": "user_a","marketing_id": 1,"top_num":1}' 'https://shujuapi.aliyun.com/dataplus_100/ot-man/activity_match'

返回結果:

參數 類型 實例 描述
id int 10000 活動ID
documents_type int 1 內容類型,1:圖片;2:文本
documents string https://www.aliyun.com/1.png 圖片類型為圖片鏈接;文本類型為文本內容
activity_url string https://www.aliyun.com 投放內容被點擊後的跳轉鏈接
priority int 1 最優TOP N個投放內容的排序

正確返回示例:

  1. {
  2. "data": {
  3. "RES_MSG": {
  4. " activity_list ": [
  5. {
  6. "id": 10000,
  7. "documents_type ": 1,
  8. "documents": "https://www.aliyun.com/1.png",
  9. "activity_url": "https://www.aliyun.com",
  10. " priority ": 1
  11. }
  12. ],
  13. "success": true
  14. },
  15. "SUB_MSG": "---"
  16. }
  17. }

錯誤返回示例:

  1. {
  2.   "message ":"Error: Illegal operation! ",
  3.   "errorCode":"101010"
  4. }
  5. }

錯誤碼

錯誤碼 描述
100000 或空 成功
100001 服務端無數據
100002 服務端請求超時
100400 一般請求錯誤
101001 json不合法
101002 請求參數不全,或者類型錯誤
101010 非法操作
101000 、100500、100503 服務端錯誤

最後更新:2016-11-23 17:16:07

  上一篇:go 創建活動__快速開始_移動定向營銷_規則引擎-阿裏雲
  下一篇:go 自定義標簽-標簽加工及規範__進階功能_移動定向營銷_規則引擎-阿裏雲