Listing

API Endpoints #

Listing #

GET v1/listings/{id} #

https://tw.supplier.yahoo.com/api/spa/v1/listings/{id}

Get the log-in supplier owned listing.
Parameters
Parameter Name Type Required Note
id Int32 Y Listing ID
fields String N Comma-separated filter out fields [-copy|-images|-videos|-complimentaries|-selectComplimentaries|-additionalPurchases|-productStructuredDataList]
  • If -copy is provided, the field copy and warranty in listing will not be returned.
  • If -images is provided, the field images in listing, listing.models[], additionalPurchases, complimentaries and selectComplimentaries will not be returned.
  • If -videos is provided, the field videos in listing and listing.models[] will not be returned.
  • If -productStructuredDataList is provided, the field productStructuredDataList in listing will not be returned.
  • If -complimentaries is provided, the field complimentaries and complimentaryGroups in listing will not be returned.
  • If -selectComplimentaries is provided, the field selectComplimentaries, selectComplimentaryGroups and selectComplimentaryMinQty in listing will not be returned.
Default: -copy,-images,-videos,-complimentaries,-selectComplimentaries,-additionalPurchases,-productStructuredDataList

Output

  • HTTP Status Code: 200 (OK)
  • Object: Listing
Error
HTTP Status Code Error Code Description
400 Invalid input
400 40000005 Contains illegal character(s)
400 40009212 Invalid product warranty productStatus
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 40411000 Listing not found
410 41011000 The listing no longer exists
500 50000006 Internal server error
500 50000007 Internal server error
500 50000023 Internal server error
500 50000026 Internal server error
500 50000035 Internal server error
500 50000039 Internal server error
Example
Case Request Response Status Response
無屬性賣場
  • 贈品
  • 加價購
GET /api/spa/v1/listing/3379025?fields= HTTP/1.1 200 Response
單層屬性賣場
  • 贈品
  • 贈品有群組
GET /api/spa/v1/listing/3382982?fields=-copy,-additionalPurchases,-productStructuredDataList HTTP/1.1 200 Response
雙層屬性賣場 GET /api/spa/v1/listing/3369796?fields=-copy,-complimentaries,-selectComplimentaries,-additionalPurchases HTTP/1.1 200 Response

GET v1/listings #

https://tw.supplier.yahoo.com/api/spa/v1/listings

Query listings owned by the log-in supplier.
Parameters
Parameter Name Type Required Note
id String ? Comma-separated listing ID
subStationId String ? SubStation ID
name String ? Listing name, all the listings with the name contains the input value will be returned
offset Int32 N Pagination offset.
Default: 0
limit Int32 N Pagination limit.
Default: 20
Max: 50
fields String N Comma-separated filter out fields [-copy|-images|-videos|-complimentaries|-selectComplimentaries|-additionalPurchases|-productStructuredDataList]
  • If -copy is provided, the field copy and warranty in listing will not be returned.
  • If -images is provided, the field images in listing, listing.models[], additionalPurchases, complimentaries and selectComplimentaries will not be returned.
  • If -videos is provided, the field videos in listing and listing.models[] will not be returned.
  • If -productStructuredDataList is provided, the field productStructuredDataList in listing will not be returned.
  • If -complimentaries is provided, the field complimentaries and complimentaryGroups in listing will not be returned.
  • If -selectComplimentaries is provided, the field selectComplimentaries, selectComplimentaryGroups and selectComplimentaryMinQty in listing will not be returned.
Default: -copy,-images,-videos,-complimentaries,-selectComplimentaries,-additionalPurchases,-productStructuredDataList

One of id, subStationId, and name must be provided.

Output

  • HTTP Status Code: 200 (OK)
  • Object: Listings
Error
HTTP Status Code Error Code Description
400 Invalid input
400 40000005 Contains illegal character(s)
400 40009212 Invalid product warranty productStatus
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 50000023 Internal server error
500 50000026 Internal server error
500 50000035 Internal server error
500 50000039 Internal server error

Example

  • Query listings owned by the log-in supplier
