API Endpoints #
Category #
GET v1/categories #
https://tw.supplier.yahoo.com/api/spa/v1/categories
Query categories
Parameters
Parameter Name | Type | Required [註1] | Note |
---|---|---|---|
categoryId | String | Y | Comma-separated category ID list
Max 50 category ID |
isGift | Boolean | N | isGift field filter
|
fields | String | N |
|
Output
- HTTP Status Code: 200 (OK)
- Object: Categories
Error
HTTP Status Code | Error Code | Description |
---|---|---|
400 | Invalid input | |
400 | 40000005 | Contains illegal character(s) |
400 | 40001000 | All category ids provided must be at the same level |
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 | 40301000 | Login user has no permission to access this category |
403 | 40304001 | No permission |
500 | 50000006 | Internal server error |
500 | 50000020 | Internal server error |
500 | 50000023 | Internal server error |
Example
Case | Request | Response Status | Response |
---|---|---|---|
查詢子站,及其對稱之「區」與「父類」 | GET /api/spa/v1/categories?categoryId=sub28&fields=children,parents | HTTP/1.1 200 | Response |
GET v1/proposedCategories #
https://tw.supplier.yahoo.com/api/spa/v1/proposedCategories
Query recently used categories
The response will not include Cluster naming contains贈品
, unless the proposal type isnewProduct
and its Category naming contains贈品
Parameters
Parameter Name | Type | Required [註1] |
Note |
---|---|---|---|
proposalType | String | N | Proposal type
|
subId | String | N | SubStation ID which prefixed with its level, e.g. sub5566 |
Output
- HTTP Status Code: 200 (OK)
- Object: ProposedCategories
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 | 50000020 | Internal server error |
500 | 50000022 | Internal server error |
500 | 50000023 | Internal server error |
500 | 50000024 | Internal server error |
500 | 50000025 | Internal server error |
500 | 50000026 | Internal server error |
Example
Case | Request | Response Status | Response |
---|---|---|---|
查詢提案近期使用之分類 | GET /api/spa/v1/proposedCategories | HTTP/1.1 200 | Response |
Structured Data #
GET v1/struDataAttrClusters #
https://tw.supplier.yahoo.com/api/spa/v1/struDataAttrClusters
Query structured data attribute clusters. Could be query by the cluster ID or category ID. The cluster be named like 贈品
won’t be returned if the query is by categoryId and the proposalType is newListing.
Parameters
Parameter Name | Type | Required [註1] | Note |
---|---|---|---|
id | String | ? | Structured data attributes cluster ID |
proposalType | String | ? | Proposal type
|
categoryId | String | ? | Category ID which prefixed with its level, allow level catItem only, e.g. catItem5566 Must be a pair parameter of proposalType. |
Output
- HTTP Status Code: 200 (OK)
- Object: StruDataAttrClusters
Error
HTTP Status Code | Error Code | Description |
---|---|---|
400 | Invalid input | |
400 | 40000005 | Contains illegal character(s) |
400 | 40000009 | Mismatch proposal type |
400 | 40000017 | Must have at least one field not empty |
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 | 50000020 | Internal server error |
500 | 50000022 | Internal server error |
500 | 50000023 | Internal server error |
Example
Case | Request | Response Status | Response |
---|---|---|---|
以子站與提案類型查詢規格表屬性 | GET /api/spa/v1/struDataAttrClusters?categoryId=catItem5566&proposalType=newListing | HTTP/1.1 200 | Response |