文档中心 > Miravia Open Platform

Category mapping

更新时间:2023/06/05 访问次数:278

How to map a category

Before listing a product on Miravia, it’s important to map your product’s category to one of our approved categories. This is because only leaf categories are allowed when listing an item and they have specific attributes. Miravia provides different API endpoints to help you identify the right category for your product and its attributes.

Finding the category

To find the specific category that you want to use, first you need to list all the categories using the endpoint /category/tree/get. This endpoint will retrieve the structure of the category. For example, if you want to map running shoes for boys you will find this structure in the response:

{
  "name": "Sports Shoes and Clothing",
  "leaf": false,
  "category_id": 62206828,
  "children": [
  {
    ....
  },
  {
    ....
  },
  {
    "name": "Boys's Sports Shoes",
    "leaf": false,
    "category_id": 62206279,
    "var": false,
    "children": [
      {
        ....,
      },
      {
        "name": "Running Shoes",
        "leaf": true,
        "category_id": 62206282,
        "var": false,
        "permission": "yes",
      }
    ]
  }
}

Reference

Field Name Field Description
name The name of the category given by Miravia
leaf true/false
category_id The id of the category given by Miravia
permission yes/no

It’s important that you map all your a categories with the ones that are leaf because it is the only value that Miravia will accept when listing products.

Tree Overview

  • Miravia product categories are tree-structured, only leaf nodes can be used to create products. You cannot use branch nodes to create products.
  • When “leaf” is equal to false, this means that the category is a branch node. A category can have multiple branches

image

FAQ

关于此文档暂时还没有FAQ
返回
顶部