Categories

(ms.categories)

It contains all the categories that are required for a specific site.



Fields

ValueDescription
name   
Type: string
Required
Name of the category.
Women's Apparels
alias   
Type: string
Aliases are the unique category URL on storefront. It is automatically generated from the name of brand.
women-apparels
description   
Type: string
Brief description about the category.
Trendy apparels for women.
images   
Type: array
Images for the category.
{
  "images": [
  {
    "image": "sample-image-woman.png",
    "caption": "Women Apparels"
  }
 ]
}
image
Type: file
Required
Single image related to the category.
sample-image-women.png
caption
Type: string
This field holds text which acts as title of image on storefront.

Women Apparels

parent   
Type: string
Parent category (if any) of the category.
Apparels
count   
Type: integer
It stores the count of products of a category.
SEO   
Type: object
SEO contains data that affects the online visibility of the category on search engine.
{ 
  "SEO": {
        "title": "Trendy women apparels at 50% off",
        "description": "Buy trendy women apparels at flat 50% off. Dresses, tops, skirts, jeans. Same day delivery. No shipping cost",
        "keywords": "trendy apparels, women apparels"
    }
}
title
Type: string
The title of the category to specify a custom title for the category page for SEO.
Trendy women apparels at 50% off
description
Type: string
Specify a custom meta description for the category page for SEO.
Buy trendy women apparels at flat 50% off. Dresses, tops, skirts, jeans. Same day delivery. No shipping cost.
keywords
Type: string
Specify the keywords to specify custom meta keywords for the category page for SEO.
trendy apparels, women apparels
canonical_url
Type: string
The canonical URL is used to declare a single page as its source or for duplicate pages to reference their source/originating page.
sitemap_priority
Type: string
Sitemap priority defines the priority of the particular page in your store.
0.3
metafield_sets   
Type: array
Metafields to be used in case you need extra fields in categories.
publish   
Type: string
Enabling the flag makes the category visible on storefront.
1
default_sort_order   
Type: string
Order by which products of the category will be sorted.
By date: Newest to oldest
widget   
Type: string

Commands (Endpoints)

POST /api/1/entity/ms.categories   
Creates a new categorie
DEL /api/1/entity/ms.categories/{resource_id}   
Deletes a categorie
PUT /api/1/entity/ms.categories/{resource_id}   
Updates an existing categorie
GET /api/1/entity/ms.categories/{resource_id}   
Retrieves a single categorie
GET /api/1/entity/ms.categories   
Retrieves a list of categories
skipResolveTask