Get Category
Function
To get detailed information for a specific category with its ID
使用分類 ID 獲取特定一個分類的詳細資料
URL
GET <<api_domain>>/v1/categories/:id
Request parameters
Parameter | Type | Description | Example |
---|---|---|---|
id | String | Category ID 分類 ID * Support main and sub category 支援第一層到第三層的分類 | 58c1362f01cda3329300004d |
fields[] | String | Could only show certain parameters in the response 結果只顯示哪些參數 | ruby fields[]=id |
excludes[] | String | Could exclude certain parameters in the response 結果要排除哪些參數 | ruby excludes[]=id |
Response Fields
Field | Type | Description | Example |
---|---|---|---|
id | String | Category ID 分類ID | 5de4b3fe461b13002154587d |
name_translations | Translation | Name 分類名稱 | "en": "Featured Products", "zh-hant": "精選商品" |
seo_title_translations | Translation | SEO Title SEO標題 | "en": "22222", "zh-hant": "SEO優化 change" |
seo_description_translations | Translation | SEO Description SEO簡介 | "en": "SEO description11", "zh-hant": "SEO 內文2" |
seo_keywords | String | SEO Keyword SEO 關鍵字 | 關鍵字修改222 |
key | String | featured_products | |
status | String | Status 狀態 ---- active removed | active |
banner_medias | Array | Banner Medias 分類橫圖 | |
parent_id | String | Parent Category ID 母分類ID | |
priority | Float | Weight 分類權重 | 1.0 |
created_by | String | Created By 創造來自... --- admin pos openapi | admin |
children | Category | Array of Sub Categories Information 子分類資訊序列 | Please check the link on the left |
Response Example
{
"id": "5de4b3fe461b13002154587d",
"name_translations": {
"en": "Featured Products",
"zh-hant": "精選商品"
},
"seo_title_translations": {
"en": "22222",
"zh-hant": "SEO優化 change"
},
"seo_description_translations": {
"en": "SEO description11",
"zh-hant": "SEO 內文2"
},
"seo_keywords": "關鍵字修改222",
"key": "featured_products",
"status": "active",
"banner_medias": [
{
"images": {
"favicon_small": {
"width": 900.0,
"height": 420.0,
"url": "https://img.shoplineapp.com/media/image_clips/5fab519c11eceb0020628aff/original.jpg?1605063068"
},
"favicon": {
"width": 900.0,
"height": 420.0,
"url": "https://img.shoplineapp.com/media/image_clips/5fab519c11eceb0020628aff/original.jpg?1605063068"
},
"favicon_large": {
"width": 900.0,
"height": 420.0,
"url": "https://img.shoplineapp.com/media/image_clips/5fab519c11eceb0020628aff/original.jpg?1605063068"
},
"transparent_thumb": {
"width": 900.0,
"height": 420.0,
"url": "https://img.shoplineapp.com/media/image_clips/5fab519c11eceb0020628aff/original.jpg?1605063068"
},
"transparent_large": {
"width": 900.0,
"height": 420.0,
"url": "https://img.shoplineapp.com/media/image_clips/5fab519c11eceb0020628aff/original.jpg?1605063068"
},
"transparent_xlarge": {
"width": 900.0,
"height": 420.0,
"url": "https://img.shoplineapp.com/media/image_clips/5fab519c11eceb0020628aff/original.jpg?1605063068"
},
"original": {
"width": 900.0,
"height": 420.0,
"url": "https://img.shoplineapp.com/media/image_clips/5fab519c11eceb0020628aff/original.jpg?1605063068"
},
"thumb": {
"width": 900.0,
"height": 420.0,
"url": "https://img.shoplineapp.com/media/image_clips/5fab519c11eceb0020628aff/original.jpg?1605063068"
},
"source": {
"width": 900.0,
"height": 420.0,
"url": "https://img.shoplineapp.com/media/image_clips/5fab519c11eceb0020628aff/original.jpg?1605063068"
}
},
"_id": "5fab519c11eceb0020628aff",
"alt_translations": {}
}
],
"parent_id": null,
"priority": 1.0,
"children": [
{
"id": "5e8421291e164300337d8b0a",
"name_translations": {
"en": "Sub",
"zh-hant": "Sub"
},
"seo_title_translations": {
"en": "",
"zh-hant": "Sub"
},
"seo_description_translations": {
"en": "",
"zh-hant": ""
},
"seo_keywords": null,
"key": null,
"status": "active",
"banner_medias": [],
"parent_id": "5de4b3fe461b13002154587d",
"priority": 3.0,
"children": [
{
"id": "5efeff4ab774cf003cb00249",
"name_translations": {
"en": "",
"zh-hant": "3rd"
},
"seo_title_translations": {
"en": "",
"zh-hant": "3rd"
},
"seo_description_translations": {
"en": "",
"zh-hant": ""
},
"seo_keywords": null,
"key": null,
"status": "active",
"banner_medias": [],
"parent_id": "5e8421291e164300337d8b0a",
"priority": 1.0,
"created_by": "admin"
}
],
"created_by": "admin"
}
],
"created_by": "admin"
}
Updated 11 months ago