API Endpoints #
Proposal #
GET v1/proposals/{id} #
https://tw.supplier.yahoo.com/api/spa/v1/proposals
取得提案資訊,目前支援的提案類型包括newProduct,newListing,newListingByApi,updateCopy,updateVideo,updateImageV2及updateListingAttribute,其餘類型會回傳40409000 (Proposal not found)錯誤。
若因分類變動導致無法以proposal.{product|listing}.catItemId導回完整分類路徑,則proposal.{product|listing}.{zoneId|zoneName|subStationId|subStationName|catId|catName|catItemId|catItemName}將不再回傳。
若proposal.product.subStationId與proposal.subStationId不一致,表示目前 product 的子類已不屬於提案當下的子站,需請供應商重新選擇分類。
編輯或複製提案時,使用者可先記住原本的proposal.product.catItemId,若新選擇的catItemId仍為同一個,則原本填寫的proposal.product.{models|attributes}可繼續沿用。
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | Int32 | Y | Proposal ID |
| fields | String | N | Comma-separated fields
-struData,-product.copy,-listing.copy |
Output
- HTTP Status Code: 200 (OK)
- Object: Proposal
Error
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400 | Invalid input | |
| 400 | 40000001 | Wrong timestamp format |
| 400 | 40000005 | Contains illegal character(s) |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 404 | 40409000 | Proposal not found |
| 410 | 41009001 | The category item no longer exists |
| 500 | 50000006 | Internal server error |
| 500 | 50000024 | Internal server error |
| 500 | 50000027 | Internal server error |
| 500 | 50000029 | Internal server error |
| 500 | 50000030 | Internal server error |
| 500 | 50009001 | Internal server error |
| 500 | 50009006 | Internal server error |
Example
- Get a
newListingproposal.
GET /api/spa/v1/proposals/76527
HTTP/1.1 200 OK
{
"applicant": "applicant-name",
"appliedTs": "2019-03-05T15:37:56+08:00",
"contactWindow": "contact-windows-id",
"createdTs": "2019-03-05T15:34:58+08:00",
"creator": "creator-id",
"executeStatus": "idle",
"expiredTs": "2019-03-20T00:00:00+08:00",
"id": 76527,
"listing": {
"applyLowGpm": false,
"catId": "cat430",
"catItemId": "catItem10070",
"catItemName": "新迅馳Sonoma",
"catName": "加值功能NB推薦",
"cvsPurchaseQtyLimit": 1,
"deliveryType": "appointment",
"featureTitle": "我是特色標題",
"isDisplay": true,
"offShelvedTs": "2020-03-04T15:37:56+08:00",
"onShelvedTs": "2019-03-05T15:37:56+08:00",
"price": "100.00",
"purchaseQtyLimit": 12,
"seoUrl": "我是商品名稱",
"subStationId": "sub1",
"subStationName": "筆記型電腦超過十一個字test",
"zoneId": "z3",
"zoneName": "電腦 / 週邊 / 軟體"
},
"modifiedTimes": 2,
"modifiedTs": "2019-03-05T15:37:56+08:00",
"modifier": "modifier-id",
"note": "proposal-note",
"product": {
"attributeDisplayMode": "table",
"eVoucherAttributes": [
{
"dataType": "string",
"name":"OrderNumber",
"value":"活動代碼"
},
{
"dataType": "integer",
"name":"ProductCode",
"value":"1"
},
{
"dataType": "datetime",
"name":"MerchantCode",
"value":"2017-10-31T23:59:59+08:00"
}
],
"eVoucherType": "ticket",
"attributes": [
{
"name": "中央處理器品牌",
"values": [
"Intel"
]
},
{
"name": "中央處理器型號",
"values": [
"G870"
]
},
{
"name": "型號",
"values": [
"Trey-Super-PC"
]
},
{
"name": "晶片組",
"values": [
"B75"
]
},
{
"name": "硬碟機容量",
"values": [
"250GB"
]
},
{
"name": "硬碟機轉速",
"values": [
"5400轉"
]
},
{
"name": "固態硬碟",
"values": [
"無"
]
},
{
"name": "光碟機",
"values": [
"無"
]
},
{
"name": "作業系統",
"values": [
"無"
]
},
{
"name": "記憶體容量(GB)",
"values": [
"2G"
]
},
{
"name": "記憶體類型",
"values": [
"DDR2"
]
},
{
"name": "記憶體工作頻率(MHz)",
"values": [
"333"
]
},
{
"name": "記憶體插槽數",
"values": [
"1"
]
},
{
"name": "記憶體最高支援容量",
"values": [
"2G以下"
]
},
{
"name": "顯示卡類型",
"values": [
"獨立顯卡"
]
},
{
"name": "螢幕尺吋",
"values": [
"無"
]
},
{
"name": "觸控",
"values": [
"無"
]
},
{
"name": "顯示晶片型號",
"values": [
"3dfx-voodoo-1"
]
},
{
"name": "顯示卡記憶體類型",
"values": [
"高速記憶體"
]
},
{
"name": "顯示卡記憶體容量(GB)",
"values": [
"12MB"
]
},
{
"name": "尺寸(長x寬x高)(mm)",
"values": [
"2400x900x30000"
]
},
{
"name": "區域網路",
"values": [
"64kbps"
]
},
{
"name": "原廠保固",
"values": [
"none"
]
},
{
"name": "音效",
"values": [
"mono"
]
},
{
"name": "前面板連接埠",
"values": [
"極致簡約沒有任何連接埠"
]
},
{
"name": "後面板連接埠",
"values": [
"只有電源插孔"
]
},
{
"name": "後面板視訊埠",
"values": [
"HDMI"
]
},
{
"name": "電源供應器瓦數(W)",
"values": [
"150kW"
]
},
{
"name": "重量(kg)",
"values": [
"27t"
]
}
],
"brand": "我是品牌",
"brandId": "41166484",
"brandName": "2M2",
"catId": "cat430",
"catItemId": "catItem10070",
"catItemName": "新迅馳Sonoma",
"catName": "加值功能NB推薦",
"contentRating": "G",
"cost": "50.00",
"height": 77,
"isExpiringItem": true,
"isInstallRequired": true,
"isLargeVolumnProductGift": true,
"isNeedRecycle": true,
"isOutrightPurchase": true,
"length": 55,
"minPackingCount": 10,
"model": "我是商品型號",
"models": [
{
"displayName": "極致簡約Dell2019",
"images": [
{
"height": 1000,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/rk55XIHoX20Ph9sE_Zy_zg--/YXBwaWQ9dHdzcG1hbGw7dz0xMDAwO2g9MTAwMA--/https://img.yec.tw/bp/Files/ba0b8bf005bab4e7cc8821afea217e342a1dfca3.png.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/05QDhhvQ3RPZhR5tO7_ung--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/ba0b8bf005bab4e7cc8821afea217e342a1dfca3.png.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/o56X4SChgkg8.idN8vhhRQ--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/ba0b8bf005bab4e7cc8821afea217e342a1dfca3.png.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/DVq2lnbwbsNm8RfD6dMSag--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/ba0b8bf005bab4e7cc8821afea217e342a1dfca3.png.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/7Yr0dELAIb9SddQ9_O9D3A--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/ba0b8bf005bab4e7cc8821afea217e342a1dfca3.png.cf.jpg",
"width": 80
},
{
"height": 1000,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/eYS._lyb_vK7JbGceZgyaA--/YXBwaWQ9dHdzcG1hbGw7dz0xMDAwO2g9MTAwMA--/https://img.yec.tw/bp/Files/3b0bc05cf3c5af7cd17b878edce05eab7d0b97d0.jpg.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/OgxcUmeGOCWox8LFdbfb8g--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/3b0bc05cf3c5af7cd17b878edce05eab7d0b97d0.jpg.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/XqpBtsRCDRR9WFtfXb4PGQ--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/3b0bc05cf3c5af7cd17b878edce05eab7d0b97d0.jpg.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/g4HqsvRcbgPRReCWJQBX2g--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/3b0bc05cf3c5af7cd17b878edce05eab7d0b97d0.jpg.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/a4kZ124hE0Ir0Gqi2pWHlg--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/3b0bc05cf3c5af7cd17b878edce05eab7d0b97d0.jpg.cf.jpg",
"width": 80
}
],
"items": [
{
"barcode": "725272730706",
"displayName": "卡其色",
"partNo": "5566",
"spec": {
"name": "顏色",
"values": [
"卡其"
]
},
"stock": 0,
"warehouseBarcode": "9785109946480"
},
{
"displayName": "灰色",
"partNo": "5567",
"spec": {
"name": "顏色",
"values": [
"灰色系"
]
},
"stock": 0
}
],
"spec": {
"name": "品牌",
"values": [
"Dell戴爾"
]
},
"videos": [
{
"order": 1,
"url": "https://img.yec.tw/bp/Files/374d9974ab2cbce382e42724fede7aa07313cae6.qt"
}
]
},
{
"displayName": "低調奢華hp讚",
"images": [
{
"height": 1000,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/Mu9N4P92upyour6m4ymrYw--/YXBwaWQ9dHdzcG1hbGw7dz0xMDAwO2g9MTAwMA--/https://img.yec.tw/bp/Files/945b996a1bada1ccb966b8b0215875447024324c.jpg.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/CswYNY.JXkUfESyLnKxu2Q--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/945b996a1bada1ccb966b8b0215875447024324c.jpg.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/gTvXPAaKH4XmeSSuBGaiXw--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/945b996a1bada1ccb966b8b0215875447024324c.jpg.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/78FnXBFQ4vOPvbdSa7kMkQ--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/945b996a1bada1ccb966b8b0215875447024324c.jpg.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/HRXXOFDS._pElXILUcG4lA--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/945b996a1bada1ccb966b8b0215875447024324c.jpg.cf.jpg",
"width": 80
},
{
"height": 1000,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/CVdkUfET_Ngdxwj1rbY49g--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/404603c25b19d075109b44255707b89d49b96347_1000x1000.jpg.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/.fgFQchY5CU3g.KqtHz.MA--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/404603c25b19d075109b44255707b89d49b96347_1000x1000.jpg.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/9hrMKBplQM2KUuxr6g68Pw--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/404603c25b19d075109b44255707b89d49b96347_1000x1000.jpg.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/HC4y9JJ6n7_IesnFTcv78w--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/404603c25b19d075109b44255707b89d49b96347_1000x1000.jpg.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/CVdkUfET_Ngdxwj1rbY49g--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/404603c25b19d075109b44255707b89d49b96347_1000x1000.jpg.cf.jpg",
"width": 80
}
],
"items": [
{
"displayName": "卡其色",
"partNo": "5568",
"spec": {
"name": "顏色",
"values": [
"卡其"
]
},
"stock": 0
},
{
"displayName": "灰色",
"partNo": "5569",
"spec": {
"name": "顏色",
"values": [
"灰色系"
]
},
"stock": 0
}
],
"spec": {
"name": "品牌",
"values": [
"hp惠普"
]
},
"videos": [
{
"order": 1,
"url": "https://img.yec.tw/bp/Files/374d9974ab2cbce382e42724fede7aa07313cae6.qt"
}
]
}
],
"msrp": "100.00",
"name": "(即期品)我是商品名稱",
"preserveDays": 56,
"safeStockQty": 1,
"shareMediaBetweenModels": false,
"shipType": {
"id": 61,
"name": "Express24HR"
},
"shortDescription": [
"我是簡短說明",
"我是簡短說明2"
],
"specs": [
{
"level": 1,
"name": "品牌"
},
{
"level": 2,
"name": "顏色"
}
],
"struDataAttrClusterId": "000003326689",
"struDataAttrClusterName": "品牌桌上型電腦",
"subStationId": "sub1",
"subStationName": "筆記型電腦超過十一個字test",
"taxable": true,
"warranty": {
"description": "保固說明文字",
"handler": "official",
"period": "一個月",
"scope": "新品瑕疵",
"productStatus": "new"
},
"weight": 88,
"width": 66,
"zoneId": "z3",
"zoneName": "電腦 / 週邊 / 軟體"
},
"reviewStatus": "pendingReview",
"subStationId": "sub1",
"subStationName": "筆記型電腦超過十一個字test",
"supplierId": 99999,
"supplierName": "雅虎測試",
"type": "newListing"
}
GET v1/proposals #
https://tw.supplier.yahoo.com/api/spa/v1/proposals
Query proposals.
若因分類變動導致無法以 proposal.{product|listing}.catItemId 導回完整分類路徑,則 proposal.{product|listing}.{zoneId|zoneName|subStationId|subStationName|catId|catName|catItemId|catItemName} 將不再回傳。 若 proposal.product.subStationId 與 proposal.subStationId 不一致,表示目前 product 的子類已不屬於提案當下的子站,需請供應商重新選擇分類。編輯或複製提案時,使用者可先記住原本的 proposal.product.catItemId,若新選擇的 catItemId 仍為同一個,則原本填寫的 proposal.product.{models|attributes} 可繼續沿用。
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | String | N | Comma-separated proposal ID |
| subStationId | String | N | Comma-separated sub station ID |
| type | String | Y | Proposal type
|
| reviewStatus | String | N | Comma-separated review status
|
| executeStatus | String | N | Comma-separated execute status
|
| createdTs | String | N | Created time |
| appliedTs | String | N | Applied time |
| sort | String | N | Comma-separated sort condition: [+|-](id|appliedTs|expiredTs|reviewedTs|executedTs|modifiedTs) Default: -id |
| offset | Int32 | N | Pagination offset. Default: 0 Min: 0 |
| limit | Int32 | N | Pagination limit. Default: 10 Min: 0 Max: 50 |
| fields | String | N | Comma-separated filter out field
|
Output
- HTTP Status Code: 200 (OK)
- Object: Proposals
Error
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400 | Invalid input | |
| 400 | 40000001 | Wrong timestamp format |
| 400 | 40000005 | Contains illegal character(s) |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 500 | 50000006 | Internal server error |
| 500 | 50000024 | Internal server error |
| 500 | 50000027 | Internal server error |
| 500 | 50000029 | Internal server error |
| 500 | 50000030 | Internal server error |
| 500 | 50009001 | Internal server error |
| 500 | 50009006 | Internal server error |
Example
- Query proposals, specific id and type.
GET /api/spa/v1/proposals?id=76527&type=newListing
HTTP/1.1 200 OK
{
"pagination": {
"resultsTotal": 1
},
"proposals": [
{
"applicant": "applicant-name",
"appliedTs": "2019-03-05T15:37:56+08:00",
"contactWindow": "contact-windows-id",
"createdTs": "2019-03-05T15:34:58+08:00",
"creator": "creator-id",
"executeStatus": "idle",
"expiredTs": "2019-03-20T00:00:00+08:00",
"id": 76527,
"listing": {
"applyLowGpm": false,
"catId": "cat430",
"catItemId": "catItem10070",
"catItemName": "新迅馳Sonoma",
"catName": "加值功能NB推薦",
"cvsPurchaseQtyLimit": 1,
"deliveryType": "appointment",
"featureTitle": "我是特色標題",
"isDisplay": true,
"offShelvedTs": "2020-03-04T15:37:56+08:00",
"onShelvedTs": "2019-03-05T15:37:56+08:00",
"price": "100.00",
"purchaseQtyLimit": 12,
"seoUrl": "我是商品名稱",
"subStationId": "sub1",
"subStationName": "筆記型電腦超過十一個字test",
"zoneId": "z3",
"zoneName": "電腦 / 週邊 / 軟體"
},
"modifiedTimes": 2,
"modifiedTs": "2019-03-05T15:37:56+08:00",
"modifier": "modifier-id",
"note": "proposal-note",
"product": {
"attributeDisplayMode": "table",
"eVoucherAttributes": [
{
"dataType": "string",
"name":"OrderNumber",
"value":"活動代碼"
},
{
"dataType": "integer",
"name":"ProductCode",
"value":"1"
},
{
"dataType": "datetime",
"name":"MerchantCode",
"value":"2017-10-31T23:59:59+08:00"
}
],
"eVoucherType": "ticket",
"attributes": [
{
"name": "中央處理器品牌",
"values": [
"Intel"
]
},
{
"name": "中央處理器型號",
"values": [
"G870"
]
},
{
"name": "型號",
"values": [
"Trey-Super-PC"
]
},
{
"name": "晶片組",
"values": [
"B75"
]
},
{
"name": "硬碟機容量",
"values": [
"250GB"
]
},
{
"name": "硬碟機轉速",
"values": [
"5400轉"
]
},
{
"name": "固態硬碟",
"values": [
"無"
]
},
{
"name": "光碟機",
"values": [
"無"
]
},
{
"name": "作業系統",
"values": [
"無"
]
},
{
"name": "記憶體容量(GB)",
"values": [
"2G"
]
},
{
"name": "記憶體類型",
"values": [
"DDR2"
]
},
{
"name": "記憶體工作頻率(MHz)",
"values": [
"333"
]
},
{
"name": "記憶體插槽數",
"values": [
"1"
]
},
{
"name": "記憶體最高支援容量",
"values": [
"2G以下"
]
},
{
"name": "顯示卡類型",
"values": [
"獨立顯卡"
]
},
{
"name": "螢幕尺吋",
"values": [
"無"
]
},
{
"name": "觸控",
"values": [
"無"
]
},
{
"name": "顯示晶片型號",
"values": [
"3dfx-voodoo-1"
]
},
{
"name": "顯示卡記憶體類型",
"values": [
"高速記憶體"
]
},
{
"name": "顯示卡記憶體容量(GB)",
"values": [
"12MB"
]
},
{
"name": "尺寸(長x寬x高)(mm)",
"values": [
"2400x900x30000"
]
},
{
"name": "區域網路",
"values": [
"64kbps"
]
},
{
"name": "原廠保固",
"values": [
"none"
]
},
{
"name": "音效",
"values": [
"mono"
]
},
{
"name": "前面板連接埠",
"values": [
"極致簡約沒有任何連接埠"
]
},
{
"name": "後面板連接埠",
"values": [
"只有電源插孔"
]
},
{
"name": "後面板視訊埠",
"values": [
"HDMI"
]
},
{
"name": "電源供應器瓦數(W)",
"values": [
"150kW"
]
},
{
"name": "重量(kg)",
"values": [
"27t"
]
}
],
"brand": "我是品牌",
"brandId": "41166484",
"brandName": "2M2",
"catId": "cat430",
"catItemId": "catItem10070",
"catItemName": "新迅馳Sonoma",
"catName": "加值功能NB推薦",
"contentRating": "G",
"cost": "50.00",
"height": 77,
"isExpiringItem": true,
"isInstallRequired": true,
"isLargeVolume": true,
"isLargeVolumnProductGift": true,
"isNeedRecycle": true,
"isOutrightPurchase": true,
"length": 55,
"minPackingCount": 10,
"model": "我是商品型號",
"models": [
{
"displayName": "極致簡約Dell2019",
"images": [
{
"height": 1000,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/rk55XIHoX20Ph9sE_Zy_zg--/YXBwaWQ9dHdzcG1hbGw7dz0xMDAwO2g9MTAwMA--/https://img.yec.tw/bp/Files/ba0b8bf005bab4e7cc8821afea217e342a1dfca3.png.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/05QDhhvQ3RPZhR5tO7_ung--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/ba0b8bf005bab4e7cc8821afea217e342a1dfca3.png.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/o56X4SChgkg8.idN8vhhRQ--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/ba0b8bf005bab4e7cc8821afea217e342a1dfca3.png.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/DVq2lnbwbsNm8RfD6dMSag--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/ba0b8bf005bab4e7cc8821afea217e342a1dfca3.png.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/7Yr0dELAIb9SddQ9_O9D3A--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/ba0b8bf005bab4e7cc8821afea217e342a1dfca3.png.cf.jpg",
"width": 80
},
{
"height": 1000,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/eYS._lyb_vK7JbGceZgyaA--/YXBwaWQ9dHdzcG1hbGw7dz0xMDAwO2g9MTAwMA--/https://img.yec.tw/bp/Files/3b0bc05cf3c5af7cd17b878edce05eab7d0b97d0.jpg.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/OgxcUmeGOCWox8LFdbfb8g--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/3b0bc05cf3c5af7cd17b878edce05eab7d0b97d0.jpg.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/XqpBtsRCDRR9WFtfXb4PGQ--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/3b0bc05cf3c5af7cd17b878edce05eab7d0b97d0.jpg.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/g4HqsvRcbgPRReCWJQBX2g--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/3b0bc05cf3c5af7cd17b878edce05eab7d0b97d0.jpg.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/a4kZ124hE0Ir0Gqi2pWHlg--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/3b0bc05cf3c5af7cd17b878edce05eab7d0b97d0.jpg.cf.jpg",
"width": 80
}
],
"items": [
{
"barcode": "725272730706",
"displayName": "卡其色",
"partNo": "5566",
"spec": {
"name": "顏色",
"values": [
"卡其"
]
},
"stock": 0,
"warehouseBarcode": "9785109946480"
},
{
"displayName": "灰色",
"partNo": "5567",
"spec": {
"name": "顏色",
"values": [
"灰色系"
]
},
"stock": 0
}
],
"spec": {
"name": "品牌",
"values": [
"Dell戴爾"
]
},
"videos": [
{
"order": 1,
"url": "https://img.yec.tw/bp/Files/374d9974ab2cbce382e42724fede7aa07313cae6.qt"
}
]
},
{
"displayName": "低調奢華hp讚",
"images": [
{
"height": 1000,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/Mu9N4P92upyour6m4ymrYw--/YXBwaWQ9dHdzcG1hbGw7dz0xMDAwO2g9MTAwMA--/https://img.yec.tw/bp/Files/945b996a1bada1ccb966b8b0215875447024324c.jpg.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/CswYNY.JXkUfESyLnKxu2Q--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/945b996a1bada1ccb966b8b0215875447024324c.jpg.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/gTvXPAaKH4XmeSSuBGaiXw--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/945b996a1bada1ccb966b8b0215875447024324c.jpg.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/78FnXBFQ4vOPvbdSa7kMkQ--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/945b996a1bada1ccb966b8b0215875447024324c.jpg.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/HRXXOFDS._pElXILUcG4lA--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/945b996a1bada1ccb966b8b0215875447024324c.jpg.cf.jpg",
"width": 80
},
{
"height": 1000,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/CVdkUfET_Ngdxwj1rbY49g--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/404603c25b19d075109b44255707b89d49b96347_1000x1000.jpg.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/.fgFQchY5CU3g.KqtHz.MA--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/404603c25b19d075109b44255707b89d49b96347_1000x1000.jpg.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/9hrMKBplQM2KUuxr6g68Pw--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/404603c25b19d075109b44255707b89d49b96347_1000x1000.jpg.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/HC4y9JJ6n7_IesnFTcv78w--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/404603c25b19d075109b44255707b89d49b96347_1000x1000.jpg.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/CVdkUfET_Ngdxwj1rbY49g--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/404603c25b19d075109b44255707b89d49b96347_1000x1000.jpg.cf.jpg",
"width": 80
}
],
"items": [
{
"displayName": "卡其色",
"partNo": "5568",
"spec": {
"name": "顏色",
"values": [
"卡其"
]
},
"stock": 0
},
{
"displayName": "灰色",
"partNo": "5569",
"spec": {
"name": "顏色",
"values": [
"灰色系"
]
},
"stock": 0
}
],
"spec": {
"name": "品牌",
"values": [
"hp惠普"
]
},
"videos": [
{
"order": 1,
"url": "https://img.yec.tw/bp/Files/374d9974ab2cbce382e42724fede7aa07313cae6.qt"
}
]
}
],
"msrp": "100.00",
"name": "(即期品)我是商品名稱",
"preserveDays": 56,
"safeStockQty": 1,
"shareMediaBetweenModels": false,
"shipType": {
"id": 61,
"name": "Express24HR"
},
"shortDescription": [
"我是簡短說明",
"我是簡短說明2"
],
"specs": [
{
"level": 1,
"name": "品牌"
},
{
"level": 2,
"name": "顏色"
}
],
"struDataAttrClusterId": "000003326689",
"struDataAttrClusterName": "品牌桌上型電腦",
"subStationId": "sub1",
"subStationName": "筆記型電腦超過十一個字test",
"taxable": true,
"warranty": {
"description": "保固說明文字",
"handler": "official",
"period": "一個月",
"scope": "新品瑕疵",
"productStatus": "new"
},
"weight": 88,
"width": 66,
"zoneId": "z3",
"zoneName": "電腦 / 週邊 / 軟體"
},
"reviewStatus": "pendingReview",
"subStationId": "sub1",
"subStationName": "筆記型電腦超過十一個字test",
"supplierId": 99999,
"supplierName": "雅虎測試",
"type": "newListing"
}
]
}
POST v1/proposals #
https://tw.supplier.yahoo.com/api/spa/v1/proposals
Create a proposal, supports newProduct, newListing, updateCopy, updateVideo, updateImageV2 and updateListingAttribute currently. The status field could be assigned tocomposinganddraftonly.
Payload: Proposal
Output
- HTTP Status Code: 200 (OK)
- Object: Proposal
Error
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400 | Invalid input | |
| 400 | 40000005 | Contains illegal character(s) |
| 400 | 40000010 | Multiple bad parameters |
| 400 | 40000011 | Invalid ISO-8601 format |
| 400 | 40000012 | Image could not be fetched |
| 400 | 40000015 | Invalid array size |
| 400 | 40000018 | Unexpected empty field |
| 400 | 40000019 | Cannot contains emoji |
| 400 | 40000020 | Cannot start/end with space |
| 400 | 40000025 | Invalid integer format |
| 400 | 40000029 | Invalid decimal format |
| 400 | 40009000 | The gross profit margin is too low |
| 400 | 40009001 | The gross profit margin should be greater than or equal to 0 |
| 400 | 40009002 | No permission to apply for low gross profit margin listing |
| 400 | 40009003 | No permission to set listing is not display |
| 400 | 40009005 | Sub station not exist |
| 400 | 40009007 | Price cannot be greater than CVS’ limitation NT$20,000 |
| 400 | 40009008 | Missing or bad sub station ID |
| 400 | 40009009 | Cannot fetch the provided media resource(s) |
| 400 | 40009010 | Manufacturer’s suggested retail price cannot be 0 |
| 400 | 40009011 | Price cannot be 0 |
| 400 | 40009012 | Cost cannot be 0 |
| 400 | 40009013 | Price cannot be greater than Manufacturer’s suggested retail price |
| 400 | 40009014 | Cost cannot be greater than Manufacturer’s suggested retail price |
| 400 | 40009015 | Cost cannot be greater than price |
| 400 | 40009016 | Manufacturer’s suggested retail price cannot be empty when the review status isn’t composing |
| 400 | 40009017 | Price cannot be empty when the review status isn’t composing and the type is newListing |
| 400 | 40009018 | Cost cannot be empty when the review status isn’t composing |
| 400 | 40009019 | Duplicated proposal product/listing media order |
| 400 | 40009020 | Insufficient proposal product/listing main image |
| 400 | 40009021 | The main image dimension should be a square and greater than or equal to 1000x1000 pixels |
| 400 | 40009022 | The image dimension should be a square and greater than or equal to 400x400 pixels |
| 400 | 40009023 | The first proposal product/listing model must have images when the review status isn’t composing |
| 400 | 40009024 | Seems not sharing images between models, please provide images for each model |
| 400 | 40009025 | Invalid iframe URL in the proposal copy HTML |
| 400 | 40009026 | Invalid image URL in the proposal copy HTML |
| 400 | 40009027 | Invalid listing display order |
| 400 | 40009028 | Invalid content in the proposal copy HTML |
| 400 | 40009029 | Mismatch category ID |
| 400 | 40009030 | Invalid categoryItem ID |
| 400 | 40009035 | Product warranty cannot be empty when the review status isn’t composing |
| 400 | 40009036 | Product warranty scope cannot be empty when the review status isn’t composing and warranty period isn’t 無保固 |
| 400 | 40009037 | Invalid product warranty handler, empty or none when the review status isn’t composing or warranty period isn’t 無保固 |
| 400 | 40009038 | Invalid media URL in the proposal |
| 400 | 40009039 | Invalid barcode |
| 400 | 40009040 | Duplicated warehouse barcode |
| 400 | 40009041 | Cannot designate the product as an install required item |
| 400 | 40009042 | Cannot designate the product as a large volume item’s gift |
| 400 | 40009043 | Proposal expired time must within +3 and +15 days |
| 400 | 40009044 | Product content rating cannot be empty when the review status isn’t composing |
| 400 | 40009045 | Invalid product content rating |
| 400 | 40009046 | Invalid product safe stock quantity |
| 400 | 40009047 | Product length cannot be empty when the review status isn’t composing |
| 400 | 40009048 | Product width cannot be empty when the review status isn’t composing |
| 400 | 40009049 | Product height cannot be empty when the review status isn’t composing |
| 400 | 40009050 | Product weight cannot be empty when the review status isn’t composing |
| 400 | 40009051 | Product length + width + height must be less than or equals to 150 cm |
| 400 | 40009052 | Product weight must be less than or equals to 20000 gram |
| 400 | 40009053 | Invalid product preserve days |
| 400 | 40009054 | Product cannot be a expiring item |
| 400 | 40009055 | Invalid product name, too long after appended the attribute name |
| 400 | 40009056 | Invalid product minimum packing count |
| 400 | 40009057 | Product display mode cannot be empty when the review status isn’t composing |
| 400 | 40009058 | Product game contents must be empty |
| 400 | 40009059 | Product structure data attribute cluster ID cannot be empty when the review status isn’t composing |
| 400 | 40009060 | Duplicated product specification |
| 400 | 40009061 | Duplicated product/listing attribute |
| 400 | 40009062 | Duplicate attributes and specifications |
| 400 | 40009063 | Proposal model specification must be empty when there is no attribute in the proposal |
| 400 | 40009064 | Proposal model display name must be empty when there is no attribute in the proposal |
| 400 | 40009065 | Proposal model specification name must be equal to each other |
| 400 | 40009066 | Proposal item specification must be empty when there aren’t 2 attributes in the proposal |
| 400 | 40009067 | Proposal item display name must be empty when there aren’t 2 attributes in the proposal |
| 400 | 40009068 | Proposal item specification name must be equal between models |
| 400 | 40009069 | Invalid proposal item stock |
| 400 | 40009070 | Proposal item warehouse barcode must be empty |
| 400 | 40009071 | Proposal item barcode must be empty |
| 400 | 40009072 | Proposal model specification cannot be empty when there isn’t no attribute in the proposal |
| 400 | 40009073 | Proposal model specification values must have only one value and pre-defined in structured data |
| 400 | 40009074 | Proposal item specification cannot be empty when there are 2 attributes in the proposal |
| 400 | 40009075 | Proposal item specification values must have only one value, be equal between models and pre-defined in structured data |
| 400 | 40009076 | Proposal models cannot be empty when the review status isn’t composing |
| 400 | 40009077 | Category item ID cannot be empty when the review status isn’t composing |
| 400 | 40009078 | Listing URL cannot be empty when the review status isn’t composing |
| 400 | 40009079 | Product name must start with (即期品) |
| 400 | 40009080 | Listing URL only allow Chinese, English, numeric and dash (-) |
| 400 | 40009081 | Invalid product short description, might be longer than 15 words or contains invalid character |
| 400 | 40009082 | Product short description must have at least one is not empty when the review status isn’t composing |
| 400 | 40009083 | Listing delivery type cannot be empty when the review status isn’t composing |
| 400 | 40009084 | Listing pre-order expected ship date cannot be empty when delivery type is pre-order |
| 400 | 40009085 | Listing customized order ship date after placed cannot be empty when delivery type is customized |
| 400 | 40009086 | Invalid listing pre-order expected ship date |
| 400 | 40009087 | Cannot sharing media between models for the proposal which isn’t with 1 layer attribute |
| 400 | 40009088 | Listing on shelved time cannot be greater than off shelved time |
| 400 | 40009089 | Product copy cannot be empty when the review status isn’t composing |
| 400 | 40009090 | Listing CVS purchase quantity limit must less than 20000 / price |
| 400 | 40009091 | Listing CVS purchase quantity limit must be empty |
| 400 | 40009092 | Cannot designate the product as a recyclable item |
| 400 | 40009093 | Cannot designate the product as an outright purchased item |
| 400 | 40009094 | The supplier hasn’t be granted the ship type permission |
| 400 | 40009095 | Invalid delivery type |
| 400 | 40009096 | Invalid structure data attribute cluster ID |
| 400 | 40009097 | Only the first model can assign images when sharing media between models |
| 400 | 40009098 | Only the first model can assign videos when sharing media between models |
| 400 | 40009100 | Unallowed discount tool |
| 400 | 40009101 | Unallowed discount target member |
| 400 | 40009102 | Unallowed discount site |
| 400 | 40009103 | Unallowed discount activity |
| 400 | 40009105 | Cannot create a proposal with review status not in composing, draft and pendingReview |
| 400 | 40009106 | Cannot create a non-composing proposal with empty warranty period |
| 400 | 40009107 | Proposal applicant cannot be empty when the review status isn’t composing |
| 400 | 40009108 | The order number must be sequential when the review status isn’t composing |
| 400 | 40009109 | The sub station doesn’t support the delivery type |
| 400 | 40009110 | Invalid ship type ID |
| 400 | 40009111 | Product name cannot be empty when the review status isn’t composing |
| 400 | 40009112 | Product/Listing attribute value cannot be empty |
| 400 | 40009113 | Product/Listing attribute value’s length does not meet the constraints |
| 400 | 40009114 | Too many customized product/listing attribute values |
| 400 | 40009115 | Missing required product/listing attribute |
| 400 | 40009116 | Product/Listing attributes values are duplicated |
| 400 | 40009117 | Too many product/listing attribute values |
| 400 | 40009119 | The image order cannot be empty |
| 400 | 40009120 | Duplicated game contents |
| 400 | 40009121 | Unallowed game contents |
| 400 | 40009122 | Invalid product is large volume |
| 400 | 40009124 | Duplicated display name |
| 400 | 40009127 | Invalid listing ID |
| 400 | 40009128 | Invalid listing copy |
| 400 | 40009131 | Video does not exist |
| 400 | 40009132 | Product length, width or height must be less than or equals to its limitation |
| 400 | 40009133 | The SKU doesn’t belong to the listing |
| 400 | 40009134 | Duplicated SKU in the proposal listing models, additionalPurchases, complimentaries or selectComplimentaries |
| 400 | 40009135 | The first model SKU must correspond to the listing if you share the media between models |
| 400 | 40009136 | The image dimension must be 1000, 400, 250, 135 or 80 |
| 400 | 40009137 | The image must be square and the dimension must greater than or equal to the specified pixels |
| 400 | 40009138 | The image URL doesn’t belong to the listing |
| 400 | 40009139 | The width doesn’t match the original image |
| 400 | 40009140 | The proposal listing images/videos must be empty when there are models in the listing |
| 400 | 40009141 | The proposal listing models must be empty when there is no model in the listing |
| 400 | 40009142 | The SKU belongs to a complimentary group, cannot be adjusted directly |
| 400 | 40009143 | Product name for warehouse entry must be less than 50 words |
| 400 | 40009144 | Product images must be synchronized when there are models in the listing |
| 400 | 40009145 | Duplicated warehouse product name |
| 400 | 40009146 | Invalid NCC certification code |
| 400 | 40009184 | The product in the specified sub station could not be tax-free |
| 400 | 40009186 | The threshold freebie listing must be invisible |
| 400 | 40009187 | Cannot be a threshold freebie listing when there are 2 attributes in the proposal |
| 400 | 40009188 | The sub station hasn’t be granted the ship type permission |
| 400 | 40009195 | Missing required E-Voucher attribute |
| 400 | 40009196 | E-Voucher attribute value’s length not match the constraints |
| 400 | 40009197 | Invalid E-Voucher attribute name |
| 400 | 40009198 | E-Voucher attributes cannot be empty |
| 400 | 40009199 | E-Voucher type cannot be empty |
| 400 | 40009200 | Cannot be an E-Voucher listing when there isn’t no attribute in the proposal |
| 400 | 40009212 | Invalid product warranty productStatus |
| 400 | 40009225 | Brand ID cannot be empty when the review status isn’t composing |
| 400 | 40009226 | Brand ID must be pre-defined in brand data |
| 400 | 40009229 | Invalid BSMI code |
| 400 | 40009231 | Invalid TD code |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 403 | 40309000 | The supplier hasn’t signed the sub station contract |
| 422 | 42209000 | Supports POST/PUT newListing, newProduct, updateCopy, newListingByApi, updateVideo, updateImageV2 and updateListingAttribute proposal type only currently |
| 422 | 42209001 | Supports POST/PUT composing, draft and pendingReview proposal review status only currently |
| 500 | 50000006 | Internal server error |
| 500 | 50000007 | Internal server error |
| 500 | 50000020 | Internal server error |
| 500 | 50000021 | Internal server error |
| 500 | 50000022 | Internal server error |
| 500 | 50000023 | Internal server error |
| 500 | 50000024 | Internal server error |
| 500 | 50000026 | Internal server error |
| 500 | 50000027 | Internal server error |
| 500 | 50000028 | Internal server error |
| 500 | 50000029 | Internal server error |
| 500 | 50000030 | Internal server error |
| 500 | 50000038 | Internal server error |
| 500 | 50000039 | Internal server error |
| 500 | 50009000 | Internal server error |
| 500 | 50009001 | Internal server error |
| 500 | 50009002 | Internal server error |
| 500 | 50009006 | Internal server error |
Example
| Type | Case | Request | Response Status | Response |
|---|---|---|---|---|
| 新增一般賣場 | 有屬性單層賣場
|
POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response |
| 新增一般賣場 | 有屬性雙層賣場
|
POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response |
| 新增一般賣場 | 無屬性賣場
|
POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response |
| 新增新增贈品/配件/屬性商品 | 無屬性商品 | POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response |
| 新增新增贈品/配件/屬性商品 | 單層屬性商品
|
POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response |
| 新增新增贈品/配件/屬性商品 | 雙層屬性商品 | POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response |
| 修改賣場/商品詳情提案 | POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response | |
| 修改賣場影片 | 有屬性賣場 | POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response |
| 修改賣場影片 | 無屬性賣場 | POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response |
| 修改賣場圖片 | 無屬性賣場/買就送贈品/任選贈品/加價購 修改賣場
修改買就送贈品第2張商品圖 不同時修改商品圖片 |
POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response |
| 修改賣場圖片 | 有屬性賣場 修改屬性商品
|
POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response |
| 修改賣場規格表 | POST /api/spa/v1/proposals Body |
HTTP/1.1 201 | Response |
PUT v1/proposals/{id} #
https://tw.supplier.yahoo.com/api/spa/v1/proposals
Update a proposal, supports newProduct, newListing, updateCopy, updateVideo, updateImageV2 and updateListingAttribute currently.
The status field could be updated tocomposing,draft,pendingReviewonly.
The other field could be updated only while the status iscomposinganddraft
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | Int32 | Y | Proposal ID |
Payload: Proposal
Output
- HTTP Status Code: 200 (OK)
- Object: Proposal
Error
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400 | Invalid input | |
| 400 | 40000005 | Contains illegal character(s) |
| 400 | 40000010 | Multiple bad parameters |
| 400 | 40000011 | Invalid ISO-8601 format |
| 400 | 40000012 | Image could not be fetched |
| 400 | 40000015 | Invalid array size |
| 400 | 40000018 | Unexpected empty field |
| 400 | 40000019 | Cannot contains emoji |
| 400 | 40000020 | Cannot start/end with space |
| 400 | 40000025 | Invalid integer format |
| 400 | 40000029 | Invalid decimal format |
| 400 | 40009000 | The gross profit margin is too low |
| 400 | 40009001 | The gross profit margin should be greater than or equal to 0 |
| 400 | 40009002 | No permission to apply for low gross profit margin listing |
| 400 | 40009003 | No permission to set listing is not display |
| 400 | 40009005 | Sub station not exist |
| 400 | 40009007 | Price cannot be greater than CVS’ limitation NT$20,000 |
| 400 | 40009008 | Missing or bad sub station ID |
| 400 | 40009009 | Cannot fetch the provided media resource(s) |
| 400 | 40009010 | Manufacturer’s suggested retail price cannot be 0 |
| 400 | 40009011 | Price cannot be 0 |
| 400 | 40009012 | Cost cannot be 0 |
| 400 | 40009013 | Price cannot be greater than Manufacturer’s suggested retail price |
| 400 | 40009014 | Cost cannot be greater than Manufacturer’s suggested retail price |
| 400 | 40009015 | Cost cannot be greater than price |
| 400 | 40009016 | Manufacturer’s suggested retail price cannot be empty when the review status isn’t composing |
| 400 | 40009017 | Price cannot be empty when the review status isn’t composing and the type is newListing |
| 400 | 40009018 | Cost cannot be empty when the review status isn’t composing |
| 400 | 40009019 | Duplicated proposal product/listing media order |
| 400 | 40009020 | Insufficient proposal product/listing main image |
| 400 | 40009021 | The main image dimension should be a square and greater than or equal to 1000x1000 pixels |
| 400 | 40009022 | The image dimension should be a square and greater than or equal to 400x400 pixels |
| 400 | 40009023 | The first proposal product/listing model must have images when the review status isn’t composing |
| 400 | 40009024 | Seems not sharing images between models, please provide images for each model |
| 400 | 40009025 | Invalid iframe URL in the proposal copy HTML |
| 400 | 40009026 | Invalid image URL in the proposal copy HTML |
| 400 | 40009027 | Invalid listing display order |
| 400 | 40009028 | Invalid content in the proposal copy HTML |
| 400 | 40009029 | Mismatch category ID |
| 400 | 40009030 | Invalid categoryItem ID |
| 400 | 40009035 | Product warranty cannot be empty when the review status isn’t composing |
| 400 | 40009036 | Product warranty scope cannot be empty when the review status isn’t composing and warranty period isn’t 無保固 |
| 400 | 40009037 | Invalid product warranty handler, empty or none when the review status isn’t composing or warranty period isn’t 無保固 |
| 400 | 40009038 | Invalid media URL in the proposal |
| 400 | 40009039 | Invalid barcode |
| 400 | 40009040 | Duplicated warehouse barcode |
| 400 | 40009041 | Cannot designate the product as an install required item |
| 400 | 40009042 | Cannot designate the product as a large volume item’s gift |
| 400 | 40009043 | Proposal expired time must within +3 and +15 days |
| 400 | 40009044 | Product content rating cannot be empty when the review status isn’t composing |
| 400 | 40009045 | Invalid product content rating |
| 400 | 40009046 | Invalid product safe stock quantity |
| 400 | 40009047 | Product length cannot be empty when the review status isn’t composing |
| 400 | 40009048 | Product width cannot be empty when the review status isn’t composing |
| 400 | 40009049 | Product height cannot be empty when the review status isn’t composing |
| 400 | 40009050 | Product weight cannot be empty when the review status isn’t composing |
| 400 | 40009051 | Product length + width + height must be less than or equals to 150 cm |
| 400 | 40009052 | Product weight must be less than or equals to 20000 gram |
| 400 | 40009053 | Invalid product preserve days |
| 400 | 40009054 | Product cannot be a expiring item |
| 400 | 40009055 | Invalid product name, too long after appended the attribute name |
| 400 | 40009056 | Invalid product minimum packing count |
| 400 | 40009057 | Product display mode cannot be empty when the review status isn’t composing |
| 400 | 40009058 | Product game contents must be empty |
| 400 | 40009059 | Product structure data attribute cluster ID cannot be empty when the review status isn’t composing |
| 400 | 40009060 | Duplicated product specification |
| 400 | 40009061 | Duplicated product/listing attribute |
| 400 | 40009062 | Duplicate attributes and specifications |
| 400 | 40009063 | Proposal model specification must be empty when there is no attribute in the proposal |
| 400 | 40009064 | Proposal model display name must be empty when there is no attribute in the proposal |
| 400 | 40009065 | Proposal model specification name must be equal to each other |
| 400 | 40009066 | Proposal item specification must be empty when there aren’t 2 attributes in the proposal |
| 400 | 40009067 | Proposal item display name must be empty when there aren’t 2 attributes in the proposal |
| 400 | 40009068 | Proposal item specification name must be equal between models |
| 400 | 40009069 | Invalid proposal item stock |
| 400 | 40009070 | Proposal item warehouse barcode must be empty |
| 400 | 40009071 | Proposal item barcode must be empty |
| 400 | 40009072 | Proposal model specification cannot be empty when there isn’t no attribute in the proposal |
| 400 | 40009073 | Proposal model specification values must have only one value and pre-defined in structured data |
| 400 | 40009074 | Proposal item specification cannot be empty when there are 2 attributes in the proposal |
| 400 | 40009075 | Proposal item specification values must have only one value, be equal between models and pre-defined in structured data |
| 400 | 40009076 | Proposal models cannot be empty when the review status isn’t composing |
| 400 | 40009077 | Category item ID cannot be empty when the review status isn’t composing |
| 400 | 40009078 | Listing URL cannot be empty when the review status isn’t composing |
| 400 | 40009079 | Product name must start with (即期品) |
| 400 | 40009080 | Listing URL only allow Chinese, English, numeric and dash (-) |
| 400 | 40009081 | Invalid product short description, might be longer than 15 words or contains invalid character |
| 400 | 40009082 | Product short description must have at least one is not empty when the review status isn’t composing |
| 400 | 40009083 | Listing delivery type cannot be empty when the review status isn’t composing |
| 400 | 40009084 | Listing pre-order expected ship date cannot be empty when delivery type is pre-order |
| 400 | 40009085 | Listing customized order ship date after placed cannot be empty when delivery type is customized |
| 400 | 40009086 | Invalid listing pre-order expected ship date |
| 400 | 40009087 | Cannot sharing media between models for the proposal which isn’t with 1 layer attribute |
| 400 | 40009088 | Listing on shelved time cannot be greater than off shelved time |
| 400 | 40009089 | Product copy cannot be empty when the review status isn’t composing |
| 400 | 40009090 | Listing CVS purchase quantity limit must less than 20000 / price |
| 400 | 40009091 | Listing CVS purchase quantity limit must be empty |
| 400 | 40009092 | Cannot designate the product as a recyclable item |
| 400 | 40009093 | Cannot designate the product as an outright purchased item |
| 400 | 40009094 | The supplier hasn’t be granted the ship type permission |
| 400 | 40009095 | Invalid delivery type |
| 400 | 40009096 | Invalid structure data attribute cluster ID |
| 400 | 40009097 | Only the first model can assign images when sharing media between models |
| 400 | 40009098 | Only the first model can assign videos when sharing media between models |
| 400 | 40009100 | Unallowed discount tool |
| 400 | 40009101 | Unallowed discount target member |
| 400 | 40009102 | Unallowed discount site |
| 400 | 40009103 | Unallowed discount activity |
| 400 | 40009104 | Cannot PUT the proposal which review status isn’t composing and draft |
| 400 | 40009106 | Cannot create a non-composing proposal with empty warranty period |
| 400 | 40009107 | Proposal applicant cannot be empty when the review status isn’t composing |
| 400 | 40009108 | The order number must be sequential when the review status isn’t composing |
| 400 | 40009109 | The sub station doesn’t support the delivery type |
| 400 | 40009110 | Invalid ship type ID |
| 400 | 40009111 | Product name cannot be empty when the review status isn’t composing |
| 400 | 40009112 | Product/Listing attribute value cannot be empty |
| 400 | 40009113 | Product/Listing attribute value’s length does not meet the constraints |
| 400 | 40009114 | Too many customized product/listing attribute values |
| 400 | 40009115 | Missing required product/listing attribute |
| 400 | 40009116 | Product/Listing attributes values are duplicated |
| 400 | 40009117 | Too many product/listing attribute values |
| 400 | 40009119 | The image order cannot be empty |
| 400 | 40009120 | Duplicated game contents |
| 400 | 40009121 | Unallowed game contents |
| 400 | 40009122 | Invalid product is large volume |
| 400 | 40009124 | Duplicated display name |
| 400 | 40009127 | Invalid listing ID |
| 400 | 40009128 | Invalid listing copy |
| 400 | 40009131 | Video does not exist |
| 400 | 40009132 | Product length, width or height must be less than or equals to its limitation |
| 400 | 40009133 | The SKU doesn’t belong to the listing |
| 400 | 40009134 | Duplicated SKU in the proposal listing models, additionalPurchases, complimentaries or selectComplimentaries |
| 400 | 40009135 | The first model SKU must correspond to the listing if you share the media between models |
| 400 | 40009136 | The image dimension must be 1000, 400, 250, 135 or 80 |
| 400 | 40009137 | The image must be square and the dimension must greater than or equal to the specified pixels |
| 400 | 40009138 | The image URL doesn’t belong to the listing |
| 400 | 40009139 | The width doesn’t match the original image |
| 400 | 40009140 | The proposal listing images/videos must be empty when there are models in the listing |
| 400 | 40009141 | The proposal listing models must be empty when there is no model in the listing |
| 400 | 40009142 | The SKU belongs to a complimentary group, cannot be adjusted directly |
| 400 | 40009143 | Product name for warehouse entry must be less than 50 words |
| 400 | 40009144 | Product images must be synchronized when there are models in the listing |
| 400 | 40009145 | Duplicated warehouse product name |
| 400 | 40009146 | Invalid NCC certification code |
| 400 | 40009184 | The product in the specified sub station could not be tax-free |
| 400 | 40009186 | The threshold freebie listing must be invisible |
| 400 | 40009187 | Cannot be a threshold freebie listing when there are 2 attributes in the proposal |
| 400 | 40009188 | The sub station hasn’t be granted the ship type permission |
| 400 | 40009195 | Missing required E-Voucher attribute |
| 400 | 40009196 | E-Voucher attribute value’s length not match the constraints |
| 400 | 40009197 | Invalid E-Voucher attribute name |
| 400 | 40009198 | E-Voucher attributes cannot be empty |
| 400 | 40009199 | E-Voucher type cannot be empty |
| 400 | 40009200 | Cannot be an E-Voucher listing when there isn’t no attribute in the proposal |
| 400 | 40009212 | Invalid product warranty productStatus |
| 400 | 40009225 | Brand ID cannot be empty when the review status isn’t composing |
| 400 | 40009226 | Brand ID must be pre-defined in brand data |
| 400 | 40009229 | Invalid BSMI code |
| 400 | 40009231 | Invalid TD code |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 403 | 40309000 | The supplier hasn’t signed the sub station contract |
| 422 | 42200001 | Create resource by PUT method is unsupported |
| 422 | 42209000 | Supports POST/PUT newListing, newProduct, updateCopy, newListingByApi, updateVideo, updateImageV2 and updateListingAttribute proposal type only currently |
| 422 | 42209001 | Supports POST/PUT composing, draft and pendingReview proposal review status only currently |
| 422 | 42209002 | Invalid state flow of proposal review status |
| 429 | 42900001 | Reach the maximum number of modification times |
| 500 | 50000006 | Internal server error |
| 500 | 50000007 | Internal server error |
| 500 | 50000020 | Internal server error |
| 500 | 50000021 | Internal server error |
| 500 | 50000022 | Internal server error |
| 500 | 50000023 | Internal server error |
| 500 | 50000024 | Internal server error |
| 500 | 50000026 | Internal server error |
| 500 | 50000027 | Internal server error |
| 500 | 50000028 | Internal server error |
| 500 | 50000029 | Internal server error |
| 500 | 50000030 | Internal server error |
| 500 | 50000038 | Internal server error |
| 500 | 50000039 | Internal server error |
| 500 | 50009000 | Internal server error |
| 500 | 50009001 | Internal server error |
| 500 | 50009002 | Internal server error |
| 500 | 50009006 | Internal server error |
Example
Update Listing Model Proposal #
GET v1/proposal/updateListingModels/{id} #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/updateListingModels
Get an update listing model proposal.
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | Int32 | Y | Proposal ID |
| fields | String | N | Additional fields
|
Output
- HTTP Status Code: 200 (OK)
- Object: UpdateListingModelProposal
Error
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400 | Invalid input | |
| 400 | 40000005 | Contains illegal character(s) |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 404 | 40409000 | Proposal not found |
| 500 | 50000007 | Internal server error |
| 500 | 50000027 | Internal server error |
Example
- Get a update listing model proposal.
GET /api/spa/v1/proposal/updateListingModels/427983
HTTP/1.1 200 OK
{
"applicant": "applicant-name",
"contactWindow": "contact-windows-id",
"creator": "creator-id",
"createdTs": "2020-09-18T11:31:53Z",
"executeStatus": "idle",
"executedTs": "2020-09-18T11:32:00Z",
"expiredTs": "2020-10-02T16:00:00Z",
"modifiedTimes": 1,
"modifiedTs": "2020-09-18T11:32:00Z",
"modifier": "modifier-id",
"reviewStatus": "draft",
"supplierId": 99999,
"note": "proposal-note",
"id": 427984,
"listing": {
"id": 3401834,
"origLayer": 1
},
"models": [
{
"sku": 6645988,
"spec": {
"name": "商品尺寸",
"selectedValue": "S"
},
"isVisible": true,
"name": "賣場名稱-S",
"attributes": [
{
"name": "商品尺寸",
"values": [
"S"
]
}
]
},
{
"sku": 6645989,
"spec": {
"name": "商品尺寸",
"selectedValue": "M"
},
"isVisible": true,
"name": "賣場名稱-M",
"attributes": [
{
"name": "商品尺寸",
"values": [
"M"
]
}
]
},
{
"sku": 6645990,
"spec": {
"name": "商品尺寸",
"selectedValue": "L"
},
"isVisible": true,
"name": "賣場名稱-L",
"attributes": [
{
"name": "商品尺寸",
"values": [
"L"
]
}
]
},
{
"name": "賣場名稱-F",
"spec": {
"name": "商品尺寸",
"selectedValue": "F"
},
"attributes": [
{
"name": "商品尺寸",
"values": [
"Free Size"
]
}
],
"isVisible": true,
"stock": 1,
"partNo": "商品料號",
"barcode": "725272730706",
"images": [
{
"height": 1000,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/UjzNpdSIiIJL2LIb5ZmwMw--/YXBwaWQ9dHdzcG1hbGw7dz0xMDAwO2g9MTAwMA--/https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/S8WRr5VjXryulqOX_LfxMQ--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/MFukltOb5nljXOOPiynHfQ--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/uftkGI50hrk.tW2bQsztWw--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/CfrN4M5Hvp_V5tx32thYxQ--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg.cf.jpg",
"width": 80
},
{
"height": 1000,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/DDWm6ACultR0Xi_Xr4v0Ug--/YXBwaWQ9dHdzcG1hbGw7dz0xMDAwO2g9MTAwMA--/https://img.yec.tw/bp/Files/021704884b14d4adaa9525e5ac65aa4874331d15_1000x1000.jpg.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/bI3StNYU9Y02tYs6n6HMUw--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/021704884b14d4adaa9525e5ac65aa4874331d15_1000x1000.jpg.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/V5PzZIpHySkSHICgZz4h8g--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/021704884b14d4adaa9525e5ac65aa4874331d15_1000x1000.jpg.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/7yPYOzzKuM0kRsnA_DUa8g--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/021704884b14d4adaa9525e5ac65aa4874331d15_1000x1000.jpg.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/ix3I.yHkUftXl0yPbFEwbg--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/021704884b14d4adaa9525e5ac65aa4874331d15_1000x1000.jpg.cf.jpg",
"width": 80
}
]
}
],
"diff": {
"added": [
{
"sku": 6645988,
"spec": {
"name": "商品尺寸",
"selectedValue": "S"
},
"isVisible": true,
"name": "賣場名稱-S",
"attributes": [
{
"name": "商品尺寸",
"values": [
"S"
]
}
]
},
{
"name": "賣場名稱-F",
"spec": {
"name": "商品尺寸",
"selectedValue": "F"
},
"attributes": [
{
"name": "商品尺寸",
"values": [
"Free Size"
]
}
],
"isVisible": true,
"stock": 1,
"partNo": "商品料號",
"barcode": "725272730706",
"images": [
{
"height": 1000,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/UjzNpdSIiIJL2LIb5ZmwMw--/YXBwaWQ9dHdzcG1hbGw7dz0xMDAwO2g9MTAwMA--/https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/S8WRr5VjXryulqOX_LfxMQ--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/MFukltOb5nljXOOPiynHfQ--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/uftkGI50hrk.tW2bQsztWw--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 1,
"url": "https://img.yec.tw/cl/api/res/1.2/CfrN4M5Hvp_V5tx32thYxQ--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg.cf.jpg",
"width": 80
},
{
"height": 1000,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/DDWm6ACultR0Xi_Xr4v0Ug--/YXBwaWQ9dHdzcG1hbGw7dz0xMDAwO2g9MTAwMA--/https://img.yec.tw/bp/Files/021704884b14d4adaa9525e5ac65aa4874331d15_1000x1000.jpg.cf.jpg",
"width": 1000
},
{
"height": 400,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/bI3StNYU9Y02tYs6n6HMUw--/YXBwaWQ9dHdzcG1hbGw7dz00MDA7aD00MDA-/https://img.yec.tw/bp/Files/021704884b14d4adaa9525e5ac65aa4874331d15_1000x1000.jpg.cf.jpg",
"width": 400
},
{
"height": 250,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/V5PzZIpHySkSHICgZz4h8g--/YXBwaWQ9dHdzcG1hbGw7dz0yNTA7aD0yNTA-/https://img.yec.tw/bp/Files/021704884b14d4adaa9525e5ac65aa4874331d15_1000x1000.jpg.cf.jpg",
"width": 250
},
{
"height": 135,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/7yPYOzzKuM0kRsnA_DUa8g--/YXBwaWQ9dHdzcG1hbGw7dz0xMzU7aD0xMzU-/https://img.yec.tw/bp/Files/021704884b14d4adaa9525e5ac65aa4874331d15_1000x1000.jpg.cf.jpg",
"width": 135
},
{
"height": 80,
"order": 2,
"url": "https://img.yec.tw/cl/api/res/1.2/ix3I.yHkUftXl0yPbFEwbg--/YXBwaWQ9dHdzcG1hbGw7dz04MDtoPTgw/https://img.yec.tw/bp/Files/021704884b14d4adaa9525e5ac65aa4874331d15_1000x1000.jpg.cf.jpg",
"width": 80
}
]
}
],
"removed": [
{
"sku": 6645111,
"spec": {
"name": "商品尺寸",
"selectedValue": "XL"
},
"isVisible": true,
"name": "賣場名稱-XL",
"attributes": [
{
"name": "商品尺寸",
"values": [
"XL"
]
}
]
}
],
"updated": [
{
"origin": {
"spec": {
"name": "商品尺寸",
"selectedValue": "L號"
},
"name": "賣場名稱-L",
"attributes": [
{
"name": "商品尺寸",
"values": [
"L"
]
}
]
},
"outcome": {
"spec": {
"name": "商品尺寸",
"selectedValue": "L"
},
"name": "賣場名稱-L",
"attributes": [
{
"name": "商品尺寸",
"values": [
"L"
]
}
]
},
"sku": 6645990
}
]
}
}
GET v1/proposal/updateListingModels #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/updateListingModels
Query update listing model proposals.
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | String | N | Comma separated proposal ID. |
| subStationId | String | N | Comma separated sub station id listing, e.g. sub1,sub2. |
| reviewStatus | String | N | Comma separated review status, e.g. composing,draft.定義表 |
| executeStatus | String | N | Comma separated execute status, e.g. idle,finished.定義表 |
| sort | String | N | Sort condition: [+-][id, appliedTs, expiredTs, reviewedTs, executedTs, modifiedTs] Default: -id |
| fields | String | N | Additional fields
|
| offset | Int32 | N | Pagination offset. Default: 0Min: 0 |
| limit | Int32 | N | Pagination limit. Default: 15Min: 0Max: 30 |
Output
- HTTP Status Code: 200 (OK)
- Object: UpdateListingModelProposals
Error
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400 | Invalid input | |
| 400 | 40000005 | Contains illegal character(s) |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 500 | 50000006 | Internal server error |
| 500 | 50000007 | Internal server error |
| 500 | 50000027 | Internal server error |
Example
- Query update listing model proposals.
GET /api/spa/v1/proposal/updateListingModels?id=427984,427985
HTTP/1.1 200 OK
{
"pagination": {
"resultsTotal": 2
},
"proposals": [
{
"applicant": "applicant-name",
"contactWindow": "contact-windows-id",
"creator": "creator-id",
"createdTs": "2020-09-18T11:31:53Z",
"executeStatus": "idle",
"executedTs": "2020-09-18T11:32:00Z",
"expiredTs": "2020-10-02T16:00:00Z",
"modifiedTimes": 1,
"modifiedTs": "2020-09-18T11:32:00Z",
"modifier": "modifier-id",
"reviewStatus": "draft",
"supplierId": 99999,
"note": "proposal-note",
"id": 427984,
"listing": {
"id": 3401834,
"origLayer": 1
},
"models": [
{
"sku": 6645988,
"spec": {
"name": "商品尺寸",
"selectedValue": "S號"
},
"isVisible": true,
"name": "賣場名稱-S",
"attributes": [
{
"name": "商品尺寸",
"values": [
"S"
]
}
]
},
{
"sku": 6645989,
"spec": {
"name": "商品尺寸",
"selectedValue": "M號"
},
"isVisible": true,
"name": "賣場名稱-M",
"attributes": [
{
"name": "商品尺寸",
"values": [
"M"
]
}
]
},
{
"sku": 6645990,
"spec": {
"name": "商品尺寸",
"selectedValue": "L號"
},
"isVisible": true,
"name": "賣場名稱-L",
"attributes": [
{
"name": "商品尺寸",
"values": [
"L"
]
}
]
}
],
"diff": {
"added": [
{
"sku": 6645988,
"spec": {
"name": "商品尺寸",
"selectedValue": "S號"
},
"isVisible": true,
"name": "賣場名稱-S",
"attributes": [
{
"name": "商品尺寸",
"values": [
"S"
]
}
]
}
],
"removed": [
{
"sku": 6645999,
"spec": {
"name": "商品尺寸",
"selectedValue": "M號"
},
"isVisible": true,
"name": "賣場名稱-M",
"attributes": [
{
"name": "商品尺寸",
"values": [
"M"
]
}
]
}
]
}
},
{
"applicant": "applicant-name",
"contactWindow": "contact-windows-id",
"creator": "creator-id",
"createdTs": "2020-09-18T11:31:53Z",
"executeStatus": "idle",
"executedTs": "2020-09-18T11:32:00Z",
"expiredTs": "2020-10-02T16:00:00Z",
"modifiedTimes": 1,
"modifiedTs": "2020-09-18T11:32:00Z",
"modifier": "modifier-id",
"reviewStatus": "draft",
"supplierId": 99999,
"note": "proposal-note",
"id": 427985,
"listing": {
"id": 3401835,
"origLayer": 2
},
"models": [
{
"spec": {
"name": "顏色",
"selectedValue": "白色"
},
"sku": 6645992,
"items": [
{
"id": 6645985,
"sku": 6645985,
"spec": {
"name": "商品尺寸",
"selectedValue": "S"
},
"isVisible": true,
"name": "賣場名稱-白色-S",
"attributes": [
{
"name": "顏色",
"values": [
"白色系"
]
},
{
"name": "商品尺寸",
"values": [
"S"
]
}
]
},
{
"id": 6645986,
"sku": 6645986,
"spec": {
"name": "商品尺寸",
"selectedValue": "M"
},
"isVisible": true,
"name": "賣場名稱-白色-M",
"attributes": [
{
"name": "顏色",
"values": [
"白色系"
]
},
{
"name": "商品尺寸",
"values": [
"M"
]
}
]
},
{
"id": 6645987,
"sku": 6645987,
"spec": {
"name": "商品尺寸",
"selectedValue": "L"
},
"isVisible": true,
"name": "賣場名稱-白色-L",
"attributes": [
{
"name": "顏色",
"values": [
"白色系"
]
},
{
"name": "商品尺寸",
"values": [
"L"
]
}
]
}
],
"isVisible": true
},
{
"spec": {
"name": "顏色",
"selectedValue": "灰色"
},
"sku": 6645993,
"items": [
{
"id": 6645988,
"sku": 6645988,
"spec": {
"name": "商品尺寸",
"selectedValue": "S"
},
"isVisible": true,
"name": "賣場名稱-灰色-S",
"attributes": [
{
"name": "顏色",
"values": [
"灰色系"
]
},
{
"name": "商品尺寸",
"values": [
"S"
]
}
]
},
{
"id": 6645989,
"sku": 6645989,
"spec": {
"name": "商品尺寸",
"selectedValue": "M"
},
"isVisible": true,
"name": "賣場名稱-灰色-M",
"attributes": [
{
"name": "顏色",
"values": [
"灰色系"
]
},
{
"name": "商品尺寸",
"values": [
"M"
]
}
]
},
{
"id": 6645990,
"sku": 6645990,
"spec": {
"name": "商品尺寸",
"selectedValue": "L"
},
"isVisible": true,
"name": "賣場名稱-灰色-L",
"attributes": [
{
"name": "顏色",
"values": [
"灰色系"
]
},
{
"name": "商品尺寸",
"values": [
"L"
]
}
]
}
],
"isVisible": true
}
],
"diff": {
"added": [
{
"spec": {
"name": "顏色",
"selectedValue": "白色"
},
"sku": 6645992,
"items": [
{
"id": 6645987,
"sku": 6645987,
"spec": {
"name": "商品尺寸",
"selectedValue": "L"
},
"isVisible": true,
"name": "賣場名稱-白色-L",
"attributes": [
{
"name": "顏色",
"values": [
"白色系"
]
},
{
"name": "商品尺寸",
"values": [
"L"
]
}
]
}
],
"isVisible": true
},
{
"spec": {
"name": "顏色",
"selectedValue": "灰色"
},
"sku": 6645993,
"items": [
{
"id": 6645990,
"sku": 6645990,
"spec": {
"name": "商品尺寸",
"selectedValue": "L"
},
"isVisible": true,
"name": "賣場名稱-灰色-L",
"attributes": [
{
"name": "顏色",
"values": [
"灰色系"
]
},
{
"name": "商品尺寸",
"values": [
"L"
]
}
]
}
],
"isVisible": true
}
],
"removed": [
{
"spec": {
"name": "顏色",
"selectedValue": "灰色"
},
"sku": 6645993,
"items": [
{
"sku": 6645998,
"spec": {
"name": "商品尺寸",
"selectedValue": "XL"
},
"isVisible": true,
"name": "賣場名稱-灰色-XL",
"attributes": [
{
"name": "顏色",
"values": [
"灰色系"
]
},
{
"name": "商品尺寸",
"values": [
"XL"
]
}
]
}
],
"isVisible": true
}
],
"updated": [
{
"origin": {
"spec": {
"name": "商品尺寸",
"selectedValue": "S號"
},
"name": "賣場名稱-白色-S",
"attributes": [
{
"name": "顏色",
"values": [
"白色系"
]
},
{
"name": "商品尺寸",
"values": [
"S"
]
}
]
},
"outcome": {
"spec": {
"name": "商品尺寸",
"selectedValue": "S"
},
"name": "賣場名稱-白色-S",
"attributes": [
{
"name": "顏色",
"values": [
"白色系"
]
},
{
"name": "商品尺寸",
"values": [
"S"
]
}
]
},
"sku": 6645985
}
]
}
}
]
}
POST v1/proposal/updateListingModels #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/updateListingModels
建立一個修改賣場屬性商品的提案。透過指定 dryrun = true,可將欲驗證是否能加入該賣場的商品 SKU 放進 skuCandidates 進行驗證。
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| dryrun | String | N | dry run 的狀態,設定為 true 時可將欲驗證是否能加入該賣場的商品 SKU 放進 skuCandidates 進行驗證 |
| isGift | String | N | 僅作用於 dry run 狀態為 true 時,當設定為 true 時可將商品 SKU 放進 skuCandidates 進行驗證,確認商品是否能加入該賣場成為贈品商品。 |
| isAdditionalPurchases | String | N | 僅作用於 dry run 狀態為 true 時,當設定為 true 時可將商品 SKU 放進 skuCandidates 進行驗證,確認商品是否能加入該賣場成為加價購商品。 |
Payload:
ProposalModel
Column Name
Note
sku
第 1 層屬性的商品編號。若此型號已既存於賣場,需輸入此欄位,反之輸入
spec 說明新型號
spec
第 1 層屬性的名稱與項目。由此欄位說明屬性的名稱與項目,反之輸入
sku 說明欲調整的屬性名稱與項目。若同時輸入 sku 與 spec,將以提案輸入的 spec 更新成該 SKU 的屬性名稱與項目
若欲調整贈品/加價購時,則此欄位 spec.name 由 API 自動產生
items
第 2 層屬性。若欲調整的賣場結構為雙層屬性,此欄需填寫第 2 層屬性
isVisible
第 1 層屬性是否顯示於前台賣場
images
第 1 層屬性的型號商品圖。
僅供於調整單層賣場且同時新增商品時
partNo
第 1 層屬性的屬性商品料號。僅供於調整單層賣場且同時新增商品時
barcode
第 1 層屬性的實際國際條碼。僅供於調整單層賣場且同時新增商品時
stock
第 1 層屬性的備貨數量。僅供於調整單層賣場且同時新增商品時
attributes
第 1 層屬性的商品/屬性項目規格表。
僅供於調整單層賣場:
name
第 1 層屬性的屬性商品名稱。
僅供於調整單層賣場:{賣場名稱}-{第一層屬性顯示名稱}
price
加價購商品售價。若欲調整加價購時,則此欄位必填
shortTitle
贈品短標題。若欲調整無屬性贈品時,則此欄位必填
ProposalItem
Column Name
Note
id
第 2 層屬性的商品編號。若為新增商品時,此欄位不需填寫,反之需完整的填寫
id 與 spec
spec
第 2 層屬性的名稱與項目。由此欄位說明屬性的名稱與項目,此欄位必填
若欲調整贈品/加價購時,則此欄位 spec.name 由 API 自動產生
isVisible
第 2 層屬性是否顯示於前台賣場
images
第 2 層屬性的型號商品圖。
僅供於調整雙層賣場且同時新增商品時
partNo
第 2 層屬性的屬性商品料號。僅供於調整雙層賣場且同時新增商品時
barcode
第 2 層屬性的實際國際條碼。僅供於調整雙層賣場且同時新增商品時
stock
第 2 層屬性的備貨數量。僅供於調整雙層賣場且同時新增商品時
attributes
第 2 層屬性的商品/屬性項目規格表。
僅供於調整雙層賣場:
name
第 2 層屬性的屬性商品名稱。
僅供於調整雙層賣場:{賣場名稱}-{第一層屬性顯示名稱}-{第二層屬性顯示名稱}
shortTitle
贈品短標題。若欲調整有屬性贈品時,則此欄位必填
Output:
- HTTP Status: 201 (Created)
- Response body: json
- Object: UpdateListingModelProposal
Error
| Http Status Code | Error Code | Description |
|---|---|---|
| 400 | 40000011 | Invalid ISO-8601 format |
| 400 | 40000010 | Multiple bad parameters |
| 400 | 40000023 | Constraint violation validate error |
| 400 | 40009073 | Proposal model specification values must have only one value and pre-defined in structured data |
| 400 | 40009127 | Invalid listing ID |
| 400 | 40009147 | Invalid listing type |
| 400 | 40009148 | The listing does not allow to adjust the model |
| 400 | 40009149 | The product ID is invalid |
| 400 | 40009150 | The sku’s supplier ID is different from the listing’s |
| 400 | 40009151 | The sku’s cost is different from the listing’s |
| 400 | 40009152 | The sku’s ship type is different from the listing’s |
| 400 | 40009153 | The sku’s outright purchase status is different from the listing’s |
| 400 | 40009154 | The sku’s attribute spec name is different from the listing’s |
| 400 | 40009155 | The sku’s attribute item spec name is different from the listing’s |
| 400 | 40009156 | The sku’s sub station ID is different from the listing’s |
| 400 | 40009157 | The sku’s structure attribute cluster ID is different from the listing’s |
| 400 | 40009158 | The gift sku does not allow to be added to the listing model |
| 400 | 40009159 | Invalid product conditions |
| 400 | 40009160 | The sku hasn’t entered the warehouse |
| 400 | 40009161 | Invalid product conditions |
| 400 | 40009162 | Invalid sku abstract status |
| 400 | 40009163 | The listing with delivery type preOrder and customized could not be adjusted the model |
| 400 | 40009164 | The sku does not allow added in the normal delivery listing |
| 400 | 40009165 | The sku does not allow added in the appointment delivery listing |
| 400 | 40009166 | The sku does not allow added in the express delivery listing |
| 400 | 40009167 | Duplicate sku ID in listing |
| 400 | 40009168 | Mismatch product and listing attribute layer |
| 400 | 40009169 | The sku ID not in listing models |
| 400 | 40009170 | Duplicate spec value in listing models |
| 400 | 40009171 | Duplicate item spec value in listing models |
| 400 | 40009172 | Least contain one spec in listing models |
| 400 | 40009173 | Least contain one item spec in listing models |
| 400 | 40009174 | Mismatch proposal and listing attribute layer |
| 400 | 40009175 | Invalid model quantity |
| 400 | 40009176 | Invalid model’s item quantity |
| 400 | 40009177 | Duplicate sku ID in proposal |
| 400 | 40009178 | Invalid product conditions |
| 400 | 40009179 | Invalid product conditions |
| 400 | 40009180 | The model’s attribute spec name is different from the listing’s |
| 400 | 40009181 | The model’s attribute item spec name is different from the listing’s |
| 400 | 40009182 | The structure data attribute cluster ID inconsistent in listing |
| 400 | 40009183 | The structure data attribute cluster ID inconsistent in proposal |
| 400 | 40009185 | Must retain one visible model in a listing or item in a model |
| 400 | 40009192 | Unsupported ship type Express24HR for create product |
| 400 | 40009193 | Mismatch specification and attributes |
| 400 | 40009194 | Insufficient specification attribute |
| 400 | 40009201 | There are inconsistent spec name in the proposal |
| 400 | 40009202 | Duplicate SKU with the main product of the listing |
| 400 | 40009203 | The SKU not in listing complimentaries |
| 400 | 40009204 | Invalid gift cost |
| 400 | 40009205 | Invalid gift category |
| 400 | 40009206 | Cannot validate gift and additional purchase simultaneously |
| 400 | 40009207 | Invalid gift select minimum quantity |
| 400 | 40009208 | Invalid gift specification selected value length |
| 400 | 40009209 | Invalid listing attribute count |
| 400 | 40009210 | Invalid additional purchase cost |
| 400 | 40009211 | Invalid additional purchase price |
| 400 | 40009223 | Duplicate product name |
| 400 | 40009224 | Invalid proposal structure |
| 400 | 40009230 | The sku’s tax type is different from the listing’s |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 422 | 42209002 | Invalid state flow of proposal review status |
| 500 | 50000007 | Internal server error |
| 500 | 50000021 | Internal server error |
| 500 | 50000023 | Internal server error |
| 500 | 50000026 | Internal server error |
| 500 | 50000027 | Internal server error |
| 500 | 50000034 | Internal server error |
| 500 | 50009003 | Internal server error |
| 500 | 50009004 | Internal server error |
Example
正式提案
Case |
Url | Request | Response Status | Response | Final Response (Executed Proposal) |
|---|---|---|---|---|---|
一層屬性
|
/api/spa/v1/proposal/updateListingModels | Body | HTTP/1.1 201 | Response | Response 欄位差異:
|
兩層屬性
|
/api/spa/v1/proposal/updateListingModels | Body | HTTP/1.1 201 | Response | Response 欄位差異:
|
無屬性調整為一層屬性
|
/api/spa/v1/proposal/updateListingModels | Body | HTTP/1.1 201 | Response | Response 欄位差異:
|
僅修改賣場贈品/加價購內容
|
/api/spa/v1/proposal/updateListingModels | Body | HTTP/1.1 201 | Response | Response 欄位差異:
|
無論賣場屬性層級是否為有屬性賣場,皆不影響贈品是否有屬性
DryRun Mode
Case |
Url | Request | Response Status | Response |
|---|---|---|---|---|
| 一層屬性 | /api/spa/v1/proposal/updateListingModels?dryrun=true | skuCandidates 為必填 Body | HTTP/1.1 202 | Response |
| 兩層屬性 | /api/spa/v1/proposal/updateListingModels?dryrun=true | skuCandidates 為必填 Body | HTTP/1.1 202 | Response |
| 無屬性調整為一層屬性 | /api/spa/v1/proposal/updateListingModels?dryrun=true | skuCandidates 為必填 Body | HTTP/1.1 202 | Response |
| 贈品 | /api/spa/v1/proposal/updateListingModels?dryrun=true&isGift=true | skuCandidates 為必填 Body | HTTP/1.1 202 | Response |
| 加價購 | /api/spa/v1/proposal/updateListingModels?dryrun=true&isAdditionalPurchases=true | skuCandidates 為必填 Body | HTTP/1.1 202 | Response |
PUT v1/proposal/updateListingModels/{id} #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/updateListingModels
更新修改賣場屬性商品提案。
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | Int32 | Y | Proposal ID |
Payload:
ProposalModel
Column Name
Note
sku
第 1 層屬性的商品編號。若此型號已既存於賣場,需輸入此欄位,反之輸入
spec 說明新型號
spec
第 1 層屬性的名稱與項目。由此欄位說明屬性的名稱與項目,反之輸入
sku 說明欲調整的屬性名稱與項目。若同時輸入 sku 與 spec,將以提案輸入的 spec 更新成該 SKU 的屬性名稱與項目
若欲調整贈品/加價購時,則此欄位 spec.name 由 API 自動產生
items
第 2 層屬性。若欲調整的賣場結構為雙層屬性,此欄需填寫第 2 層屬性
isVisible
第 1 層屬性是否顯示於前台賣場
images
第 1 層屬性的型號商品圖。
僅供於調整單層賣場且同時新增商品時
partNo
第 1 層屬性的屬性商品料號。僅供於調整單層賣場且同時新增商品時
barcode
第 1 層屬性的實際國際條碼。僅供於調整單層賣場且同時新增商品時
stock
第 1 層屬性的備貨數量。僅供於調整單層賣場且同時新增商品時
attributes
第 1 層屬性的商品/屬性項目規格表。
僅供於調整單層賣場:
name
第 1 層屬性的屬性商品名稱。
僅供於調整單層賣場:{賣場名稱}-{第一層屬性顯示名稱}
price
加價購商品售價。若欲調整加價購時,則此欄位必填
shortTitle
贈品短標題。若欲調整無屬性贈品時,則此欄位必填
ProposalItem
Column Name
Note
id
第 2 層屬性的商品編號。若為新增商品時,此欄位不需填寫,反之需完整的填寫
id 與 spec
spec
第 2 層屬性的名稱與項目。由此欄位說明屬性的名稱與項目,此欄位必填
若欲調整贈品/加價購時,則此欄位 spec.name 由 API 自動產生
isVisible
第 2 層屬性是否顯示於前台賣場
images
第 2 層屬性的型號商品圖。
僅供於調整雙層賣場且同時新增商品時
partNo
第 2 層屬性的屬性商品料號。僅供於調整雙層賣場且同時新增商品時
barcode
第 2 層屬性的實際國際條碼。僅供於調整雙層賣場且同時新增商品時
stock
第 2 層屬性的備貨數量。僅供於調整雙層賣場且同時新增商品時
attributes
第 2 層屬性的商品/屬性項目規格表。
僅供於調整雙層賣場:
name
第 2 層屬性的屬性商品名稱。
僅供於調整雙層賣場:{賣場名稱}-{第一層屬性顯示名稱}-{第二層屬性顯示名稱}
shortTitle
贈品短標題。若欲調整有屬性贈品時,則此欄位必填
Output:
- HTTP Status: 200 (OK)
- Response body: json
- Object: UpdateListingModelProposal
Error
| Http Status Code | Error Code | Description |
|---|---|---|
| 400 | 40000011 | Invalid ISO-8601 format |
| 400 | 40000010 | Multiple bad parameters |
| 400 | 40000013 | The field is unchangeable |
| 400 | 40000023 | Constraint violation validate error |
| 400 | 40009073 | Proposal model specification values must have only one value and pre-defined in structured data |
| 400 | 40009104 | Cannot PUT the proposal which review status isn’t composing and draft |
| 400 | 40009127 | Invalid listing ID |
| 400 | 40009147 | Invalid listing type |
| 400 | 40009148 | The listing does not allow to adjust the model |
| 400 | 40009149 | The product ID is invalid |
| 400 | 40009150 | The sku’s supplier ID is different from the listing’s |
| 400 | 40009151 | The sku’s cost is different from the listing’s |
| 400 | 40009152 | The sku’s ship type is different from the listing’s |
| 400 | 40009153 | The sku’s outright purchase status is different from the listing’s |
| 400 | 40009154 | The sku’s attribute spec name is different from the listing’s |
| 400 | 40009155 | The sku’s attribute item spec name is different from the listing’s |
| 400 | 40009156 | The sku’s sub station ID is different from the listing’s |
| 400 | 40009157 | The sku’s structure attribute cluster ID is different from the listing’s |
| 400 | 40009158 | The gift sku does not allow to be added to the listing model |
| 400 | 40009159 | Invalid product conditions |
| 400 | 40009160 | The sku hasn’t entered the warehouse |
| 400 | 40009161 | Invalid product conditions |
| 400 | 40009162 | Invalid sku abstract status |
| 400 | 40009163 | The listing with delivery type preOrder and customized could not be adjusted the model |
| 400 | 40009164 | The sku does not allow added in the normal delivery listing |
| 400 | 40009165 | The sku does not allow added in the appointment delivery listing |
| 400 | 40009166 | The sku does not allow added in the express delivery listing |
| 400 | 40009167 | Duplicate sku ID in listing |
| 400 | 40009168 | Mismatch product and listing attribute layer |
| 400 | 40009169 | The sku ID not in listing models |
| 400 | 40009170 | Duplicate spec value in listing models |
| 400 | 40009171 | Duplicate item spec value in listing models |
| 400 | 40009172 | Least contain one spec in listing models |
| 400 | 40009173 | Least contain one item spec in listing models |
| 400 | 40009174 | Mismatch proposal and listing attribute layer |
| 400 | 40009175 | Invalid model quantity |
| 400 | 40009176 | Invalid model’s item quantity |
| 400 | 40009177 | Duplicate sku ID in proposal |
| 400 | 40009178 | Invalid product conditions |
| 400 | 40009179 | Invalid product conditions |
| 400 | 40009180 | The model’s attribute spec name is different from the listing’s |
| 400 | 40009181 | The model’s attribute item spec name is different from the listing’s |
| 400 | 40009182 | The structure data attribute cluster ID inconsistent in listing |
| 400 | 40009183 | The structure data attribute cluster ID inconsistent in proposal |
| 400 | 40009185 | Must retain one visible model in a listing or item in a model |
| 400 | 40009192 | Unsupported ship type Express24HR for create product |
| 400 | 40009193 | Mismatch specification and attributes |
| 400 | 40009194 | Insufficient specification attribute |
| 400 | 40009201 | There are inconsistent spec name in the proposal |
| 400 | 40009202 | Duplicate SKU with the main product of the listing |
| 400 | 40009203 | The SKU not in listing complimentaries |
| 400 | 40009204 | Invalid gift cost |
| 400 | 40009205 | Invalid gift category |
| 400 | 40009206 | Cannot validate gift and additional purchase simultaneously |
| 400 | 40009207 | Invalid gift select minimum quantity |
| 400 | 40009208 | Invalid gift specification selected value length |
| 400 | 40009209 | Invalid listing attribute count |
| 400 | 40009210 | Invalid additional purchase cost |
| 400 | 40009211 | Invalid additional purchase price |
| 400 | 40009223 | Duplicate product name |
| 400 | 40009224 | Invalid proposal structure |
| 400 | 40009230 | The sku’s tax type is different from the listing’s |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 422 | 42209002 | Invalid state flow of proposal review status |
| 429 | 42900001 | Reach the maximum number of modification times |
| 500 | 50000007 | Internal server error |
| 500 | 50000021 | Internal server error |
| 500 | 50000023 | Internal server error |
| 500 | 50000026 | Internal server error |
| 500 | 50000027 | Internal server error |
| 500 | 50000034 | Internal server error |
| 500 | 50009003 | Internal server error |
| 500 | 50009004 | Internal server error |
Example
Update Listing Proposal #
GET v1/proposal/updateListings/{id} #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/updateListings
Get an update listing proposal.
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | Int32 | Y | Proposal ID |
Output
- HTTP Status Code: 200 (OK)
- Object: UpdateListingProposal
Error
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400 | Invalid input | |
| 400 | 40000005 | Contains illegal character(s) |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 404 | 40409000 | Proposal not found |
| 500 | 50000007 | Internal server error |
| 500 | 50000027 | Internal server error |
| 500 | 50000029 | Internal server error |
Example
- Get a update listing proposal.
GET /api/spa/v1/proposal/updateListings/244077
HTTP/1.1 200 OK
{
"applicant": "applicant-name",
"contactWindow": "contact-windows-id",
"createdTs": "2019-12-23T10:27:41Z",
"creator": "creator-id",
"executeStatus": "idle",
"expiredTs": "2020-01-06T16:00:00Z",
"id": 244077,
"listing": {
"attributeDisplayMode": "table",
"attributes": [
{
"name": "品牌",
"values": [
"A3"
]
},
{
"name": "尺寸",
"values": [
"S",
"M",
"L"
]
},
{
"name": "透光度",
"values": [
"微透"
]
},
{
"name": "洗滌方式1",
"values": [
"一般1"
]
}
],
"brandId": "41166484",
"brandName": "2M2",
"featureTitle": "新的特色標題",
"id": 3378720,
"model": "新的商品型號",
"models": [
{
"sku": 6490415,
"spec": {
"name": "顏色",
"selectedValue": "白色系"
},
"items": [
{
"sku": 6490416,
"spec": {
"name": "尺寸",
"selectedValue": "M"
},
"name": "新的屬性商品名稱",
"partNo": "新的屬性商品料號"
},
{
"sku": 6490417,
"spec": {
"name": "尺寸",
"selectedValue": "L"
},
"name": "屬性商品名稱",
"partNo": "屬性商品料號"
}
],
"images": [
{
"height": 1000,
"order": 1,
"url": "https://img.yec.tw/bp/Files/fb1805887044f131efc68810cd42670f7923574c_1000x1000.jpg",
"width": 1000
},
{
"height": 400,
"order": 1,
"url": "https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg",
"width": 400
},
{
"height": 1000,
"order": 2,
"url": "https://img.yec.tw/bp/Files/fb1805887044f131efc68810cd42670f7923574c_1000x1000.jpg",
"width": 1000
}
],
"videos": [
{
"url": "https://img.yec.tw/bp/Files/8a1258ca99cef3d4955353d3503549b41e496fa9.qt",
"order": 1
}
]
}
],
"name": "新的賣場名稱",
"partNo": "新的主件商品料號",
"shareMediaBetweenModels": false,
"shortDescription": [
"新的商品特色",
"新的商品特色2"
],
"struDataAttrClusterId": "7925359",
"syncProductImages": true
},
"modifiedTimes": 1,
"modifiedTs": "2019-12-23T10:27:41Z",
"modifier": "modifier-id",
"note": "proposal-note",
"reviewStatus": "draft",
"subProposals": [
{
"id": 244078,
"type": "updateImageV2"
},
{
"id": 244079,
"type": "updateVideo"
},
{
"id": 244080,
"type": "updateCopy"
},
{
"id": 244081,
"type": "updateListingAttribute"
}
],
"subStationId": "sub-station-id",
"subStationName": "sub-station-name",
"supplierId": 99999
}
GET v1/proposal/updateListings #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/updateListings
Query update listing proposals.
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | String | N | Comma separated proposal ID. |
| subStationId | String | N | Comma separated sub station id listing, e.g. sub1,sub2. |
| reviewStatus | String | N | Comma separated review status, e.g. composing,draft.定義表 |
| executeStatus | String | N | Comma separated execute status, e.g. idle,finished.定義表 |
| sort | String | N | Sort condition: [+-][id, appliedTs, expiredTs, reviewedTs, executedTs, modifiedTs] Default: -id |
| offset | Int32 | N | Pagination offset. Default: 0Min: 0 |
| limit | Int32 | N | Pagination limit. Default: 15Min: 0Max: 30 |
Output
- HTTP Status Code: 200 (OK)
- Object: UpdateListingProposals
Error
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400 | Invalid input | |
| 400 | 40000005 | Contains illegal character(s) |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 500 | 50000006 | Internal server error |
| 500 | 50000007 | Internal server error |
| 500 | 50000027 | Internal server error |
| 500 | 50000029 | Internal server error |
Example
- Query update listing proposals.
GET /api/spa/v1/proposal/updateListings?id=244077,244078
HTTP/1.1 200 OK
{
"pagination": {
"resultsTotal": 2
},
"proposals": [
{
"applicant": "applicant-name",
"applicantRole": "supplier",
"contactWindow": "contact-windows-id",
"createdTs": "2019-12-23T10:27:41Z",
"creator": "creator-id",
"executeStatus": "idle",
"expiredTs": "2020-01-06T16:00:00Z",
"id": 244077,
"listing": {
"attributeDisplayMode": "table",
"attributes": [
{
"name": "品牌",
"values": [
"A3"
]
},
{
"name": "尺寸",
"values": [
"S",
"M",
"L"
]
},
{
"name": "透光度",
"values": [
"微透"
]
},
{
"name": "洗滌方式1",
"values": [
"一般1"
]
}
],
"brandId": "41166484",
"brandName": "2M2",
"featureTitle": "新的特色標題",
"id": 3378720,
"model": "新的商品型號",
"models": [
{
"sku": 6490415,
"spec": {
"name": "顏色",
"selectedValue": "白色系"
},
"items": [
{
"sku": 6490416,
"spec": {
"name": "尺寸",
"selectedValue": "M"
},
"name": "新的屬性商品名稱",
"partNo": "新的屬性商品料號"
},
{
"sku": 6490417,
"spec": {
"name": "尺寸",
"selectedValue": "L"
},
"name": "屬性商品名稱",
"partNo": "屬性商品料號"
}
],
"images": [
{
"height": 1000,
"order": 1,
"url": "https://img.yec.tw/bp/Files/fb1805887044f131efc68810cd42670f7923574c_1000x1000.jpg",
"width": 1000
},
{
"height": 400,
"order": 1,
"url": "https://img.yec.tw/bp/Files/683ad340890cb1757794c7f7691cb2d93d4319ee_1000x1000.jpg",
"width": 400
},
{
"height": 1000,
"order": 2,
"url": "https://img.yec.tw/bp/Files/fb1805887044f131efc68810cd42670f7923574c_1000x1000.jpg",
"width": 1000
}
],
"videos": [
{
"url": "https://img.yec.tw/bp/Files/8a1258ca99cef3d4955353d3503549b41e496fa9.qt",
"order": 1
}
]
}
],
"name": "新的賣場名稱",
"partNo": "新的主件商品料號",
"shareMediaBetweenModels": false,
"shortDescription": [
"新的商品特色",
"新的商品特色2"
],
"struDataAttrClusterId": "7925359",
"syncProductImages": true
},
"modifiedTimes": 1,
"modifiedTs": "2019-12-23T10:27:41Z",
"modifier": "modifier-id",
"note": "proposal-note",
"reviewStatus": "draft",
"subProposals": [
{
"id": 244079,
"type": "updateImageV2"
},
{
"id": 244080,
"type": "updateVideo"
},
{
"id": 244081,
"type": "updateCopy"
},
{
"id": 244082,
"type": "updateListingAttribute"
}
],
"subStationId": "sub1",
"subStationName": "sub-station-name",
"supplierId": 99999
},
{
"applicant": "applicant-name",
"applicantRole": "supplier",
"contactWindow": "contact-windows-id",
"createdTs": "2019-12-23T10:27:41Z",
"creator": "creator-id",
"executeStatus": "idle",
"expiredTs": "2020-01-06T16:00:00Z",
"id": 244078,
"listing": {
"brandId": "41166484",
"brandName": "2M2",
"copy": "<p>foo</p>",
"featureTitle": "新的特色標題",
"id": 3378721,
"model": "商品型號",
"models": [
{
"sku": 6490499,
"spec": {
"name": "顏色",
"selectedValue": "紅色"
},
"name": "新的屬性商品名稱",
"partNo": "新的屬性商品料號",
"videos": [
{
"url": "https://img.yec.tw/bp/Files/8a1258ca99cef3d4955353d3503549b41e496fa9.qt",
"order": 1
}
]
}
],
"name": "賣場名稱",
"partNo": "主件商品料號",
"shareMediaBetweenModels": true,
"shortDescription": [
"新的商品特色",
"新的商品特色2"
],
"syncProductImages": true,
"warranty": {
"description": "保固說明文字",
"handler": "official",
"period": "一個月",
"scope": "新品瑕疵",
"productStatus": "new"
}
},
"modifiedTimes": 1,
"modifiedTs": "2019-12-23T10:27:41Z",
"modifier": "modifier-id",
"note": "proposal-note",
"reviewStatus": "draft",
"subProposals": [
{
"id": 244080,
"type": "updateImageV2"
},
{
"id": 244081,
"type": "updateVideo"
},
{
"id": 244082,
"type": "updateCopy"
}
],
"subStationId": "sub",
"subStationName": "sub-station-name",
"supplierId": 99999
}
]
}
POST v1/proposal/updateListings #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/updateListings
建立一個修改賣場資訊的提案。透過指定 subProposals,可指定是否同時修改賣場圖片、影片、詳情和規格表。
Payload:
Output:
- HTTP Status: 201 (Created)
- Response body: json
- Object: UpdateListingProposal
Error
| Http Status Code | Error Code | Description |
|---|---|---|
| 400 | 40000023 | Constraint violation validate error |
| 400 | 40000018 | Unexpected empty field |
| 400 | 40000005 | Contains illegal character(s) |
| 400 | 40409000 | The sku ID not in listing models |
| 400 | 40009124 | Duplicated display name |
| 400 | 40009127 | Invalid listing ID |
| 400 | 40009143 | Product name for warehouse entry must be less than 50 words |
| 400 | 40009174 | Mismatch proposal and listing attribute layer |
| 400 | 40009177 | Duplicate sku ID in proposal |
| 400 | 40009189 | Duplicate ID in sub proposals |
| 400 | 40009190 | Duplicate type in sub proposals |
| 400 | 40009191 | Invalid sub proposal ID |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 422 | 42209002 | Invalid state flow of proposal review status |
| 422 | 42209003 | Invalid listing layer |
| 500 | 50000007 | Internal server error |
| 500 | 50000021 | Internal server error |
| 500 | 50000027 | Internal server error |
| 500 | 50000029 | Internal server error |
| 500 | 50000030 | Internal server error |
Example
Case |
Url | Request | Response Status | Response |
|---|---|---|---|---|
無屬性
|
/api/spa/v1/proposal/updateListings | Body | HTTP/1.1 201 | Response |
單層屬性
|
/api/spa/v1/proposal/updateListings | Body | HTTP/1.1 201 | Response |
雙層屬性
|
/api/spa/v1/proposal/updateListings | Body | HTTP/1.1 201 | Response |
PUT v1/proposal/updateListings/{id} #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/updateListings
更新修改賣場資訊提案。
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | Int32 | Y | Proposal ID |
Payload:
Output:
- HTTP Status: 200 (OK)
- Response body: json
- Object: UpdateListingProposal
Error
| Http Status Code | Error Code | Description |
|---|---|---|
| 400 | 40000023 | Constraint violation validate error |
| 400 | 40000018 | Unexpected empty field |
| 400 | 40000005 | Contains illegal character(s) |
| 400 | 40409000 | The sku ID not in listing models |
| 400 | 40009104 | Cannot PUT the proposal which review status isn’t composing and draft |
| 400 | 40009124 | Duplicated display name |
| 400 | 40009127 | Invalid listing ID |
| 400 | 40009143 | Product name for warehouse entry must be less than 50 words |
| 400 | 40009174 | Mismatch proposal and listing attribute layer |
| 400 | 40009177 | Duplicate sku ID in proposal |
| 400 | 40009189 | Duplicate ID in sub proposals |
| 400 | 40009190 | Duplicate type in sub proposals |
| 400 | 40009191 | Invalid sub proposal ID |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 422 | 42209002 | Invalid state flow of proposal review status |
| 422 | 42209003 | Invalid listing layer |
| 500 | 50000007 | Internal server error |
| 500 | 50000021 | Internal server error |
| 500 | 50000027 | Internal server error |
| 500 | 50000029 | Internal server error |
| 500 | 50000030 | Internal server error |
Example
Batch Proposal #
GET v1/proposal/batch/{id} #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/batch
Get a batch proposal.
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | Int32 | Y | Batch proposal ID |
| fields | String | N | Additional fields
|
Output
- HTTP Status Code: 200 (OK)
- Object: BatchProposal
Error
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400 | Invalid input | |
| 400 | 40000005 | Contains illegal character(s) |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 404 | 40409000 | Proposal not found |
| 500 | 50000044 | Internal server error |
| 500 | 50009005 | Internal server error |
Example
- Get a batch proposal.
取得提案單號為 1 的提案單,並且取得提案單的額外欄位 details
GET /api/spa/v1/proposal/batch/1?fields=+details
HTTP/1.1 200 OK
{
"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"
}
取得批次單號為 1 的提案單
GET /api/spa/v1/proposal/batch/1
HTTP/1.1 200 OK
{
"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"
}
GET v1/proposal/batch #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/batch
Query batch proposals.
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | String | N | Comma separated batch proposal ID. |
| batchSource | String | N | 批次提案來源,詳見 定義表。 Options:
|
| listingId | String | N | Comma separated listing ID. |
| executeStatus | String | N | Comma separated execute status, e.g. idle,finished.定義表 |
| executeTs | String | N | 執行時間區間 為 ISO-8601 時間間隔格式,以 / 分隔開始時間和結束時間e.g. 2024-10-01T00:00:00Z/2024-10-31T00:00:00Z |
| revertStatus | String | N | Comma separated revert status, e.g. idle,finished.定義表 |
| revertTs | String | N | 回檔時間區間 為 ISO-8601 時間間隔格式,以 / 分隔開始時間和結束時間e.g. 2024-10-01T00:00:00Z/2024-10-31T00:00:00Z |
| sort | String | N | Sort condition: [+-][id, executeTs, revertTs, createdTs, modifiedTs] Default: -id |
| fields | String | N | Additional fields
|
| offset | Int32 | N | Pagination offset. Default: 0Min: 0 |
| limit | Int32 | N | Pagination limit. Default: 15Min: 0Max: 30 |
Output
- HTTP Status Code: 200 (OK)
- Object: BatchProposals
Error
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400 | Invalid input | |
| 400 | 40000005 | Contains illegal character(s) |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 400 | 40000030 | Invalid period |
| 500 | 50000044 | Internal server error |
| 500 | 50009005 | Internal server error |
Example
- Query batch proposals.
GET /api/spa/v1/proposal/batch?id=1,2&fields=+details
HTTP/1.1 200 OK
{
"proposals": [
{
"id": 2,
"supplierId": 99999,
"proposalType": "updateImageV2",
"batchSource": "excel",
"details": [
{
"listingId": 32345,
"executeProposalId": 1005
},
{
"listingId": 42345,
"executeProposalId": 1006
}
],
"executeTs": "2024-04-10T02:00:00Z",
"executeStatus": "idle",
"revertTs": "2024-04-10T05:00:00Z",
"revertStatus": "idle",
"creator": "creator-id",
"createdTs": "2024-04-09T10:05:00Z",
"modifier": "modifier-id",
"modifiedTs": "2024-04-09T10:15:00Z"
},
{
"id": 1,
"supplierId": 99999,
"proposalType": "updateImageV2",
"batchSource": "excel",
"details": [
{
"listingId": 12345,
"executeProposalId": 1001,
"revertProposalId": 1002
},
{
"listingId": 22345,
"executeProposalId": 103041003,
"revertProposalId": 103041004
}
],
"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"
}
],
"pagination": {
"resultsTotal": 2
}
}
POST v1/proposal/batch #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/batch
Create a batch proposal.
Payload: BatchProposal
Output:
- HTTP Status: 201 (Created)
- Response body: json
- Object: BatchProposal
Error
| Http Status Code | Error Code | Description |
|---|---|---|
| 400 | 40000011 | Invalid ISO-8601 format |
| 400 | 40000010 | Multiple bad parameters |
| 400 | 40000023 | Constraint violation validate error |
| 400 | 40009214 | Batch proposal revert time must appear in pairs with execute time |
| 400 | 40009215 | Batch proposal revert time should be at least 15 minutes after execute time |
| 400 | 40009216 | Batch proposal execute time must within +2 hours and +30 days |
| 400 | 40009217 | Batch proposal revert time must within +3 hours and +60 days |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 500 | 50000044 | Internal server error |
| 500 | 50009005 | Internal server error |
Example
Create an appointment batch proposal
POST /api/spa/v1/proposal/batch
{
"proposalType": "updateImageV2",
"batchSource": "excel",
"instantExecute": false,
"executeTs": "2024-04-10T02:00:00Z",
"revertTs": "2024-04-10T05:00:00Z"
}
HTTP/1.1 201
{
"id": 1,
"supplierId": 99999,
"proposalType": "updateImageV2",
"batchSource": "excel",
"instantExecute": false,
"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:00:00Z"
}
Create an instant batch proposal
POST /api/spa/v1/proposal/batch
{
"proposalType": "updateImageV2",
"batchSource": "api",
"instantExecute": true
}
HTTP/1.1 201
{
"id": 1,
"supplierId": 99999,
"proposalType": "updateImageV2",
"batchSource": "excel",
"instantExecute": true,
"executeTs": "2024-04-10T02:00:00Z",
"executeStatus": "finished",
"creator": "creator-id",
"createdTs": "2024-04-09T10:00:00Z",
"modifier": "modifier-id",
"modifiedTs": "2024-04-09T10:00:00Z"
}
Create an instant batch proposal and book a revert time
POST /api/spa/v1/proposal/batch
{
"proposalType": "updateImageV2",
"batchSource": "api",
"instantExecute": true,
"revertTs": "2024-11-20T02:00:00Z"
}
HTTP/1.1 201
{
"id": 1,
"supplierId": 99999,
"proposalType": "updateImageV2",
"batchSource": "excel",
"instantExecute": true,
"executeTs": "2024-11-10T02:00:03Z",
"executeStatus": "finished",
"revertTs": "2024-11-20T02:00:00Z",
"revertStatus": "idle",
"creator": "creator-id",
"createdTs": "2024-11-10T02:00:00Z",
"modifier": "modifier-id",
"modifiedTs": "2024-11-10T02:00:00Z"
}
PATCH v1/proposal/batch/{id} #
https://tw.supplier.yahoo.com/api/spa/v1/proposal/batch
Supports updating the batch proposal fieldsexecuteTs,executeStatus,revertTs,revertStatusanddetails.
The status forexecuteStatusandrevertStatusis limited tocanceled. WhenexecuteStatusis updated tocanceled,revertStatuswill automatically be updated tocanceledas well.
executeTs,executeStatus,revertTsandrevertStatuscan be updated only when the status isidle.
Parameters
| Parameter Name | Type | Required | Note |
|---|---|---|---|
| id | Int32 | Y | Batch proposal ID |
Payload: BatchProposal
Output:
- HTTP Status: 200 (OK)
- Response body: json
- Object: BatchProposal
Error
| Http Status Code | Error Code | Description |
|---|---|---|
| 400 | 40000011 | Invalid ISO-8601 format |
| 400 | 40000010 | Multiple bad parameters |
| 400 | 40000023 | Constraint violation validate error |
| 400 | 40009214 | Batch proposal revert time must appear in pairs with execute time |
| 400 | 40009215 | Batch proposal revert time should be at least 15 minutes after execute time |
| 400 | 40009216 | Batch proposal execute time must within +2 hours and +30 days |
| 400 | 40009217 | Batch proposal revert time must within +3 hours and +60 days |
| 400 | 40009218 | Mismatch batch proposal execute status and execute time |
| 400 | 40009219 | Mismatch batch proposal revert status and revert time |
| 400 | 40009220 | Invalid state flow of batch proposal status |
| 400 | 40009221 | Duplicated proposal ID |
| 400 | 40009222 | Duplicated listing ID |
| 400 | 40009228 | Invalid proposal ID |
| 401 | 40100001 | Missing or bad authentication |
| 401 | 40100002 | Invalid cookie |
| 401 | 40100003 | Missing or bad authentication |
| 401 | 40100004 | Check wssid failed |
| 401 | 40100006 | Cookie has expired |
| 403 | 40304001 | No permission |
| 404 | 40409000 | Proposal not found |
| 404 | 42209004 | Supports PATCH canceled batch proposal execute / revert status only currently |
| 500 | 50000044 | Internal server error |
| 500 | 50009005 | Internal server error |
Example
- Update a batch proposal.
Patch batch proposal details
PATCH /api/spa/v1/proposal/batch/1
{
"details": [
{
"listingId": 12345,
"executeProposalId": 1001,
"revertProposalId": 1002
},
{
"listingId": 22345,
"executeProposalId": 1003,
"revertProposalId": 1004
}
],
"modifier": "modifier-id"
}
HTTP/1.1 200
{
"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"
}
Patch batch proposal revertTs
PATCH /api/spa/v1/proposal/batch/1
{
"revertTs": "2024-04-10T10:00:00Z",
"modifier": "modifier-id"
}
HTTP/1.1 200
{
"id": 1,
"supplierId": 99999,
"proposalType": "updateImageV2",
"batchSource": "excel",
"details": [
{
"listingId": 12345,
"executeProposalId": 103041001,
"revertProposalId": 103041002
},
{
"listingId": 22345,
"executeProposalId": 103041003,
"revertProposalId": 103041004
}
],
"executeTs": "2024-04-10T02:00:00Z",
"executeStatus": "idle",
"revertTs": "2024-04-10T10:00:00Z",
"revertStatus": "idle",
"creator": "creator-id",
"createdTs": "2024-04-09T10:00:00Z",
"modifier": "modifier-id",
"modifiedTs": "2024-04-09T10:10:00Z"
}
Patch batch proposal executeStatus
PATCH /api/spa/v1/proposal/batch/1
{
"executeStatus": "canceled",
"modifier": "modifier-id"
}
HTTP/1.1 200
{
"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": "canceled",
"revertTs": "2024-04-10T10:00:00Z",
"revertStatus": "canceled",
"creator": "creator-id",
"createdTs": "2024-04-09T10:00:00Z",
"modifier": "modifier-id",
"modifiedTs": "2024-04-09T10:20:00Z"
}