Get List of Products of a Collection - citiesocial/citiesocial-api-doc GitHub Wiki
Returns list of Products of a given specific Collection in JSON format.
-
URL
/collections/{{ colleciton-id }}/products/
-
Method:
GET
-
URL Params
Optional:
page=[integer]
limit=[integer]
-
Data Params
None
-
Success Response:
-
Code: 200
Content:{ "products": [ { "id": 123, ... } ... ] }
-
Code: 200
-
Error Response:
-
Code: 400 BAD REQUEST
Content:invalid value: ...
OR
-
Code: 401 UNAUTHORIZED
Content:Unauthorized access
-
Code: 400 BAD REQUEST
-
Sample Successful Response:
response parameters:
"id": 商品 id
"title": 商品 名稱
"handle": 僅citiesocial內部使用
"brand": 品牌名稱
"published_at": 商品上架時間
"compare_at_price": 商品原售價
"price": 商品新售價
"cover_image_url": 商品 cover image
{
"products": [
{
"id": 9809128722,
"title": "「日本烤爐大將」卡式瓦斯烤肉爐",
"handle": "product-7950",
"brand": "IWATANI",
"published_at": "2017-06-29T09:47:36+08:00",
"compare_at_price": 3580,
"price": 2380,
"cover_image_url": "https://cdn.shopify.com/s/files/1/0254/0393/products/ball-3-side.png?v=1499157635"
},
{
"id": 9809129234,
"title": "便攜式手提卡式瓦斯爐(香檳金)",
"handle": "product-7951",
"brand": "IWATANI",
"published_at": "2017-06-29T09:47:40+08:00",
"compare_at_price": 7200,
"price": 5780,
"cover_image_url": "https://cdn.shopify.com/s/files/1/0254/0393/products/a_30.jpg?v=1499158150"
}
]
}