# <center>竹運與神腦介接API</center> ## <center>setDeliveryCostList​ 物流費用回報神腦</center> ## 1. 用途 物流商呼叫此API將物流費用回報予神腦,神腦收到資料後,會再Response系統訊息,轉入失敗的資料亦會告知失敗原因,竹運須檢視神腦回覆失敗之原因,修正後於下一次排程啟動時須再次拋轉給神腦。 ## 2. URL **url**:`https://{domain}/LogisticsEDI/setDeliveryCostList/{sourceType}` <font color="#f00">*備註: {sourceType} = "HCT"</font> **method**:`POST` **produces**:`application/json` **Request Header:** | name | description | require | type | schema | | -------- | ----------- | ------- | ------ | ------ | | userName | 使用者帳號 | true | String | | | userPassword | 使用者密碼 | true | String | | **Request Params**: | name | description | require | type | schema | | -------- | ----------- | ------- | ------ | ------ | | logisticsOrderNo | 竹運十碼託運號碼 | true | nvarchar(50) | | | orderNo | 神腦物流單號,Unique單號,編碼規則H+YYMMDD+五碼流水號,例如H18110500001 | true | nvarchar(50) | | | logisticsOrderDate | 帳務日期,格式為YYYY-MM-DD | true | date | | | shipVolume | 材積 | true | float | | | sicLgstHctCostLines<br/> &emsp;&emsp;costType<br/> &emsp;&emsp;costAmt<br/> | 帳務類型(陣列)<br/> &emsp;&emsp;帳務類型<br/> &emsp;&emsp;帳務金額<br/> | true | nvarchar(18)<br/> int| **Request Example**: ```json { "logisticsOrderNo": "8176677294", "orderNo": "H18110646990", "logisticsOrderDate": "2018-11-06", "shipVolume": 1.01, "sicLgstHctCostLines": [ { "costType": "HCT_VAR1", "costAmt": 20 }, { "costType": "HCT_VAR2", "costAmt": 40 } ] } ``` **Response Params**: | name | description | type | scheema | | ----------------- | -------------------------------------------------------- | ------ | ------- | | status | 參考[[Response Body Status 列表](#Response_Body_Status)] | string | | | mdc | | string | | | statusCode | 參考[[Response Body Status 列表](#Response_Body_Status)] | string | | | message | 參考[[Response Body Status 列表](#Response_Body_Status)] | string | | | alert | | string | | | mdc | | string | | **Response Example**: **成功範例**: ```json { "status": "OK", "mdc": null, "statusCode": 200, "message": "傳入資料成功", "alert": null, "data": null } ``` **失敗範例**: ```json { "status": "FAIL", "mdc": null, "statusCode": 400, "message": "資料重複傳入", "alert": null, "data": null } ``` ```json { "status": "UNVALIDATION", "mdc": null, "statusCode": 422, "message": "神腦物流單號不得空白", "alert": null, "data": null } ``` # ## <a id="Response_Body_Status" />● Response Body Status 列表 | status | statusCode | message | | ------------ | ---------- | -------------- | | OK | 200 | 傳入資料成功 | | FAIL | 400 | 資料重複傳入 | | UNAUTHORIZED | 401 | 帳號密碼有誤 | | UNVALIDATION | 422 | 基礎檢核有誤 | | ERROR | 500 | System Error |