Brand Endpoints

API Endpoints #

品牌名稱關鍵字搜尋 #

Endpoint URL: https://tw.supplier.yahoo.com/api/spa/v1/brands
HTTP Method: GET

The search is case-insensitive.

Request Parameters #

Parameters
Parameter Name
Type
Required [註1]
Note
keyword String N Default returns full brand list, and if input the keyword then return the keyword search brand result.
Note: space-separated brand name keywords.

Response Elements #

Output

  • HTTP Status Code: 200 (OK)
  • Object: Brands

Errors #

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 50000045 Internal server error

Examples #

品牌名稱關鍵字搜尋

查詢品牌名稱包含 yahoo雅虎 的品牌。

GET /api/spa/v1/brands?keyword=yahoo 雅虎 HTTP/1.1
HOST: tw.supplier.yahoo.com
Content-Type: application/json; charset=UTF-8

查詢結果為 case-insensitive。

{
  "brands": [
    {
      "id": "12345",
      "name": "Yahoo!"
    },
    {
      "id": "23456",
      "name": "雅虎yahoo"
    },
    {
      "id": "34567",
      "name": "測試YAHOO品牌"
    },
    {
      "id": "45678",
      "name": "測試雅虎"
    }
  ]
}
查詢所有品牌列表

不填寫參數 keyword 將查詢所有品牌列表。

GET /api/spa/v1/brands HTTP/1.1
HOST: tw.supplier.yahoo.com
Content-Type: application/json; charset=UTF-8
{
  "brands": [
    {
      "id": "12345",
      "name": "Yahoo!"
    },
    {
      "id": "23456",
      "name": "雅虎yahoo"
    },
    {
      "id": "34567",
      "name": "測試YAHOO品牌"
    },
    {
      "id": "45678",
      "name": "測試雅虎"
    },
    {
      "id": "56789",
      "name": "品牌1"
    },
    {
      "id": "67890",
      "name": "品牌2"
    },
    {
      "id": "78901",
      "name": "其他品牌"
    }
  ]
}