Create Category
Function
To create a new category with open API
透過open API創造一個新的分類
URL
POST API_DOMAIN/v1/categories
Request Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| name_translations *Required | Hash | Category Name 分類名稱
| |
| seo_title_translations | Hash | Title of SEO SEO優化標題
| |
| seo_description_translations | Hash | Description of SEO SEO優化描述
| |
| seo_keywords | String | Keywords of SEO, SEO關鍵字
| |
| seo_link | String | SEO url 自訂SEO url | |
| parent_id | String | Decide which category is its parent category. 該分類的母分類
| |
| priority | Integer | Category Sorting Priority 分類權重排序
| |
| banner_url | String | Category Banner Picture 分類横幅圖片 | |
JSON params example
{
"category": {
"name_translations": { "en": "換季特賣" },
"seo_title_translations": { "en": "Seasonal sale", "zh-hant": "換季特賣" },
"seo_description_translations": { "en": "Winter clothes- inventory clearance of clothes, shoes, boots, purses and other seasonal items.", "zh-hant": "冬季清倉特賣" },
"seo_keywords": "特賣, 冬季",
"seo_link": "seasonal_sale",
"banner_url": "https://shopline.tw/blog/wp-content/uploads/2015/11/logo-shopline-white.png",
"parent_id": "5c497098e3880960534a2733"
}
}Response Example
{
"id": "5c74f405e388095f35c25f59",
"name_translations": {
"en": "換季特賣"
},
"seo_title_translations": {
"en": "Seasonal sale",
"zh-hant": "換季特賣"
},
"seo_description_translations": {
"en": "Winter clothes- inventory clearance of clothes, shoes, boots, purses and other seasonal items.",
"zh-hant": "冬季清倉特賣"
},
"seo_keywords": "特賣, 冬季",
"key": null,
"status": "active",
"banner_medias": [
{
"images": {
"original": {
"width": 1600,
"height": 500,
"url": "https://img.shoplineapp.com/media/image_clips/5c74f404e388095f35c25f58/original.png?1551168515"
},
"thumb": {
"width": 1600,
"height": 500,
"url": "https://img.shoplineapp.com/media/image_clips/5c74f404e388095f35c25f58/original.png?1551168515"
},
"source": {
"width": 1600,
"height": 500,
"url": "https://img.shoplineapp.com/media/image_clips/5c74f404e388095f35c25f58/original.png?1551168515"
},
"favicon_small": {
"width": 16,
"height": 16,
"url": "https://img.shoplineapp.com/media/second_clips/5c74f404e388095f35c25f58/favicon_small.png?1551168516"
},
"favicon": {
"width": 32,
"height": 32,
"url": "https://img.shoplineapp.com/media/second_clips/5c74f404e388095f35c25f58/favicon.png?1551168516"
},
"favicon_large": {
"width": 64,
"height": 64,
"url": "https://img.shoplineapp.com/media/second_clips/5c74f404e388095f35c25f58/favicon_large.png?1551168516"
},
"transparent_thumb": {
"width": 200,
"height": 200,
"url": "https://img.shoplineapp.com/media/second_clips/5c74f404e388095f35c25f58/transparent_thumb.png?1551168516"
},
"transparent_large": {
"width": 500,
"height": 156,
"url": "https://img.shoplineapp.com/media/second_clips/5c74f404e388095f35c25f58/transparent_large.png?1551168516"
},
"transparent_xlarge": {
"width": 1000,
"height": 313,
"url": "https://img.shoplineapp.com/media/second_clips/5c74f404e388095f35c25f58/transparent_xlarge.png?1551168516"
},
"transparent_medium": {
"width": 250,
"height": 78,
"url": "https://img.shoplineapp.com/media/second_clips/5c74f404e388095f35c25f58/transparent_medium.png?1551168516"
}
},
"_id": "5c74f404e388095f35c25f58",
"alt_translations": {}
}
],
"parent_id": "5c497098e3880960534a2733",
"priority": 16
}Updated 6 months ago
Did this page help you?
