Get Categories
Function
To get detailed information of couple categories sorted by time
利用時間範圍選取與排序獲取分類資料
URL
GET <<api_domain>>/v1/categories
Request Parameters
Parameter | Column Type | Description | Example |
---|---|---|---|
updated_after | DateTime | Filter orders by those updated after specific time. 取得 updated_at 大於指定時間的分類(包含指定時間) - *Should use UTC time | ruby updated_after=2018-01-01 00:00:00 |
updated_before | DateTime | Filter orders by those updated before specific time. 取得 updated_at 小於指定時間的分類(包含指定時間) *Should use UTC time | ruby updated_before=2018-01-01 00:00:00 |
per_page | Integer | Numbers of Categories per Page 每頁顯示 n 筆資料 (Default: 24) | ruby per_page=20 |
page | Integer | Page Number 頁數 (Default: 1) | ruby page=1 |
excludes[] | String | Could exclude certain parameters in the response 結果要排除哪些參數 | ruby excludes[]=items.id |
fields[] | String | Could only show certain parameters in the response 結果只顯示哪些參數 | ruby fields[]=items.id |
created_by_filter | String | Filter categories by those created by. Default 'admin'. 取得指定 created_by 的分類。預設為'admin'。 enum: - admin - pos | ruby created_by_filter=admin |
Response Fields
Field | Column Type | Description | Example |
---|---|---|---|
items | Category | Categories Information分類資訊 | Please check the link on the left |
pagination | Pagination | Pagination 頁面資訊 | Please check the link on the left |
Response Example
{
"items": [
{
"id": "58c1362f01cda3329300004d",
"name_translations": {
"en": "Featured Products",
"zh-hant": "精選商品"
},
"seo_title_translations": {
"zh-hant": "精選商品 title",
"en": "Featured Products title"
},
"seo_description_translations": {
"zh-hant": "精選商品 desc",
"en": "Featured Products desc"
},
"seo_keywords": "key,word",
"key": "featured_products",
"status": "active",
"banner_medias": [
{
"images": {
"original": {
"width": 1600.0,
"height": 500.0,
"url": "http://img.com/
}
},
"_id": "620b60fc8b0e89003822b0ac",
"alt_translations": null
}
],
"parent_id": null,
"priority": 7.0,
"created_by": "admin"
},
{
"id": "58d3398d01cda31bfb00000c",
"name_translations": {
"en": "3C",
"zh-hant": "3C"
},
"seo_title_translations": {
"en": "3C",
"zh-hant": "3CC"
},
"seo_description_translations": {
"en": "",
"zh-hant": ""
},
"seo_keywords": "",
"key": null,
"status": "active",
"children": [
{
"id": "58d3393001cda31bfb000006",
"name_translations": {
"en": "Watch",
"zh-hant": "手錶"
},
"seo_title_translations": {
"en": "Watch",
"zh-hant": "手錶"
},
"seo_description_translations": {
"en": "",
"zh-hant": ""
},
"seo_keywords": null,
"key": null,
"status": "active"
},
{
"id": "58d3395901cda31bfb000008",
"name_translations": {
"en": "phone",
"zh-hant": "手機"
},
"seo_title_translations": {
"en": "phone",
"zh-hant": "手機"
},
"seo_description_translations": {
"en": "",
"zh-hant": ""
},
"seo_keywords": null,
"key": null,
"status": "active"
}
]
},
{
"id": "5b9f5fa3e388090bf953c09e",
"name_translations": {
"en": "",
"zh-hant": "配件"
},
"seo_title_translations": {
"en": "",
"zh-hant": "配件"
},
"seo_description_translations": {
"en": "",
"zh-hant": "配件 簡介"
},
"seo_keywords": "配件",
"key": null,
"status": "active",
"children": [
{
"id": "5b9f5fd4e388090bf953c0a0",
"name_translations": {
"en": "",
"zh-hant": "行動電源"
},
"seo_title_translations": {
"en": "",
"zh-hant": "行動電源"
},
"seo_description_translations": {
"en": "",
"zh-hant": "行動電源"
},
"seo_keywords": "行動電源,充電器",
"key": null,
"status": "active"
},
{
"id": "5b9f5ff5e388090bf953c0a2",
"name_translations": {
"en": "",
"zh-hant": "充電線"
},
"seo_title_translations": {
"en": "",
"zh-hant": "充電線"
},
"seo_description_translations": {
"en": "",
"zh-hant": "充電線 簡介"
},
"seo_keywords": "充電線",
"key": null,
"status": "active"
}
]
}
],
"pagination": {
"current_page": 1,
"per_page": 24,
"total_pages": 1,
"total_count": 3
}
}
Updated almost 3 years ago