商品成本價格修改 #
取得提案細節 #
取得單一 商品成本價格修改提案單 的詳細內容,包含各賣場的原價、新價、毛利率與變價結果。
- 呼叫此 API 時,請在 Headers 中加入 api-version: 3。若使用
api-version: 1或api-version: 2,將回傳"Code": "UnsupportedApiVersion"的錯誤訊息。
Headers 範例
{
"api-token": "Supplier_XXXX",
"api-supplierid": "XXXX",
"content-type": "application/json",
"accept": "application/json",
"api-version": "3"
}
Endpoint URL: https://tw.scm.yahooapis.com/scmapi/api/Proposal/Detail/{ProposalType}/{ProposalId}
HTTP Method: GET
Request Parameters #
ProposalType #
提案單類型。
資料型態: String
必填: 是
說明: 路徑參數。成本價格提案固定填入 PriceCost
ProposalId #
提案單編號。
資料型態: Integer
必填: 是
說明: 路徑參數
Request/Response Sample #
{
"Success": true,
"ResponseCode": "0",
"Message": "成功",
"Data": {
"Id": 1528535,
"SubNo": 2,
"Applicant": "測試人員",
"ApplyDate": "2026-05-25T16:27:17.933",
"EndDate": "2026-07-25T23:59:59",
"VerifyDate": "2026-05-25T16:27:18.293",
"VerifyStatus": 1,
"ExecuteStatus": 1,
"SuccessCount": 1,
"FailCount": 0,
"Gds": [
{
"Id": 3371675,
"ProductCost": 100,
"NewProductCost": 90,
"SuggestPrice": 700,
"NewSuggestPrice": 800,
"Price": 160,
"NewPrice": 170,
"Profit": 37.5,
"NewProfit": 47.06,
"IsUpdateSuccess": true,
"Products": [
{
"Id": 6506882,
"ProductSpNo": ""
}
]
}
]
}
}
Response Elements #
若操作成功,API 會回傳 HTTP 200 response,並以 JSON 格式回傳結果。回傳內容採用統一格式(Success、ResponseCode、Message、Data),其中 Data 為提案單詳細內容,各欄位說明如下:
Id #
提案編號。
資料型態: Integer
SubNo #
提案子站。
資料型態: Integer
Applicant #
提案人員。
資料型態: String
ApplyDate #
提案日期。
資料型態: dateTime
EndDate #
提案有效日期。
資料型態: dateTime
VerifyDate #
審核日期。
資料型態: dateTime
VerifyStatus #
審核狀態。
資料型態: Integer
欄位內容:
- 0: 待審核
- 1: 已通過
- 2: 不通過
- 3: 已過期
- 4: 尚未提案
ExecuteStatus #
執行狀態。
資料型態: Integer
欄位內容:
- 0: 未執行
- 1: 執行成功
- 2: 執行失敗
SuccessCount #
成功筆數。
資料型態: Integer
FailCount #
失敗筆數。
資料型態: Integer
Gds #
提案單賣場細節。Gd 的結構分別說明如下:
- Id:賣場編號
- ProductCost:成本原價
- NewProductCost:成本新價
- SuggestPrice:原廠商建議價
- NewSuggestPrice:新廠商建議價
- Price:購物中心原售價
- NewPrice:購物中心新售價
- Profit:原毛利率(%)
- NewProfit:新毛利率(%)
- IsUpdateSuccess:變價狀態
- Products:商品細節
資料型態: Object Array
Id #
賣場編號。
資料型態: Integer
ProductCost #
成本原價。
資料型態: Integer
NewProductCost #
成本新價。
資料型態: Integer
SuggestPrice #
原廠商建議價。
資料型態: Integer
NewSuggestPrice #
新廠商建議價。
資料型態: Integer
Price #
購物中心原售價。
資料型態: Integer
NewPrice #
購物中心新售價。
資料型態: Integer
Profit #
原毛利率(%)。
資料型態: Float
NewProfit #
新毛利率(%)。
資料型態: Float
IsUpdateSuccess #
變價狀態。
資料型態: Boolean
Products #
商品細節。Product 的結構分別說明如下:
- Id:商品編號
- ProductSpNo:供應商料號
資料型態: Object Array
Id #
商品編號。
資料型態: Integer
ProductSpNo #
供應商料號。
資料型態: String
Errors #
當 Success 為 false 時,ResponseCode 會回傳對應的錯誤代碼(代碼定義請參考 建立提案 的「執行結果代碼表」),Message 會回傳檢核失敗訊息。各欄位檢核項目如下:
檢核項目
| 檢核欄位 | 檢核內容 | 錯誤代碼 | 錯誤訊息 |
|---|---|---|---|
| 提案單類型 | 必填 | 4001 | 提案單類型為必填 |
| 提案單類型 | 確認提案單類型是否支援 | 4001 | 提案單類型不支援 |
| 提案單編號 | 確認提案單資料是否存在 | 4003 | 提案單proposalId不存在 |
錯誤回傳範例 #
{
"Success": false,
"ResponseCode": "4003",
"Message": "資料不存在:提案單1515285不存在",
"Data": null
}