GET /api/spa/v1/listings?id=3380038,3379231&subStationId=sub10&name=測試賣場&offset=0&limit=20&sort=+id&fields=-complimentaries,-selectComplimentaries,-additionalPurchases

HTTP/1.1 200 OK

{
  "listings": [
    {
      "availableCount": 2,
      "brandId": "41166484",
      "brandName": "2M2",
      "catItemId": "catItem15710",
      "copy": "<p>測試賣場提案備註</p>",
      "id": 3379231,
      "status": "normal",
      "allowedDiscounts": ["redeem", "welfare", "reward", "coupon"],
      "models": [
        {
          "images": [
            {
              "height": 1000,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/1DEFC8D131-SP-247261.jpg",
              "width": 1000
            },
            {
              "height": 400,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/2CE1B98D0A-SP-247261.jpg",
              "width": 400
            },
            {
              "height": 250,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/F2E9B11F4B-SP-247261.jpg",
              "width": 250
            },
            {
              "height": 135,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/BCB2F1CE8D-SP-247261.jpg",
              "width": 135
            },
            {
              "height": 80,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/88DECE09AD-SP-247261.jpg",
              "width": 80
            },
            {
              "height": 1000,
              "order": 2,
              "url": "https://s.yimg.com/zo/MerchandiseImages/0985562A21-SP-247261.jpg",
              "width": 1000
            },
            {
              "height": 400,
              "order": 2,
              "url": "https://s.yimg.com/zo/MerchandiseImages/0D74056666-SP-247261.jpg",
              "width": 400
            },
            {
              "height": 400,
              "order": 3,
              "url": "https://s.yimg.com/zo/MerchandiseImages/C193B3F143-SP-247261.jpg",
              "width": 400
            }
          ],
          "items": [
            {
              "availableCount": 1,
              "cost": "50.00",
              "name": "測試賣場-圖片雙層(請勿購買)-A-白色系",
              "sku": 6541596,
              "spec": {
                "name": "顏色",
                "selectedValue": "白色系"
              },
              "isVisible": true,
              "actualBarcode": "9786809387450",
              "stock": 10
            }
          ],
          "name": "測試賣場-圖片雙層(請勿購買)-A",
          "sku": 6541599,
          "spec": {
            "name": "商品品牌",
            "selectedValue": "A"
          },
          "isVisible": true
        },
        {
          "images": [
            {
              "height": 1000,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/C010CB7890-SP-247261.jpg",
              "width": 1000
            },
            {
              "height": 400,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/2468C2D492-SP-247261.jpg",
              "width": 400
            },
            {
              "height": 250,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/D1B93D1C27-SP-247261.jpg",
              "width": 250
            },
            {
              "height": 135,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/51780464CE-SP-247261.jpg",
              "width": 135
            },
            {
              "height": 80,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/95B0D42FD6-SP-247261.jpg",
              "width": 80
            },
            {
              "height": 1000,
              "order": 2,
              "url": "https://s.yimg.com/zo/MerchandiseImages/1DEFC8D131-SP-247261.jpg",
              "width": 1000
            },
            {
              "height": 400,
              "order": 2,
              "url": "https://s.yimg.com/zo/MerchandiseImages/2CE1B98D0A-SP-247261.jpg",
              "width": 400
            }
          ],
          "items": [
            {
              "availableCount": 1,
              "cost": "50.00",
              "name": "測試賣場-圖片雙層(請勿購買)-AE-白色系",
              "sku": 6541597,
              "spec": {
                "name": "顏色",
                "selectedValue": "白色系"
              },
              "isVisible": true,
              "actualBarcode": "9786809387450",
              "stock": 10
            }
          ],
          "name": "測試賣場-圖片雙層(請勿購買)-AE",
          "sku": 6541600,
          "spec": {
            "name": "商品品牌",
            "selectedValue": "AE"
          },
          "isVisible": true
        }
      ],
      "name": "測試賣場-圖片雙層(請勿購買)",
      "price": "90.00",
      "shareMediaBetweenModels": false,
      "sku": 6541598,
      "subStationId": "sub10",
      "subStationName": "流行女裝",
      "supplierId": 99999,
      "type": "general",
      "warranty": {
        "description": "保固說明文字",
        "handler": "official",
        "period": "一個月",
        "scope": "新品瑕疵",
        "productStatus": "new"
      },
      "skuDetail": {
        "shipType": {
          "id": 1,
          "name": "Home"
        },
        "name": "測試賣場-圖片雙層(請勿購買)"
      },
      "model": "型號",
      "featureTitle": "特色標題",
      "shortDescription": [
        "商品特色"
      ],
      "seoUrl": "測試賣場",
      "endTs": "2030-12-26T14:03:00Z",
      "startTs": "2019-12-27T14:03:00Z",
      "purchaseQtyLimit": 12,
      "cvsPurchaseQtyLimit": 1,
      "isThresholdFreebie": false,
      "contentRating": "None",
      "deliveryType": "normal",
      "marketPrice": "100.00"
    },
    {
      "availableCount": 0,
      "catItemId": "catItem15710",
      "copy": "<p>測試賣場提案備註PrpslUpdateVideoBackground0001</p>",
      "cost": "50.00",
      "id": 3380038,
      "status": "normal",
      "allowedDiscounts": ["reward", "coupon"],
      "images": [
        {
          "height": 1000,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/F5CEF719B5-SP-251080.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/A629DEF40E-SP-251080.jpg",
          "width": 400
        },
        {
          "height": 250,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/85C4CF5422-SP-251080.jpg",
          "width": 250
        },
        {
          "height": 135,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/CCE19453E6-SP-251080.jpg",
          "width": 135
        },
        {
          "height": 80,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/6A649F3B4C-SP-251080.jpg",
          "width": 80
        },
        {
          "height": 1000,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/1DEFC8D131-SP-251080.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/2CE1B98D0A-SP-251080.jpg",
          "width": 400
        }
      ],
      "name": "測試賣場-影片(請勿購買)",
      "price": "90.00",
      "shareMediaBetweenModels": false,
      "sku": 6543801,
      "subStationId": "sub10",
      "subStationName": "流行女裝",
      "supplierId": 99999,
      "type": "general",
      "videos": [
        {
          "duration": 15000,
          "order": 1,
          "thumbnail": {
            "url": "https://edgecast-vod.yahoo.net/aws-oath-nevec-aws-int/destination/afc60c874f424ab4830f90f069a932b6/afc60c874f424ab4830f90f069a932b6_thumbnails_720p.0000000.jpg"
          },
          "url": "https://edgecast-vod.yahoo.net/aws-oath-nevec-aws-int/destination/afc60c874f424ab4830f90f069a932b6/afc60c874f424ab4830f90f069a932b6_720p.mp4"
        }
      ],
      "warranty": {
        "description": "保固說明文字",
        "handler": "official",
        "period": "一個月",
        "scope": "新品瑕疵",
        "productStatus": "new"
      },
      "skuDetail": {
        "shipType": {
          "id": 61,
          "name": "Express24HR"
        },
        "struDataAttrClusterId": "000003414671",
        "name": "測試賣場-影片(請勿購買)"
      },
      "model": "型號",
      "featureTitle": "特色標題",
      "shortDescription": [
        "商品特色"
      ],
      "seoUrl": "測試賣場",
      "endTs": "2030-12-26T14:03:00Z",
      "startTs": "2019-12-27T14:03:00Z",
      "purchaseQtyLimit": 12,
      "cvsPurchaseQtyLimit": 1,
      "isThresholdFreebie": false,
      "contentRating": "None",
      "actualBarcode": "9786809387450",
      "stock": 10,
      "deliveryType": "normal",
      "marketPrice": "100.00"
    }
  ],
  "pagination": {
    "resultsTotal": 2
  }
}

