# Product Category

### Why is it so important?

The product categories need to be sent to Skyhub the right way, so products are directed to the appropriate department within the Marketplace.

### What are the benefits?

Your product will have the right positioning in the Marketplace catalog, and thereby increase the chance of buyers finding your products, therefore increasing sales.

Most e-commerces have folder like structure that defines a hierarchy over categories. For example, the "charger" category may be a subcategory of the "Cell Phone" category.

To simulate the hierarchy, the product category at Skyhub should be the sum of all category names in the hierarchy separated by a ">".

| Samples  | Árvores de categorias                               |
| -------- | --------------------------------------------------- |
| Sample 1 | Bedrooms > Double > Wardrobe > 2 Doors              |
| Sample 2 | Electronics > Notebook > Dual Core > 7th generation |
| Sample 3 | Electronics > Cell Phones > Accessories > Headphone |

### What is not good practice?

We do not recommend sending Generic categories to the Marketplace that make it difficult for you to decide where to place your products within the Marketplace category structure.

| Categories                     | Why we do not recommend                                                                                                                                                                  |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Eletrônicos > LG               | The LG brand has other types of products, such as monitors, microwaves and televisions. In this way, the decision on where to position the product will not be assertive on marketplace. |
| Eletrônicos \| Celulares \| LG | When separating the categories by pipe (\|) to SkyHub does not understand that they are distinct categories causing difficulty in positioning the products in the marketplace            |

### How to send the category this way in Json?

You should submit the categories through the POST method with the following body:

{% code title="Sample 1" %}

```
{
  "category": {
    "code": "category001",
    "name": "Bedroom > Couple > Wardrobe"
  }
}
```

{% endcode %}

{% code title="Sample 2" %}

```
{
  "category": {
    "code": "category002",
    "name": "Eletronics > Notebook > Apple"
  }
}
```

{% endcode %}

{% code title="Sample 3" %}

```
{
  "category": {
    "code": "category003",
    "name": "Eletronics > Cell PHones > HeadPhone"
  }
}
```

{% endcode %}

{% hint style="warning" %}
**Remember:** When sending the products to SkyHub you will need to include its category name based on those categories that has already been created over category endpoint.
{% endhint %}

**Sample:**

```
{
    "product": {
        "sku": "201",
        "name": "TEST PRODUCT",
        "description": "TEST PRODUCT",
        "status": "enabled",
        "price": 30.00,
        "promotional_price": 29.90,
        "cost": 0.2,
        "weight": 0.100,
        "height": 20,
        "width": 30,
        "length": 20,
        "brand": "SKYHUB",
        "nbm": "98769898",
        "categories": [{
            "code": "001",
            "name": "ELETRONICS > CELL PHONES > SMARTPHONE > ANDROID"
        }],
      "images": [
            "image_url"
        ],
        "specifications": [{
            "key": "Product specifications PAI",
            "value": "Product specifications PAI"
        }],
        "variations": [{
            "sku": "202",
            "qty": 100,
            "ean": "9876543210987",
            "images": [
                "url_da_imagem"
            ],
            "specifications": [{
                "key": "atributo_que_define_a_variacao_do_sku_1",
                "value": "atributo_que_define_a_variacao_do_sku_1"
            }, {
                "key": "atributo_que_define_a_variacao_do_sku_2",
                "value": "atributo_que_define_a_variacao_do_sku_2"
            }]
        }],
        "variation_attributes": [
            "atributo_que_define_a_variacao_do_produto_2",
            "atributo_que_define_a_variacao_do_produto_2"
        ]
    }
}
```

For details on product integration, see the guide below:

{% content-ref url="/pages/-LWRU1f2GX0OrQRinK3X" %}
[Product Integration](/skyhub-api-english/skyhub-api-guides/product-integration.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://skyhub-english.gitbook.io/skyhub-api-english/skyhub-api-guides/product-category.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
