取得批次提案 #
取得批次提案單 #
取得已建立的 批次提案單
。
Endpoint URL: https://tw.supplier.yahoo.com/api/spa/v1/proposal/batch/{id}
HTTP Method: GET
Request Parameters #
id #
提案單號。
資料型態: Integer
必填: 是
fields #
於查詢時同時要求回傳附加欄位,目前支援的欄位包括:
+details
回傳提案明細
資料型態: String
必填: 否
Response Syntax #
{
"id": number,
"supplierId": number,
"proposalType": string,
"batchSource": string,
"instantExecute": boolean,
"details": [
{
"listingId": number,
"executeProposalId": number,
"revertProposalId": number
}
],
"executeTs": string,
"executeStatus": string,
"executor": string,
"executeDetail": string,
"revertTs": string,
"revertStatus": string,
"reverter": string,
"revertDetail": string,
"creator": string,
"createdTs": string,
"modifier": string,
"modifiedTs": string
}
Response Elements #
若操作成功,API 會回傳 HTTP 200 response。並以 JSON 格式回傳完整的 BatchProposal 物件。
id #
批次提案編號。
資料型態: Integer
supplierId #
供應商編號。
資料型態: Integer
proposalType #
提案類型。
資料型態: String
有效值: 詳見 Proposal Type 提案類型
batchSource #
批次提案來源,詳見 定義表。
資料型態: String
有效值:
- excel
- page
- api
instantExecute #
是否為立刻執行的批次提案。
details #
提案明細。
資料型態: BatchProposalDetail[]
欄位說明
欄位名稱
資料型態
欄位說明
listingId
Int32
賣場編號
executeProposalId
Int32
執行提案編號
revertProposalId
Int32
回檔提案編號
executeTs #
執行時間。
資料型態: String
格式: ISO-8601
executeStatus #
執行狀態。
資料型態: String
有效值: 詳見 批次提案執行/回檔狀態
executor #
執行預約提案者。
資料型態: String
有效值:
- Scheduler: 系統執行
- 手動執行者 ID
executeDetail #
執行提案的詳情。
資料型態: String
revertTs #
回檔時間。
資料型態: String
格式: ISO-8601
revertStatus #
回檔狀態。
資料型態: String
有效值: 詳見 批次提案執行/回檔狀態
reverter #
執行回檔提案者。
資料型態: String
有效值:
- Scheduler: 系統執行
- 手動執行者 ID
revertDetail #
執行回檔提案的詳情。
資料型態: String
creator #
建檔者。
資料型態: String
createdTs #
建檔時間。
資料型態: String
格式: ISO-8601
modifier #
更新者。
資料型態: String
modifiedTs #
更新時間。
資料型態: String
格式: ISO-8601
Errors #
Bad Request #
輸入的參數不符合 API 定義的 Pattern。
HTTP Status Code: 400
Error Code | Description |
---|---|
0 | Invalid input |
40000005 | Contains illegal character(s) |
Unauthorized #
身分認證不通過,請檢查您的 Cookie
或 wssid
。
HTTP Status Code: 401
Error Code | Description |
---|---|
40100001 | Missing or bad authentication |
40100002 | Invalid cookie |
40100003 | Missing or bad authentication |
40100004 | Check wssid failed |
40100006 | Cookie has expired |
Forbidden #
身分認證不通過,請確認您擁有檢示提案單的權限。
HTTP Status Code: 403
Error Code | Description |
---|---|
40304001 | No permission |
Not Found #
找不到提案單內容。
HTTP Status Code: 404
Error Code | Description |
---|---|
40409000 | Proposal not found |
Internal Server Error #
API 端發生錯誤,若持續發生請洽您的業務窗口。
Examples #
取得提案單號為 1 的提案單
GET /api/spa/v1/proposal/batch/1 HTTP/1.1
HOST: tw.supplier.yahoo.com
Content-Type: application/json; charset=UTF-8
{
"id": 1,
"supplierId": 99999,
"proposalType": "updateImageV2",
"batchSource": "excel",
"executeTs": "2024-04-10T02:00:00Z",
"executeStatus": "idle",
"revertTs": "2024-04-10T05:00:00Z",
"revertStatus": "idle",
"creator": "creator-id",
"createdTs": "2024-04-09T10:00:00Z",
"modifier": "modifier-id",
"modifiedTs": "2024-04-09T10:05:00Z"
}
取得提案單號為 1 的提案單,並且取得提案單的額外欄位 details
GET /api/spa/v1/proposal/batch/1?fields=%2Bdetails HTTP/1.1
HOST: tw.supplier.yahoo.com
Content-Type: application/json; charset=UTF-8
{
"id": 1,
"supplierId": 99999,
"proposalType": "updateImageV2",
"batchSource": "excel",
"details": [
{
"listingId": 12345,
"executeProposalId": 1001,
"revertProposalId": 1002
},
{
"listingId": 22345,
"executeProposalId": 1003,
"revertProposalId": 1004
}
],
"executeTs": "2024-04-10T02:00:00Z",
"executeStatus": "idle",
"revertTs": "2024-04-10T05:00:00Z",
"revertStatus": "idle",
"creator": "creator-id",
"createdTs": "2024-04-09T10:00:00Z",
"modifier": "modifier-id",
"modifiedTs": "2024-04-09T10:05:00Z"
}