POST v1/listings #

https://tw.supplier.yahoo.com/api/spa/v1/listings

Query listings owned by the log-in supplier.

Payload: QueryListingsParameter

Output

Error
HTTP Status Code Error Code Description
400 Invalid input
400 40000005 Contains illegal character(s)
400 40009212 Invalid product warranty productStatus
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 50000023 Internal server error
500 50000026 Internal server error
500 50000035 Internal server error
500 50000039 Internal server error

Example

  • Query listings owned by the log-in supplier
{
  "id": [
    3379231,
    3380038
  ],
  "fields": []
}

HTTP/1.1 200 OK

{
  "listings": [
    {
      "availableCount": 2,
      "brandId": "41166484",
      "brandName": "2M2",
      "catItemId": "catItem15710",
      "copy": "<p>測試賣場提案備註</p>",
      "id": 3379231,
      "status": "normal",
      "allowedDiscounts": ["redeem", "welfare", "reward", "coupon"],
      "models": [
        {
          "images": [
            {
              "height": 1000,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/1DEFC8D131-SP-247261.jpg",
              "width": 1000
            },
            {
              "height": 400,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/2CE1B98D0A-SP-247261.jpg",
              "width": 400
            },
            {
              "height": 250,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/F2E9B11F4B-SP-247261.jpg",
              "width": 250
            },
            {
              "height": 135,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/BCB2F1CE8D-SP-247261.jpg",
              "width": 135
            },
            {
              "height": 80,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/88DECE09AD-SP-247261.jpg",
              "width": 80
            },
            {
              "height": 1000,
              "order": 2,
              "url": "https://s.yimg.com/zo/MerchandiseImages/0985562A21-SP-247261.jpg",
              "width": 1000
            },
            {
              "height": 400,
              "order": 2,
              "url": "https://s.yimg.com/zo/MerchandiseImages/0D74056666-SP-247261.jpg",
              "width": 400
            },
            {
              "height": 400,
              "order": 3,
              "url": "https://s.yimg.com/zo/MerchandiseImages/C193B3F143-SP-247261.jpg",
              "width": 400
            }
          ],
          "items": [
            {
              "availableCount": 1,
              "cost": "50.00",
              "name": "測試賣場-圖片雙層(請勿購買)-A-白色系",
              "sku": 6541596,
              "spec": {
                "name": "顏色",
                "selectedValue": "白色系"
              },
              "isVisible": true,
              "actualBarcode": "9786809387450",
              "stock": 10
            }
          ],
          "name": "測試賣場-圖片雙層(請勿購買)-A",
          "sku": 6541599,
          "spec": {
            "name": "商品品牌",
            "selectedValue": "A"
          },
          "isVisible": true
        },
        {
          "images": [
            {
              "height": 1000,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/C010CB7890-SP-247261.jpg",
              "width": 1000
            },
            {
              "height": 400,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/2468C2D492-SP-247261.jpg",
              "width": 400
            },
            {
              "height": 250,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/D1B93D1C27-SP-247261.jpg",
              "width": 250
            },
            {
              "height": 135,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/51780464CE-SP-247261.jpg",
              "width": 135
            },
            {
              "height": 80,
              "order": 1,
              "url": "https://s.yimg.com/zo/MerchandiseImages/95B0D42FD6-SP-247261.jpg",
              "width": 80
            },
            {
              "height": 1000,
              "order": 2,
              "url": "https://s.yimg.com/zo/MerchandiseImages/1DEFC8D131-SP-247261.jpg",
              "width": 1000
            },
            {
              "height": 400,
              "order": 2,
              "url": "https://s.yimg.com/zo/MerchandiseImages/2CE1B98D0A-SP-247261.jpg",
              "width": 400
            }
          ],
          "items": [
            {
              "availableCount": 1,
              "cost": "50.00",
              "name": "測試賣場-圖片雙層(請勿購買)-AE-白色系",
              "sku": 6541597,
              "spec": {
                "name": "顏色",
                "selectedValue": "白色系"
              },
              "isVisible": true,
              "actualBarcode": "9786809387450",
              "stock": 10
            }
          ],
          "name": "測試賣場-圖片雙層(請勿購買)-AE",
          "sku": 6541600,
          "spec": {
            "name": "商品品牌",
            "selectedValue": "AE"
          },
          "isVisible": true
        }
      ],
      "name": "測試賣場-圖片雙層(請勿購買)",
      "price": "90.00",
      "shareMediaBetweenModels": false,
      "sku": 6541598,
      "subStationId": "sub10",
      "subStationName": "流行女裝",
      "supplierId": 99999,
      "type": "general",
      "warranty": {
        "description": "保固說明文字",
        "handler": "official",
        "period": "一個月",
        "scope": "新品瑕疵",
        "productStatus": "new"
      },
      "skuDetail": {
        "shipType": {
          "id": 1,
          "name": "Home"
        },
        "name": "測試賣場-圖片雙層(請勿購買)"
      },
      "model": "型號",
      "featureTitle": "特色標題",
      "shortDescription": [
        "商品特色"
      ],
      "seoUrl": "測試賣場",
      "endTs": "2030-12-26T14:03:00Z",
      "startTs": "2019-12-27T14:03:00Z",
      "purchaseQtyLimit": 12,
      "cvsPurchaseQtyLimit": 1,
      "isThresholdFreebie": false,
      "contentRating": "None",
      "deliveryType": "normal",
      "marketPrice": "100.00"
    },
    {
      "availableCount": 0,
      "brandId": "41166484",
      "brandName": "2M2",
      "catItemId": "catItem15710",
      "copy": "<p>測試賣場提案備註PrpslUpdateVideoBackground0001</p>",
      "cost": "50.00",
      "id": 3380038,
      "status": "normal",
      "allowedDiscounts": ["reward", "coupon"],
      "images": [
        {
          "height": 1000,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/F5CEF719B5-SP-251080.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/A629DEF40E-SP-251080.jpg",
          "width": 400
        },
        {
          "height": 250,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/85C4CF5422-SP-251080.jpg",
          "width": 250
        },
        {
          "height": 135,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/CCE19453E6-SP-251080.jpg",
          "width": 135
        },
        {
          "height": 80,
          "order": 1,
          "url": "https://s.yimg.com/zo/MerchandiseImages/6A649F3B4C-SP-251080.jpg",
          "width": 80
        },
        {
          "height": 1000,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/1DEFC8D131-SP-251080.jpg",
          "width": 1000
        },
        {
          "height": 400,
          "order": 2,
          "url": "https://s.yimg.com/zo/MerchandiseImages/2CE1B98D0A-SP-251080.jpg",
          "width": 400
        }
      ],
      "name": "測試賣場-影片(請勿購買)",
      "price": "90.00",
      "shareMediaBetweenModels": false,
      "sku": 6543801,
      "subStationId": "sub10",
      "subStationName": "流行女裝",
      "supplierId": 99999,
      "type": "general",
      "videos": [
        {
          "duration": 15000,
          "order": 1,
          "thumbnail": {
            "url": "https://edgecast-vod.yahoo.net/aws-oath-nevec-aws-int/destination/afc60c874f424ab4830f90f069a932b6/afc60c874f424ab4830f90f069a932b6_thumbnails_720p.0000000.jpg"
          },
          "url": "https://edgecast-vod.yahoo.net/aws-oath-nevec-aws-int/destination/afc60c874f424ab4830f90f069a932b6/afc60c874f424ab4830f90f069a932b6_720p.mp4"
        }
      ],
      "warranty": {
        "description": "保固說明文字",
        "handler": "official",
        "period": "一個月",
        "scope": "新品瑕疵",
        "productStatus": "new"
      },
      "skuDetail": {
        "shipType": {
          "id": 61,
          "name": "Express24HR"
        },
        "struDataAttrClusterId": "000003414671",
        "name": "測試賣場-影片(請勿購買)"
      },
      "model": "型號",
      "featureTitle": "特色標題",
      "shortDescription": [
        "商品特色"
      ],
      "seoUrl": "測試賣場",
      "endTs": "2030-12-26T14:03:00Z",
      "startTs": "2019-12-27T14:03:00Z",
      "purchaseQtyLimit": 12,
      "cvsPurchaseQtyLimit": 1,
      "isThresholdFreebie": false,
      "contentRating": "None",
      "actualBarcode": "9786809387450",
      "stock": 10,
      "deliveryType": "normal",
      "marketPrice": "100.00"
    }
  ],
  "pagination": {
    "resultsTotal": 2
  }
}