# 廣告訂版系統 3.0 訂單主要資訊 API 取得訂單的詳細資訊 |項目|內容| |--|--| |endpoint|/order/get/main| |method|GET| ## input |params|說明|必填|類型|備註| |--|--|--|--|--| |order_id|訂單 id|V|文字|| ## output ``` { "success": true, "code": "0000", "msg": "", "items": [ { "order_id": "1", // 訂單編號, 字串 "name": "訂單名稱", // 訂單名稱, 字串 "sales_id": "1", // 業務 id, 字串 "sales_name": "業務姓名", // 業務姓名, 字串 "group": "1", // 組別 共用選單 id, 字串 "bu": "1", // BU 共用選單 id, 字串 "department": "1", // 部門 共用選單 id, 字串 "planner_id": "1", // 數位企劃 id, 字串 "planner_name": "數位企劃姓名", // 數位企劃姓名, 字串 "project_id": 1, // 專案id , 2022-12-19新增 "project_name": "專案名稱", // 2022-12-19新增 "contract": "合約名稱", // 合約名稱, 字串 "sell_content": "銷售項目", // 銷售項目, 字串 "final_price": "10000", // 成交價, 字串 "advertiser": "廣告主", // 廣告主, 字串 "agent": "代理商", // 代理商, 字串 "industry": "產業線", // 產業線, 字串 "budget": 10000, // 預算, 數字 "start_at": "2022/03/01", // 檔期起日, 字串 "end_at": "2022/03/31", // 檔期迄日, 字串 "site": "1,2,3,4,5,6" // 曝光網站 "sns_type": "1,2" // 指定社群工具 "ad_type": "1", // 宣傳廣告類型 共用選單 id, 字串 "ad_redirect_url": "", // 訂單新增導流連結欄位, 字串 "KPI": "1", // KPI 共用選單 id, 字串 "KPI_value": "> 10000", // KPI 值, 字串 "status": 6, // 訂單狀態 "report_demand": "報表需求", // 報表需求, 字串 "close_present_date": "2022/04/15", // 結案報告提供日期, 字串 "memo": "其他補充說明", // 其他補充說明, 字串 "updated_at": "2022/03/10" // 更新時間, 字串 } ] } ``` 當驗證有錯誤時回傳 ``` { "success": false, "code": "0001", "msg": "參數錯誤", "items": { "order_id": [ "請輸入訂單 id" ], ... } } ``` ### 後端處理邏輯 主要 table:Orders 訂單 關聯 table:Users 使用者 1. 使用共用選單 id 儲存的欄位,回傳共用選單的值 2. 使用關聯 id 儲存的欄位,回傳對應的名稱 (name) ## Code 對應結果列表 |code 代號|訊息| |--|--| |0000|正常| |0001|參數錯誤| |0090|資料庫錯誤| |0099|其他系統錯誤|